Difference between revisions of "Beanshell:Find features with repeated points"
Jump to navigation
Jump to search
(Created page with ' import com.vividsolutions.jump.feature.*; repeatedPoints(geometry) { geometry .coordinates .length - new HashSet(Arrays .asList(geometry .coordinates)) .size(); } debugF…') |
m |
||
| Line 1: | Line 1: | ||
| − | |||
import com.vividsolutions.jump.feature.*; | import com.vividsolutions.jump.feature.*; | ||
| − | + | ||
repeatedPoints(geometry) { | repeatedPoints(geometry) { | ||
geometry .coordinates .length - new HashSet(Arrays .asList(geometry .coordinates)) .size(); | geometry .coordinates .length - new HashSet(Arrays .asList(geometry .coordinates)) .size(); | ||
Latest revision as of 01:11, 12 October 2009
import com.vividsolutions.jump.feature.*;
repeatedPoints(geometry) {
geometry .coordinates .length - new HashSet(Arrays .asList(geometry .coordinates)) .size();
}
debugFC = wc .layerManager .getLayer("debug") .featureCollectionWrapper .ultimateWrappee;
for (feature : wc .layerManager .getLayer("navtech roads") .featureCollectionWrapper .features) {
BasicFeature debugFeature = new BasicFeature(debugFC.featureSchema);
debugFeature.setAttribute("GEOMETRY", feature.geometry);
debugFeature.setAttribute("REPEATEDPTS", repeatedPoints(feature.geometry));
debugFC.add(debugFeature);
}