use of org.geotoolkit.gml.xml.v311.DirectPositionType in project geotoolkit by Geomatys.
the class GeometrytoJTSTest method gmlPointToJTSTest3D.
@Test
public void gmlPointToJTSTest3D() throws Exception {
Point expected = GF.createPoint(new Coordinate(0, 1, 1));
expected.setSRID(2154);
PointType gml = new PointType(new DirectPositionType(0.0, 1.0, 1.0));
final Geometry result = GeometrytoJTS.toJTS(gml);
Assert.assertEquals(expected, result);
}
use of org.geotoolkit.gml.xml.v311.DirectPositionType 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