Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Monday, July 19, 2004

Beanshell to convert single-LineString MultiLineStrings to LineStrings

for (feature : wc.layerManager.getLayer("CattaneoLayer").featureCollectionWrapper.features)
{
com.vividsolutions.jts.util.Assert.isTrue(feature.geometry.numGeometries
== 1);
feature.geometry = feature.geometry.getGeometryN(0);
}

0 Comments:

Post a Comment

<< Home