public class LineNoSelfOverlappingValidation extends DefaultFeatureValidation
Tests to see if a LineString overlaps itself. It does this by breaking up the LineString into two point segments then intersects them all. If a segment has both of its points on another segment, then they overlap. This is not true in all cases and this method has to be rewritten. If a segment spans two segments, this method will say that they do not overlap when clearly they do.
ALL, PRIORITY_COMPLEX, PRIORITY_INVOLVED, PRIORITY_SIMPLE, PRIORITY_TRIVIAL| Constructor and Description |
|---|
LineNoSelfOverlappingValidation()
LineNoSelfOverlappingFeatureValidation constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getPriority()
Override getPriority.
|
boolean |
validate(SimpleFeature feature,
SimpleFeatureType type,
ValidationResults results)
Tests to see if a LineString overlaps itself.
|
getDefaultLineString, getDescription, getName, getTypeRef, getTypeRefs, setDescription, setName, setTypeRefpublic LineNoSelfOverlappingValidation()
Description
public int getPriority()
Sets the priority level of this validation.
getPriority in interface ValidationgetPriority in class DefaultFeatureValidationValidation.getPriority()public boolean validate(SimpleFeature feature, SimpleFeatureType type, ValidationResults results)
It does this by breaking up the LineString into two point segments then intersects them all. If a segment has both of its points on another segment, then they overlap. This is not true in all cases and this method has to be rewritten. If a segment spans two segments, this method will say that they do not overlap when clearly they do.
validate in interface FeatureValidationvalidate in class DefaultFeatureValidationfeature - The Feature to be validatedtype - The FeatureTypeInfo of the featureresults - The storage for error messages.org.geotools.validation.FeatureValidation#validate(org.geotools.feature.Feature,
org.geotools.feature.FeatureTypeInfo, org.geotools.validation.ValidationResults)Copyright © 1996–2019 Geotools. All rights reserved.