| java.lang.Object com.vividsolutions.jump.util.CoordinateArrays
CoordinateArrays | public class CoordinateArrays (Code) | | Some utility functions for handling Coordinate arrays.
|
Method Summary | |
public static void | addCoordinateArrays(Geometry g, boolean orientPolygons, List coordArrayList) Extract the coordinate arrays for a geometry into a List. | public static Coordinate[] | ensureOrientation(Coordinate[] coord, int desiredOrientation) Sets the orientation of an array of coordinates. | public static boolean | equals(Coordinate[] coord1, Coordinate[] coord2) | public static List | fromCoordinateArrays(List coordArrays, GeometryFactory fact) Converts a collection of coordinate arrays to a collection of geometries. | public static void | reverse(Coordinate[] coord) | public static Coordinate[] | toCoordinateArray(List coordList) | public static List | toCoordinateArrays(Geometry g, boolean orientPolygons) Extract the coordinate arrays for a geometry. | public static Geometry | toLineOrPoint(Coordinate[] coords, GeometryFactory fact) Converts an array of coordinates to a line or point, as appropriate. |
addCoordinateArrays | public static void addCoordinateArrays(Geometry g, boolean orientPolygons, List coordArrayList)(Code) | | Extract the coordinate arrays for a geometry into a List.
Parameters: g - the Geometry to extract from Parameters: coordArrayList - the List to add the coordinate arrays to Parameters: orientPolygons - whether or not the arrays in the List should beoriented (clockwise for the shell, counterclockwise for the holes) |
ensureOrientation | public static Coordinate[] ensureOrientation(Coordinate[] coord, int desiredOrientation)(Code) | | Sets the orientation of an array of coordinates.
Parameters: coord - the coordinates to inspect Parameters: desiredOrientation - CGAlgorithms.CLOCKWISE or CGAlgorithms.COUNTERCLOCKWISE a new array with entries in reverse order, if the orientation isincorrect; otherwise, the original array |
equals | public static boolean equals(Coordinate[] coord1, Coordinate[] coord2)(Code) | | |
fromCoordinateArrays | public static List fromCoordinateArrays(List coordArrays, GeometryFactory fact)(Code) | | Converts a collection of coordinate arrays to a collection of geometries.
Parameters: coordArrays - a collection of Coordinate[] Parameters: fact - a factory used to create the Geometries a collection of LineStrings and Points |
reverse | public static void reverse(Coordinate[] coord)(Code) | | |
toCoordinateArray | public static Coordinate[] toCoordinateArray(List coordList)(Code) | | |
toCoordinateArrays | public static List toCoordinateArrays(Geometry g, boolean orientPolygons)(Code) | | Extract the coordinate arrays for a geometry.
Polygons will be checked to ensure their rings are oriented correctly.
Note: coordinates from Points or MultiPoints will not be extracted.
Parameters: g - the Geometry to extract from Parameters: orientPolygons - ensure that Polygons are correctly oriented a list of Coordinate[] |
toLineOrPoint | public static Geometry toLineOrPoint(Coordinate[] coords, GeometryFactory fact)(Code) | | Converts an array of coordinates to a line or point, as appropriate.
Parameters: coords - the coordinates of a line or point Parameters: fact - a factory used to create the Geometry a line if there is more than one coordinate; a point if there isjust one coordinate; an empty point otherwise |
|
|