public class JTSUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Logger |
logger |
Constructor and Description |
---|
JTSUtils() |
Modifier and Type | Method and Description |
---|---|
static com.vividsolutions.jts.geom.Geometry |
convertTypes(com.vividsolutions.jts.geom.Geometry g,
int sourceType,
int destinationType)
This function is called when the we need force types, that is the
destination
type does not match with the input geometry type
|
static Geometry |
createGeometry(com.vividsolutions.jts.geom.Geometry jtsGeom) |
static LinearRing |
createJTSLinearRing(CoordinateSequence coordinates) |
static LineString |
createJTSLineString(CoordinateSequence coordinates) |
static LineString |
createJTSLineStringFromArcPoints(Point centre,
double radius,
double startAngle,
double endAngle) |
static MultiLineString |
createJTSMultiLineString(LineString[] lineStrings) |
static MultiPoint |
createJTSMultiPoint(CoordinateSequence coordinates) |
static com.vividsolutions.jts.geom.MultiPolygon |
createJTSMultiPolygon(com.vividsolutions.jts.geom.Polygon[] polygons) |
static com.vividsolutions.jts.geom.Geometry |
createJTSPoint(Coordinate coordinate) |
static com.vividsolutions.jts.geom.Polygon |
createJTSPolygon(ArrayListCoordinateSequence coordinates) |
static com.vividsolutions.jts.geom.Polygon |
createJTSPolygon(ArrayListCoordinateSequence coordinates,
List<Ring> interiorRings) |
static com.vividsolutions.jts.geom.Geometry |
createJTSPolygon(Coordinate[] coordinates) |
static MCoordinate |
createMCoordinate(double x,
double y,
double m) |
static MCoordinate |
createMCoordinate(double x,
double y,
double z,
double m) |
static Point |
createPoint(GeometryType type,
Coordinate coordinate) |
static BufferParameters |
getBufferParameters() |
static Coordinate |
getCircumcentre(Point init,
Point middle,
Point end) |
static com.vividsolutions.jts.geom.GeometryFactory |
getFactory(Coordinate coordinate) |
static com.vividsolutions.jts.geom.GeometryFactory |
getFactory(Coordinate[] coordinates) |
static com.vividsolutions.jts.geom.GeometryFactory |
getFactory(CoordinateSequence coordinates) |
static Coordinate |
getMidPoint(Point init,
Point end)
Returns the middle point between two points.
|
static Coordinate |
getPointAtYAxisInEllipse(Point init,
Point end,
Double ydist)
Returns the intersection point between an ellipse and her minor axis.
|
static Geometry |
offsetClosedLine(ArrayListCoordinateSequence coordinates,
double distance)
Creates a offset from a closed line at a distance
|
static Geometry |
offsetRawOpenLine(ArrayListCoordinateSequence coordinates,
double distance)
Creates a raw offset of a open line at a distance.
|
static double |
straightLineThroughTwoPointsEquation(double x1,
double x2,
double y1,
double y2,
double x) |
public static Point createPoint(GeometryType type, Coordinate coordinate) throws CreateGeometryException
CreateGeometryException
public static com.vividsolutions.jts.geom.GeometryFactory getFactory(CoordinateSequence coordinates)
public static com.vividsolutions.jts.geom.GeometryFactory getFactory(Coordinate coordinate)
public static com.vividsolutions.jts.geom.GeometryFactory getFactory(Coordinate[] coordinates)
public static LineString createJTSLineString(CoordinateSequence coordinates)
public static LinearRing createJTSLinearRing(CoordinateSequence coordinates)
public static MultiPoint createJTSMultiPoint(CoordinateSequence coordinates)
public static Geometry createGeometry(com.vividsolutions.jts.geom.Geometry jtsGeom)
public static com.vividsolutions.jts.geom.Geometry convertTypes(com.vividsolutions.jts.geom.Geometry g, int sourceType, int destinationType)
g
- sourceType
- destinationType
- public static MCoordinate createMCoordinate(double x, double y, double m)
public static MCoordinate createMCoordinate(double x, double y, double z, double m)
public static Coordinate getCircumcentre(Point init, Point middle, Point end)
init
- middle
- end
- public static LineString createJTSLineStringFromArcPoints(Point centre, double radius, double startAngle, double endAngle)
public static MultiLineString createJTSMultiLineString(LineString[] lineStrings)
public static com.vividsolutions.jts.geom.Polygon createJTSPolygon(ArrayListCoordinateSequence coordinates, List<Ring> interiorRings)
coordinates
- interiorRings
- GeometryException
public static com.vividsolutions.jts.geom.Polygon createJTSPolygon(ArrayListCoordinateSequence coordinates)
coordinates
- GeometryException
public static com.vividsolutions.jts.geom.MultiPolygon createJTSMultiPolygon(com.vividsolutions.jts.geom.Polygon[] polygons)
public static Coordinate getPointAtYAxisInEllipse(Point init, Point end, Double ydist)
init
- middle
- end
- public static Coordinate getMidPoint(Point init, Point end)
init
- middle
- end
- public static com.vividsolutions.jts.geom.Geometry createJTSPoint(Coordinate coordinate)
coordinate
- public static com.vividsolutions.jts.geom.Geometry createJTSPolygon(Coordinate[] coordinates)
coord
- public static BufferParameters getBufferParameters()
public static Geometry offsetClosedLine(ArrayListCoordinateSequence coordinates, double distance)
distance
- public static Geometry offsetRawOpenLine(ArrayListCoordinateSequence coordinates, double distance)
coordinates
- distance
- public static double straightLineThroughTwoPointsEquation(double x1, double x2, double y1, double y2, double x)