Package org.locationtech.jts.io.geojson
Class OrientationTransformer
- java.lang.Object
-
- org.locationtech.jts.io.geojson.OrientationTransformer
-
public class OrientationTransformer extends java.lang.Object
Utilities to modify the ring orientation of polygonal geometries.
-
-
Constructor Summary
Constructors Constructor Description OrientationTransformer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Geometry
transformCCW(Geometry geometry)
Transforms a geometry using the Right Hand Rule specifications defined in the latest GeoJSON specification.static LinearRing
transformCCW(LinearRing ring, boolean isExteriorRing)
Transforms a polygon using the Right Hand Rule specifications defined in the latest GeoJSON specification.static Polygon
transformCCW(Polygon polygon)
Transforms a polygon using the Right Hand Rule specifications defined in the latest GeoJSON specification.
-
-
-
Method Detail
-
transformCCW
public static Geometry transformCCW(Geometry geometry)
Transforms a geometry using the Right Hand Rule specifications defined in the latest GeoJSON specification. See RFC-7946 Specification for more context.- Parameters:
geometry
- to be transformed- Returns:
- Geometry under the Right Hand Rule specifications
-
transformCCW
public static Polygon transformCCW(Polygon polygon)
Transforms a polygon using the Right Hand Rule specifications defined in the latest GeoJSON specification. See RFC-7946 Specification for more context.- Parameters:
polygon
- to be transformed- Returns:
- Polygon under the Right Hand Rule specifications
-
transformCCW
public static LinearRing transformCCW(LinearRing ring, boolean isExteriorRing)
Transforms a polygon using the Right Hand Rule specifications defined in the latest GeoJSON specification. A linear ring MUST follow the right-hand rule with respect to the area it bounds, i.e., exterior rings are counterclockwise, and holes are clockwise. See RFC 7946 Specification for more context.- Parameters:
ring
- the LinearRing, a constraint specific to PolygonsisExteriorRing
- true if the LinearRing is the exterior polygon ring, the one that defines the boundary- Returns:
- LinearRing under the Right Hand Rule specifications
-
-