public static enum JtsWktShapeParser.ValidationRule extends Enum<JtsWktShapeParser.ValidationRule>
Enum Constant and Description |
---|
error
Geometries will be explicitly validated on creation, possibly resulting in an exception:
InvalidShapeException . |
none
Geometries will not be validated (because it's kinda expensive to calculate).
|
repairBuffer0
Invalid polygons are repaired using the
buffer(0) technique. |
repairConvexHull
Invalid Geometries are repaired by taking the convex hull.
|
Modifier and Type | Method and Description |
---|---|
static JtsWktShapeParser.ValidationRule |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JtsWktShapeParser.ValidationRule[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JtsWktShapeParser.ValidationRule none
Geometry.isValid().
public static final JtsWktShapeParser.ValidationRule error
InvalidShapeException
.public static final JtsWktShapeParser.ValidationRule repairConvexHull
Geometry.convexHull()
.public static final JtsWktShapeParser.ValidationRule repairBuffer0
buffer(0)
technique. From the JTS FAQ:
The buffer operation is fairly insensitive to topological invalidity, and the act of computing the buffer can often resolve minor issues such as self-intersecting rings. However, in some situations the computed result may not be what is desired (i.e. the buffer operation may be "confused" by certain topologies, and fail to produce a result which is close to the original. An example where this can happen is a "bow-tie: or "figure-8" polygon, with one very small lobe and one large one. Depending on the orientations of the lobes, the buffer(0) operation may keep the small lobe and discard the "valid" large lobe).
public static JtsWktShapeParser.ValidationRule[] values()
for (JtsWktShapeParser.ValidationRule c : JtsWktShapeParser.ValidationRule.values()) System.out.println(c);
public static JtsWktShapeParser.ValidationRule valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2018 LocationTech. All rights reserved.