Skip to content

Instantly share code, notes, and snippets.

@nuest
Created July 3, 2015 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nuest/76292c5d9cf483c9e276 to your computer and use it in GitHub Desktop.
Save nuest/76292c5d9cf483c9e276 to your computer and use it in GitHub Desktop.
Catalog cat = new Catalog(workingDir + "feature/test.gpx");
String[] catItems = {"route_points", "route_points", "routes", "routes", "track_points", "track_points",
"tracks", "tracks", "waypoints", "waypoints"};
for(int i=0;i<catItems.length;++i)
assertEquals(catItems[i], cat.items().get(i));
assertTrue(cat.isValid());
FeatureCoverage trks = FeatureCoverage.toFeatureCoverage( cat._getitem("tracks") );
assertTrue(trks.isValid());
FeatureIterator it = trks.iterator();
assertEquals(1, trks.featureCount());
FeatureCoverage trkpts = FeatureCoverage.toFeatureCoverage( cat._getitem("track_points") );
assertTrue(trkpts.isValid());
assertEquals(830, trkpts.featureCount());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment