Search in sources :

Example 26 with LineString

use of com.vividsolutions.jts.geom.LineString in project ddf by codice.

the class Wfs20JTStoGML321Converter method convertToMultiLineStringType.

// MultiLineStringType maps to MultiCurveType in opengis API
public static MultiCurveType convertToMultiLineStringType(MultiLineString multiLineString, String srsName) {
    final MultiCurveType multiCurveType = GML320_OBJECT_FACTORY.createMultiCurveType();
    for (int index = 0; index < multiLineString.getNumGeometries(); index++) {
        final LineString lineString = (LineString) multiLineString.getGeometryN(index);
        multiCurveType.getCurveMember().add(createCurvePropertyType(lineString));
    }
    multiCurveType.setSrsName(srsName);
    return multiCurveType;
}
Also used : MultiCurveType(net.opengis.gml.v_3_2_1.MultiCurveType) LineString(com.vividsolutions.jts.geom.LineString) MultiLineString(com.vividsolutions.jts.geom.MultiLineString) Point(com.vividsolutions.jts.geom.Point) MultiPoint(com.vividsolutions.jts.geom.MultiPoint)

Aggregations

LineString (com.vividsolutions.jts.geom.LineString)26 MultiLineString (com.vividsolutions.jts.geom.MultiLineString)15 Point (com.vividsolutions.jts.geom.Point)12 Coordinate (com.vividsolutions.jts.geom.Coordinate)9 Geometry (com.vividsolutions.jts.geom.Geometry)7 MultiPoint (com.vividsolutions.jts.geom.MultiPoint)7 Polygon (com.vividsolutions.jts.geom.Polygon)7 Test (org.junit.Test)5 ArrayList (java.util.ArrayList)4 GeometryCollection (com.vividsolutions.jts.geom.GeometryCollection)3 LineStringType (ogc.schema.opengis.gml.v_2_1_2.LineStringType)3 MultiLineStringType (ogc.schema.opengis.gml.v_2_1_2.MultiLineStringType)3 CoordinatesBuilder (org.elasticsearch.common.geo.builders.CoordinatesBuilder)3 XContentBuilder (org.elasticsearch.common.xcontent.XContentBuilder)3 ElasticsearchGeoAssertions.assertMultiLineString (org.elasticsearch.test.hamcrest.ElasticsearchGeoAssertions.assertMultiLineString)3 ElasticsearchGeoAssertions.assertMultiPolygon (org.elasticsearch.test.hamcrest.ElasticsearchGeoAssertions.assertMultiPolygon)3 ElasticsearchGeoAssertions.assertPolygon (org.elasticsearch.test.hamcrest.ElasticsearchGeoAssertions.assertPolygon)3 MultiPolygon (com.vividsolutions.jts.geom.MultiPolygon)2 ParseException (com.vividsolutions.jts.io.ParseException)2 MultiCurveType (net.opengis.gml.v_3_2_1.MultiCurveType)2