use of org.geotoolkit.gml.xml.v311.EnvelopeType in project geotoolkit by Geomatys.
the class GeometrytoJTSTest method gmlEnvelopeToJTSTest2D.
@Test
public void gmlEnvelopeToJTSTest2D() throws Exception {
final EnvelopeType env = new EnvelopeType(new DirectPositionType(2.0, 2.0), new DirectPositionType(4.0, 4.0), "EPSG:4326");
final Geometry geom = GeometrytoJTS.toJTS(env);
Coordinate[] expectedPoints = { new Coordinate(2.0, 2.0), new Coordinate(2.0, 4.0), new Coordinate(4.0, 4.0), new Coordinate(4.0, 2.0), new Coordinate(2.0, 2.0) };
Assert.assertTrue(GF.createPolygon(expectedPoints).equalsTopo(geom));
}
Aggregations