http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/d305f9da/libraries/spatial/src/test/java/org/qi4j/library/spatial/geojson/SimpleGeoJsonTest.java ---------------------------------------------------------------------- diff --git a/libraries/spatial/src/test/java/org/qi4j/library/spatial/geojson/SimpleGeoJsonTest.java b/libraries/spatial/src/test/java/org/qi4j/library/spatial/geojson/SimpleGeoJsonTest.java deleted file mode 100644 index 3660500..0000000 --- a/libraries/spatial/src/test/java/org/qi4j/library/spatial/geojson/SimpleGeoJsonTest.java +++ /dev/null @@ -1,108 +0,0 @@ -package org.qi4j.library.spatial.geojson; - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.geojson.FeatureCollection; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TestName; -import org.qi4j.api.common.Visibility; -import org.qi4j.api.injection.scope.Service; -import org.qi4j.api.unitofwork.UnitOfWork; -import org.qi4j.api.value.ValueSerialization; -import org.qi4j.bootstrap.AssemblyException; -import org.qi4j.bootstrap.ModuleAssembly; -import org.qi4j.library.spatial.topo.GeoJSONSwissLakes2013; -import org.qi4j.test.AbstractQi4jTest; -import org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Created by jakes on 2/7/14. - */ - -/** - * http://stackoverflow.com/questions/4619306/list-arrary-double-entering-values - * http://worldwind31.arc.nasa.gov/svn/trunk/WorldWind/src/gov/nasa/worldwindx/examples/GeoJSONLoader.java - * - * - */ -public class SimpleGeoJsonTest extends AbstractQi4jTest { - - private Visibility visibility = Visibility.module; - - - - @Rule - @SuppressWarnings( "PublicField" ) - public TestName testName = new TestName(); - private Logger log; - - @Before - public void before() - { - log = LoggerFactory.getLogger(testName.getMethodName()); - module.injectTo( this ); - } - - @Override - public void assemble( ModuleAssembly module ) - throws AssemblyException - { - module.services( OrgJsonValueSerializationService.class ). - visibleIn( visibility ). - taggedWith(ValueSerialization.Formats.JSON); - - } - - @Service - @SuppressWarnings( "ProtectedField" ) - protected ValueSerialization valueSerialization; - - @Test - public void foo() throws Exception { - - UnitOfWork uow = module.newUnitOfWork(); - try - { - - } - catch( Exception ex ) - { - ex.printStackTrace(); - // log.error( ex.getMessage(), ex ); - throw ex; - } - finally - { - uow.discard(); - } - - - } - - @Test - public void testfoo() throws Exception { - - FeatureCollection featureCollection = - new ObjectMapper().readValue(GeoJSONSwissLakes2013.SWISS_LAKES , FeatureCollection.class); - - - -// File file = new File("/media/HDD_002/spatial/usa-lines.geojson"); -// FileInputStream fis = new FileInputStream(file); -// -// -// FeatureCollection featureCollection1 = -// new ObjectMapper().readValue(fis , FeatureCollection.class); - - - - } - - - - - -}
http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/d305f9da/libraries/spatial/src/test/java/org/qi4j/library/spatial/parser/geojson/SimpleGeoJSONParser.java ---------------------------------------------------------------------- diff --git a/libraries/spatial/src/test/java/org/qi4j/library/spatial/parser/geojson/SimpleGeoJSONParser.java b/libraries/spatial/src/test/java/org/qi4j/library/spatial/parser/geojson/SimpleGeoJSONParser.java deleted file mode 100644 index 71b8f8b..0000000 --- a/libraries/spatial/src/test/java/org/qi4j/library/spatial/parser/geojson/SimpleGeoJSONParser.java +++ /dev/null @@ -1,303 +0,0 @@ -package org.qi4j.library.spatial.parser.geojson; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonToken; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.geojson.*; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TestName; -import org.qi4j.api.common.Visibility; -import org.qi4j.api.geometry.*; -import org.qi4j.api.geometry.internal.Coordinate; -import org.qi4j.api.geometry.internal.TGeometry; -import org.qi4j.api.geometry.internal.TLinearRing; -import org.qi4j.api.injection.scope.Service; -import org.qi4j.api.unitofwork.UnitOfWork; -import org.qi4j.api.value.ValueSerialization; -import org.qi4j.bootstrap.AssemblyException; -import org.qi4j.bootstrap.ModuleAssembly; -import org.qi4j.library.spatial.topo.GeoJSONSwissLakes2013; -import org.qi4j.library.spatial.transformations.GeoJsonTransformator; -import org.qi4j.library.spatial.transformations.geojson.GeoJSONParserV2; -import org.qi4j.library.spatial.transformations.geojson.internal.ParserBuilder; -import org.qi4j.test.AbstractQi4jTest; -import org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.BufferedInputStream; -import java.io.InputStream; -import java.util.*; - -import static org.qi4j.library.spatial.v2.conversions.TConversions.Convert; - -/** - * Created by jakes on 2/7/14. - */ - -/** - * http://stackoverflow.com/questions/4619306/list-arrary-double-entering-values - * http://worldwind31.arc.nasa.gov/svn/trunk/WorldWind/src/gov/nasa/worldwindx/examples/GeoJSONLoader.java - * - * - */ -public class SimpleGeoJSONParser extends AbstractQi4jTest { - - private Visibility visibility = Visibility.module; - - - - @Rule - @SuppressWarnings( "PublicField" ) - public TestName testName = new TestName(); - private Logger log; - - @Before - public void before() - { - log = LoggerFactory.getLogger(testName.getMethodName()); - module.injectTo( this ); - } - - @Override - public void assemble( ModuleAssembly module ) - throws AssemblyException - { - module.services( OrgJsonValueSerializationService.class ). - visibleIn( visibility ). - taggedWith(ValueSerialization.Formats.JSON); - - // internal values - module.values( Coordinate.class, TLinearRing.class, TGeometry.class); - - // API values - module.values(TPoint.class,TLineString.class, TPolygon.class, TFeature.class); - - - } - - @Service - @SuppressWarnings( "ProtectedField" ) - protected ValueSerialization valueSerialization; - - - - @Test - public void parse() throws Exception { - - ParserBuilder parser = GeoJSONParserV2.source(new BufferedInputStream(this.getClass().getClassLoader().getResource("data/munich.geojson").openStream())).parse(); - List<Feature> features = parser.getValues(); - System.out.println("Found features " + features.size()); - - for (int i = 0; i < features.size(); i++) - { - Feature feature = features.get(i); - System.out.println(feature.getGeometry()); - - TGeometry tGeometry = GeoJSONParserV2.transform(module).from(feature).transform(); - System.out.println(i + " " + tGeometry + " " + tGeometry.getType()); - } - } - - @Test - public void parsePerformanceTest() throws Exception { - - // ParserBuilder parser = - - JsonParser parser = GeoJSONParserV2.source(new BufferedInputStream(this.getClass().getClassLoader().getResource("data/bavaria/osm-ways").openStream())).build(); - - JsonToken token; - - while ((token = parser.nextToken()) != null) { - switch (token) { - case START_OBJECT: - JsonNode node = parser.readValueAsTree(); - // ... do something with the object - // System.out.println("Read object: " + node.toString()); - // System.out.println(node.get("type")); - // FeatureCollection.class - // System.out.println(node.toString()); - // System.out.println(node.get("geometry")); - - // if (node.get("geometry").get("type")) - // System.out.println(node.get("geometry").get("type")); - // System.out.println(node.get("geometry").get("type")); - - // System.out.println(node.get("geometry").get("type").asText()); - - System.out.println("== > " + node.get("id")); - - // System.out.println(node.get("categories").get("osm").ar); - - JsonNode osm = node.get("categories").get("osm"); - - if (osm.isArray()) { - for (final JsonNode property : osm) { - System.out.println(property); - } - } - - if ("Point".equals(node.get("geometry").get("type").asText())) { - Point point = new ObjectMapper().readValue(node.get("geometry").toString(), Point.class); - TPoint tPoint = (TPoint)Convert(module).from(point).toTGeometry(); - // System.out.println(tPoint); - } - else if ("LineString".equals(node.get("geometry").get("type").asText())) { - LineString lineString = new ObjectMapper().readValue(node.get("geometry").toString(), LineString.class); - TLineString tLineString = (TLineString)Convert(module).from(lineString).toTGeometry(); - // System.out.println(tLineString); - - } - else if ("Polygon".equals(node.get("geometry").get("type").asText())) { - Polygon polygon = new ObjectMapper().readValue(node.get("geometry").toString(), Polygon.class); - TPolygon tPolygon = (TPolygon)Convert(module).from(polygon).toTGeometry(); - // System.out.println(tPolygon); - // System.out.println(tPolygon); - // System.out.println(tPolygon.shell().get().isValid()); - } - - - break; - } - } - } - - // parser.nextToken(); - - - @Test - public void testFoo() throws Exception - { - - InputStream source = new BufferedInputStream(this.getClass().getClassLoader().getResource("data/osm-pois").openStream()); - GeoJsonObject object = new ObjectMapper().readValue(source, FeatureCollection.class); -/** - if (object instanceof Point) { - } - - else if (object instanceof Polygon) { - } -*/ - - - - } - - - -/** - while (parser.nextToken() != JsonToken.END_OBJECT) { - parser. - String fieldname = parser.getCurrentName(); - JsonToken token = parser.nextToken(); // move to value, or START_OBJECT/START_ARRAY - System.out.println(fieldname); - if ("type".equals(fieldname)) { - // JsonToken token = parser.getCurrentToken(); - System.out.println("-- > " + token); - - new ObjectMapper().readV readValue(source, FeatureCollection.class); - } - } -*/ - - /** - List<Feature> features = parser.getValues(); - System.out.println("Found features " + features.size()); - - for (int i = 0; i < features.size(); i++) - { - Feature feature = features.get(i); - System.out.println(feature.getGeometry()); - - TGeometry tGeometry = GeoJSONParserV2.transform(module).from(feature).transform(); - System.out.println(i + " " + tGeometry + " " + tGeometry.getType()); - } - */ - - - @Test - public void foo() throws Exception { - - UnitOfWork uow = module.newUnitOfWork(); - try - { - - // ClassLoader.getSystemResource(name) && null == this.getClass().getClassLoader().getResource(name)) - - // this.getClass().getClassLoader().getResource("name") - - BufferedInputStream inputstream = new BufferedInputStream( this.getClass().getClassLoader().getResource("data/munich.geojson").openStream()); - - // BufferedInputStream inputstream = new BufferedInputStream(new FileInputStream("/home/jakes/Projects/QI4J/Spatial/qi4j-sdk/libraries/spatial/src/test/resources/topo/geojson/germany/bavaria.neustadt.geojson")); - - // BufferedInputStream inputstream = new BufferedInputStream(new FileInputStream("/media/HDD_002/spatial/OpenStreetMap/geofabrik.de/nuenberg.geojson")); - - FeatureCollection featureCollection = - new ObjectMapper().readValue(inputstream, FeatureCollection.class); - - System.out.println("Found num of features " + featureCollection.getFeatures().size()); - - int count = 0; - - Iterator<Feature> features = featureCollection.getFeatures().iterator(); - - while (features.hasNext()) { - - count++; - - Feature feature = features.next(); - - // TFeature tFeature = GeoJsonTransformator.withGeometryFactory(Geometry).transformGeoFeature(feature); - // System.out.println("-> " + tFeature); - - } - - - - } - catch( Exception ex ) - { - ex.printStackTrace(); - // log.error( ex.getMessage(), ex ); - throw ex; - } - finally - { - uow.discard(); - } - - - } - - - - - - - @Test - public void testfoo() throws Exception { - - FeatureCollection featureCollection = - new ObjectMapper().readValue(GeoJSONSwissLakes2013.SWISS_LAKES , FeatureCollection.class); - - - -// File file = new File("/media/HDD_002/spatial/usa-lines.geojson"); -// FileInputStream fis = new FileInputStream(file); -// -// -// FeatureCollection featureCollection1 = -// new ObjectMapper().readValue(fis , FeatureCollection.class); - - - - } - - - - - -} http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/d305f9da/libraries/spatial/src/test/java/org/qi4j/library/spatial/projections/ProjectionServiceTest.java ---------------------------------------------------------------------- diff --git a/libraries/spatial/src/test/java/org/qi4j/library/spatial/projections/ProjectionServiceTest.java b/libraries/spatial/src/test/java/org/qi4j/library/spatial/projections/ProjectionServiceTest.java deleted file mode 100644 index 8b71afe..0000000 --- a/libraries/spatial/src/test/java/org/qi4j/library/spatial/projections/ProjectionServiceTest.java +++ /dev/null @@ -1,109 +0,0 @@ -package org.qi4j.library.spatial.projections; - -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TestName; -import org.qi4j.api.common.Visibility; -import org.qi4j.api.injection.scope.Service; -import org.qi4j.api.unitofwork.UnitOfWork; -import org.qi4j.api.value.ValueSerialization; -import org.qi4j.bootstrap.AssemblyException; -import org.qi4j.bootstrap.ModuleAssembly; -import org.qi4j.test.AbstractQi4jTest; -import org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Created by jakes on 2/7/14. - */ - -/** - * http://stackoverflow.com/questions/4619306/list-arrary-double-entering-values - * http://worldwind31.arc.nasa.gov/svn/trunk/WorldWind/src/gov/nasa/worldwindx/examples/GeoJSONLoader.java - * - * - */ -public class ProjectionServiceTest extends AbstractQi4jTest { - - private Visibility visibility = Visibility.module; - - - - @Rule - @SuppressWarnings( "PublicField" ) - public TestName testName = new TestName(); - private Logger log; - - @Before - public void before() - { - log = LoggerFactory.getLogger(testName.getMethodName()); - module.injectTo( this ); - } - - @Override - public void assemble( ModuleAssembly module ) - throws AssemblyException - { - module.services( OrgJsonValueSerializationService.class). - visibleIn( visibility ). - taggedWith(ValueSerialization.Formats.JSON); - - module.services(ProjectionService.class); - - } - - @Service - @SuppressWarnings( "ProtectedField" ) - protected ValueSerialization valueSerialization; - - @Service - ProjectionService projectionService; - - @Test - public void foo() throws Exception { - - UnitOfWork uow = module.newUnitOfWork(); - try - { - projectionService.test(); - } - catch( Exception ex ) - { - ex.printStackTrace(); - // log.error( ex.getMessage(), ex ); - throw ex; - } - finally - { - uow.discard(); - } - - } - - @Test - public void testSupportedCodes() throws Exception { - - UnitOfWork uow = module.newUnitOfWork(); - - try - { - System.out.println(projectionService.getSupportedSRID("EPSG")); // "esri")); // "EPSG")); - } - catch( Exception ex ) - { - ex.printStackTrace(); - // log.error( ex.getMessage(), ex ); - throw ex; - } - finally - { - uow.discard(); - } - - } - - -} http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/d305f9da/libraries/spatial/src/test/java/org/qi4j/library/spatial/projections/ProjectionsTransformationTest.java ---------------------------------------------------------------------- diff --git a/libraries/spatial/src/test/java/org/qi4j/library/spatial/projections/ProjectionsTransformationTest.java b/libraries/spatial/src/test/java/org/qi4j/library/spatial/projections/ProjectionsTransformationTest.java deleted file mode 100644 index b2d634f..0000000 --- a/libraries/spatial/src/test/java/org/qi4j/library/spatial/projections/ProjectionsTransformationTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.qi4j.library.spatial.projections; - -import org.junit.Test; -import org.qi4j.api.geometry.*; -import org.qi4j.api.geometry.internal.Coordinate; -import org.qi4j.api.geometry.internal.TGeometry; -import org.qi4j.api.geometry.internal.TLinearRing; -import org.qi4j.api.value.ValueBuilder; -import org.qi4j.bootstrap.AssemblyException; -import org.qi4j.bootstrap.ModuleAssembly; -import org.qi4j.test.AbstractQi4jTest; - -import static org.junit.Assert.assertNotNull; - -/** - * Created by jj on 17.11.14. - */ -public class ProjectionsTransformationTest extends AbstractQi4jTest { - - @Override - public void assemble( ModuleAssembly module ) - throws AssemblyException - { - // Internal Types - module.values( - Coordinate.class, - TLinearRing.class); - - // API values - module.values(TPoint.class,TLineString.class, TPolygon.class); - // module.services(GeometryFactory.class); - - - - // module.forMixin( SomeType.class ).declareDefaults().someValue().set( "<unknown>" ); - } - - @Test - public void testTransform() throws Exception { - - ValueBuilder<TPoint> builder = module.newValueBuilder(TPoint.class); - - // TPoint pointABC = builder.prototype().X(123).Y() - - TPoint pointABC = builder.prototype().of - ( - module.newValueBuilder(Coordinate.class).prototype().of(1d), //x - module.newValueBuilder(Coordinate.class).prototype().of(1d) //y - ); - - - - // ProjectionsTransformation.transform("", pointABC); - - } -} http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/d305f9da/libraries/spatial/src/test/java/org/qi4j/library/spatial/repository/SimpleSpatialRepositoryTest.java ---------------------------------------------------------------------- diff --git a/libraries/spatial/src/test/java/org/qi4j/library/spatial/repository/SimpleSpatialRepositoryTest.java b/libraries/spatial/src/test/java/org/qi4j/library/spatial/repository/SimpleSpatialRepositoryTest.java deleted file mode 100644 index 644b51c..0000000 --- a/libraries/spatial/src/test/java/org/qi4j/library/spatial/repository/SimpleSpatialRepositoryTest.java +++ /dev/null @@ -1,164 +0,0 @@ -package org.qi4j.library.spatial.repository; - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.geojson.Feature; -import org.geojson.FeatureCollection; -import org.geojson.LngLatAlt; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TestName; -import org.qi4j.api.common.Visibility; -import org.qi4j.api.geometry.*; -import org.qi4j.api.geometry.internal.Coordinate; -import org.qi4j.api.geometry.internal.TGeometry; -import org.qi4j.api.geometry.internal.TLinearRing; -import org.qi4j.api.injection.scope.Service; -import org.qi4j.api.unitofwork.UnitOfWork; -import org.qi4j.api.value.ValueSerialization; -import org.qi4j.bootstrap.AssemblyException; -import org.qi4j.bootstrap.ModuleAssembly; -import org.qi4j.library.spatial.topo.GeoJSONSwissLakes2013; -import org.qi4j.library.spatial.transformations.GeoJsonTransformator; -import org.qi4j.test.AbstractQi4jTest; -import org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.BufferedInputStream; -import java.io.FileInputStream; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -/** - * Created by jakes on 2/7/14. - */ - -/** - * http://stackoverflow.com/questions/4619306/list-arrary-double-entering-values - * http://worldwind31.arc.nasa.gov/svn/trunk/WorldWind/src/gov/nasa/worldwindx/examples/GeoJSONLoader.java - * - * - */ -public class SimpleSpatialRepositoryTest extends AbstractQi4jTest { - - private Visibility visibility = Visibility.module; - - - - @Rule - @SuppressWarnings( "PublicField" ) - public TestName testName = new TestName(); - private Logger log; - - @Before - public void before() - { - log = LoggerFactory.getLogger(testName.getMethodName()); - module.injectTo( this ); - } - - @Override - public void assemble( ModuleAssembly module ) - throws AssemblyException - { - module.services( OrgJsonValueSerializationService.class ). - visibleIn( visibility ). - taggedWith(ValueSerialization.Formats.JSON); - - // internal values - module.values( Coordinate.class, TLinearRing.class, TGeometry.class); - - // API values - module.values(TPoint.class,TLineString.class, TPolygon.class, TFeature.class); - - - } - - @Service - @SuppressWarnings( "ProtectedField" ) - protected ValueSerialization valueSerialization; - - - - @Test - public void foo() throws Exception { - - UnitOfWork uow = module.newUnitOfWork(); - try - { - - - BufferedInputStream inputstream = new BufferedInputStream(new FileInputStream("/home/jakes/Projects/QI4J/Spatial/qi4j-sdk/libraries/spatial/src/test/resources/topo/geojson/germany/bavaria.neustadt.geojson")); - - // BufferedInputStream inputstream = new BufferedInputStream(new FileInputStream("/media/HDD_002/spatial/OpenStreetMap/geofabrik.de/nuenberg.geojson")); - - FeatureCollection featureCollection = - new ObjectMapper().readValue(inputstream, FeatureCollection.class); - - System.out.println("Found num of features " + featureCollection.getFeatures().size()); - - int count = 0; - - Iterator<Feature> features = featureCollection.getFeatures().iterator(); - - while (features.hasNext()) { - - count++; - - Feature feature = features.next(); - - // TFeature tFeature = GeoJsonTransformator.withGeometryFactory(Geometry).transformGeoFeature(feature); - - - - } - - - - } - catch( Exception ex ) - { - ex.printStackTrace(); - // log.error( ex.getMessage(), ex ); - throw ex; - } - finally - { - uow.discard(); - } - - - } - - - - - - - @Test - public void testfoo() throws Exception { - - FeatureCollection featureCollection = - new ObjectMapper().readValue(GeoJSONSwissLakes2013.SWISS_LAKES , FeatureCollection.class); - - - -// File file = new File("/media/HDD_002/spatial/usa-lines.geojson"); -// FileInputStream fis = new FileInputStream(file); -// -// -// FeatureCollection featureCollection1 = -// new ObjectMapper().readValue(fis , FeatureCollection.class); - - - - } - - - - - -} http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/d305f9da/libraries/spatial/src/test/java/org/qi4j/library/spatial/topo/GeoJSONSpec20080616.java ---------------------------------------------------------------------- diff --git a/libraries/spatial/src/test/java/org/qi4j/library/spatial/topo/GeoJSONSpec20080616.java b/libraries/spatial/src/test/java/org/qi4j/library/spatial/topo/GeoJSONSpec20080616.java index eec0e2e..0d8e1bf 100644 --- a/libraries/spatial/src/test/java/org/qi4j/library/spatial/topo/GeoJSONSpec20080616.java +++ b/libraries/spatial/src/test/java/org/qi4j/library/spatial/topo/GeoJSONSpec20080616.java @@ -1,28 +1,26 @@ package org.qi4j.library.spatial.topo; /** - * * http://geojson.org/geojson-spec.html - * */ public class GeoJSONSpec20080616 { // Version 1.0 - public static final String LineString = "{ \"type\": \"LineString\",\r\n \"coordinates\": [ [100.0, 0.0], [101.0, 1.0] ]\r\n }"; + public static final String LineString = "{ \"type\": \"LineString\",\r\n \"coordinates\": [ [100.0, 0.0], [101.0, 1.0] ]\r\n }"; - public static final String Polygon = "{ \"type\": \"Polygon\",\r\n \"coordinates\": [\r\n [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]\r\n ]\r\n }"; + public static final String Polygon = "{ \"type\": \"Polygon\",\r\n \"coordinates\": [\r\n [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]\r\n ]\r\n }"; - public static final String Polygon_with_Holes = "{ \\\"type\\\": \\\"Polygon\\\",\\r\\n \\\"coordinates\\\": [\\r\\n [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],\\r\\n [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]\\r\\n ]\\r\\n }"; + public static final String Polygon_with_Holes = "{ \\\"type\\\": \\\"Polygon\\\",\\r\\n \\\"coordinates\\\": [\\r\\n [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],\\r\\n [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]\\r\\n ]\\r\\n }"; - public static final String Multipoint = "{ \\\"type\\\": \\\"MultiPoint\\\",\\r\\n \\\"coordinates\\\": [ [100.0, 0.0], [101.0, 1.0] ]\\r\\n }"; + public static final String Multipoint = "{ \\\"type\\\": \\\"MultiPoint\\\",\\r\\n \\\"coordinates\\\": [ [100.0, 0.0], [101.0, 1.0] ]\\r\\n }"; - public static final String MultiLineString = "{ \\\"type\\\": \\\"MultiLineString\\\",\\r\\n \\\"coordinates\\\": [\\r\\n [ [100.0, 0.0], [101.0, 1.0] ],\\r\\n [ [102.0, 2.0], [103.0, 3.0] ]\\r\\n ]\\r\\n }"; + public static final String MultiLineString = "{ \\\"type\\\": \\\"MultiLineString\\\",\\r\\n \\\"coordinates\\\": [\\r\\n [ [100.0, 0.0], [101.0, 1.0] ],\\r\\n [ [102.0, 2.0], [103.0, 3.0] ]\\r\\n ]\\r\\n }"; - public static final String MultiPolygon = "{ \\\"type\\\": \\\"MultiPolygon\\\",\\r\\n \\\"coordinates\\\": [\\r\\n [[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]]],\\r\\n [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]],\\r\\n [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]]\\r\\n ]\\r\\n }"; + public static final String MultiPolygon = "{ \\\"type\\\": \\\"MultiPolygon\\\",\\r\\n \\\"coordinates\\\": [\\r\\n [[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]]],\\r\\n [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]],\\r\\n [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]]\\r\\n ]\\r\\n }"; - public static final String GeometryCollection = "{ \\\"type\\\": \\\"GeometryCollection\\\",\\r\\n \\\"geometries\\\": [\\r\\n { \\\"type\\\": \\\"Point\\\",\\r\\n \\\"coordinates\\\": [100.0, 0.0]\\r\\n },\\r\\n { \\\"type\\\": \\\"LineString\\\",\\r\\n \\\"coordinates\\\": [ [101.0, 0.0], [102.0, 1.0] ]\\r\\n }\\r\\n ]\\r\\n }"; + public static final String GeometryCollection = "{ \\\"type\\\": \\\"GeometryCollection\\\",\\r\\n \\\"geometries\\\": [\\r\\n { \\\"type\\\": \\\"Point\\\",\\r\\n \\\"coordinates\\\": [100.0, 0.0]\\r\\n },\\r\\n { \\\"type\\\": \\\"LineString\\\",\\r\\n \\\"coordinates\\\": [ [101.0, 0.0], [102.0, 1.0] ]\\r\\n }\\r\\n ]\\r\\n }"; public static final String FeatureCollection = "{ \"type\": \"FeatureCollection\",\r\n \"features\": [\r\n { \"type\": \"Feature\",\r\n \"geometry\": {\"type\": \"Point\", \"coordinates\": [102.0, 0.5]},\r\n \"properties\": {\"prop0\": \"value0\"}\r\n },\r\n { \"type\": \"Feature\",\r\n \"geometry\": {\r\n \"type\": \"LineString\",\r\n \"coordinates\": [\r\n [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]\r\n ]\r\n },\r\n \"properties\": {\r\n \"prop0\": \"value0\",\r\n \"prop1\": 0.0\r\n }\r\n },\r\n { \"type\": \"Feature\",\r\n \"geometry\": {\r\n \"type\": \"Polygon\",\r\n \"coordinates\": [\r\n [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],\r\n [100.0, 1.0], [100.0, 0.0] ]\r\n ]\r\n },\r\n \"properties\": {\r\n \"prop0\": \"value0\",\r\n \"prop1\": {\"this\": \"that\"}\r\n }\r\n }\r\n ]\r\n }";
