@Test public void testParseGeometryCollection() throws Exception { GeoJsonParser parser = new GeoJsonParser(validGeometryCollection()); assertEquals(1, parser.getFeatures().size()); for (GeoJsonFeature feature : parser.getFeatures()) { assertEquals("GeometryCollection", feature.getGeometry().getGeometryType()); int size = 0; for (String property : feature.getPropertyKeys()) { size++; } assertEquals(2, size); assertEquals("Popsicles", feature.getId()); GeoJsonGeometryCollection geometry = ((GeoJsonGeometryCollection) feature.getGeometry()); assertEquals(1, geometry.getGeometries().size()); for (Geometry geoJsonGeometry : geometry.getGeometries()) { assertEquals("GeometryCollection", geoJsonGeometry.getGeometryType()); } } }
ArrayList<GeoJsonFeature> getFeatures() { return mGeoJsonFeatures; }
GeoJsonParser { ArrayList<GeoJsonFeature> getFeatures() { return mGeoJsonFeatures; } }
GeoJsonParser { ArrayList<GeoJsonFeature> getFeatures() { return mGeoJsonFeatures; } GeoJsonParser(JSONObject geoJsonFile); }
GeoJsonParser { ArrayList<GeoJsonFeature> getFeatures() { return mGeoJsonFeatures; } GeoJsonParser(JSONObject geoJsonFile); static Geometry parseGeometry(JSONObject geoJsonGeometry); }
GeoJsonParser { ArrayList<GeoJsonFeature> getFeatures() { return mGeoJsonFeatures; } GeoJsonParser(JSONObject geoJsonFile); static Geometry parseGeometry(JSONObject geoJsonGeometry);  }