use of org.geotoolkit.gml.xml.LineStringProperty in project geotoolkit by Geomatys.
the class GeometryTransformer method convertMultiLineString.
private MultiLineString convertMultiLineString(final org.geotoolkit.gml.xml.MultiLineString mls) {
final LineString[] lss;
try {
lss = mls.getLineStringMember().stream().map(LineStringProperty::getLineString).map(ls -> new GeometryTransformer(ls, this).get()).map(LineString.class::cast).toArray(size -> new LineString[size]);
} catch (ClassCastException e) {
throw new UnconvertibleObjectException("Cannot create a multi-line string, because some of its components are not lines", e);
}
final MultiLineString result = GF.createMultiLineString(lss);
applyCRS(result);
return result;
}
Aggregations