[Swift-commit] r6281 - SwiftApps/modis/tutorial
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Fri Feb 15 12:31:32 CST 2013
Author: davidk
Date: 2013-02-15 12:31:32 -0600 (Fri, 15 Feb 2013)
New Revision: 6281
Modified:
SwiftApps/modis/tutorial/modis01.swift
SwiftApps/modis/tutorial/modis02.swift
Log:
Adjust for is_land test
Modified: SwiftApps/modis/tutorial/modis01.swift
===================================================================
--- SwiftApps/modis/tutorial/modis01.swift 2013-02-15 16:51:30 UTC (rev 6280)
+++ SwiftApps/modis/tutorial/modis01.swift 2013-02-15 18:31:32 UTC (rev 6281)
@@ -1,11 +1,12 @@
type imagefile;
type landuse;
-app (landuse output) getLandUse (imagefile input)
+app (landuse output, landuse is_land) getLandUse (imagefile input)
{
- getlanduse @filename(input) stdout=@filename(output);
+ getlanduse @filename(input) @filename(is_land) stdout=@filename(output);
}
imagefile modisImage <"../data/modis/2002/h00v09.pgm.gz">;
landuse result <"landuse/h00v08.landuse.byfreq">;
-result = getLandUse(modisImage);
+landuse land_result <"landuse/h00v08.is_land">;
+(result, land_result) = getLandUse(modisImage);
Modified: SwiftApps/modis/tutorial/modis02.swift
===================================================================
--- SwiftApps/modis/tutorial/modis02.swift 2013-02-15 16:51:30 UTC (rev 6280)
+++ SwiftApps/modis/tutorial/modis02.swift 2013-02-15 18:31:32 UTC (rev 6281)
@@ -1,9 +1,9 @@
type imagefile;
type landuse;
-app (landuse output) getLandUse (imagefile input)
+app (landuse output, landuse island) getLandUse (imagefile input)
{
- getlanduse @filenames(input) stdout=@filename(output);
+ getlanduse @filename(input) @filename(island) stdout=@filename(output);
}
# Constants and command line arguments
@@ -15,8 +15,9 @@
# Compute the land use summary of each MODIS tile
landuse land[] <structured_regexp_mapper; source=geos, match="(h..v..)", transform=@strcat("landuse/\\1.landuse.byfreq")>;
+landuse is_land[] <structured_regexp_mapper; source=geos, match="(h..v..)", transform=@strcat("landuse/\\1.is_land")>;
foreach g,i in geos {
- land[i] = getLandUse(g);
+ (land[i], is_land[i]) = getLandUse(g);
}
More information about the Swift-commit
mailing list