public final class GeometryFactory extends Object
| Modifier and Type | Method and Description |
|---|---|
static GeometryFactory |
forCoordSys(CoordSys coordSys)
Creates a new geometry factory for the given coordinate system.
|
static GeometryFactory |
forCoordSysCode(Code code)
Creates a new geometry factory for the coordinate system identified by
the given coordinate system code.
|
static GeometryFactory |
forSpatialInfo(SpatialInfo spatialInfo)
Creates a new geometry factory for the given spatial info object.
|
static GeometryFactory |
forSrsName(String srsName)
Creates a new geometry factory for the coordinate system identified by
the given spatial reference system (SRS) name.
|
CurveBuilder |
newCurve()
Creates a new builder to facilitate the construction of a new curve.
|
ILineString |
newLineString(com.mapinfo.midev.geometry.DirectPosition... positions)
Creates a line string from the given array of direct positions.
|
ILineString |
newLineString(IDirectPositionList positions)
Creates a line string from a given direct position list.
|
ILineString |
newLineString(Iterable<com.mapinfo.midev.geometry.DirectPosition> positions)
Creates a line string from an iterable data structure of direct
positions.
|
MultiCurveBuilder |
newMultiCurve()
Creates a new builder to facilitate the construction of a new multi-curve.
|
MultiPointBuilder |
newMultiPoint()
Creates a new multi-point builder, which can be used to add points in
multiple separate method calls.
|
IMultiPoint |
newMultiPoint(com.mapinfo.midev.geometry.DirectPosition... positions)
Creates a multi-point from an array of direct positions.
|
IMultiPoint |
newMultiPoint(IDirectPositionList positions)
Creates a multi-point from a direct position list.
|
IMultiPoint |
newMultiPoint(Iterable<com.mapinfo.midev.geometry.DirectPosition> positions)
Creates a multi-point from an iterable data structure of direct
positions.
|
MultiPolygonBuilder |
newMultiPolygon()
Creates a new builder to facilitate the construction of a new
multi-polygon.
|
IPoint |
newPoint(com.mapinfo.midev.geometry.DirectPosition directPosition)
Creates a new point using a direct position object.
|
IPoint |
newPoint(double x,
double y)
Creates a new point for the given x and y coordinates.
|
IPoint |
newPoint(String x,
String y)
Creates a new point for the given x and y coordinates.
|
IPolygonBuilder<IPolygon> |
newPolygon()
Creates a new builder to facilitate the construction of a new polygon.
|
static com.mapinfo.midev.geometry.DirectPosition |
pos(double x,
double y)
Creates a new direct position from the given x and y coordinate values.
|
static com.mapinfo.midev.geometry.DirectPosition |
pos(String x,
String y)
Creates a new direct position from the given x and y coordinate values.
|
static IDirectPositionList |
posList(com.mapinfo.midev.geometry.DirectPosition... positions)
Creates a new direct position list from the given array of direct
positions.
|
public static GeometryFactory forSrsName(String srsName)
srsName - a string value identifying a coordinate system.UnknownSRSNameException - if the given srsName is unknown.public static GeometryFactory forCoordSysCode(Code code)
code - a code object identifying a coordinate system.UnknownCodeException - if the given code is unknown.public static GeometryFactory forCoordSys(CoordSys coordSys)
coordSys - the coordinate system to create a new geometry factory
instance forpublic static GeometryFactory forSpatialInfo(SpatialInfo spatialInfo)
spatialInfo - a spatial info object encapsulating the coordinate
system to create a new geometry factory
instance forpublic IPoint newPoint(double x, double y)
x - the x coordinate for the new pointy - the y coordinate for the new pointpublic IPoint newPoint(String x, String y)
x - the x coordinate for the new pointy - the y coordinate for the new pointNumberFormatException - if any of the coordinate values cannot be
parsed into a double valueNullPointerException - if any of the coordinate values is
null.public IPoint newPoint(com.mapinfo.midev.geometry.DirectPosition directPosition)
directPosition - the direct position to create a new point for.public IMultiPoint newMultiPoint(com.mapinfo.midev.geometry.DirectPosition... positions)
positions - an array of direct positionspublic IMultiPoint newMultiPoint(Iterable<com.mapinfo.midev.geometry.DirectPosition> positions)
positions - an iterable data structurepublic IMultiPoint newMultiPoint(IDirectPositionList positions)
positions - a direct position list containing the points to create
a new multi-point from.public MultiPointBuilder newMultiPoint()
public ILineString newLineString(com.mapinfo.midev.geometry.DirectPosition... positions)
positions - a non-empty array of direct positions.public ILineString newLineString(Iterable<com.mapinfo.midev.geometry.DirectPosition> positions)
positions - an iterable data structure of direct positions.public ILineString newLineString(IDirectPositionList positions)
positions - a direct position list.public CurveBuilder newCurve()
public MultiCurveBuilder newMultiCurve()
public IPolygonBuilder<IPolygon> newPolygon()
public MultiPolygonBuilder newMultiPolygon()
public static com.mapinfo.midev.geometry.DirectPosition pos(double x,
double y)
x - the x coordinate for the new direct positiony - the y coordinate for the new direct positionpublic static com.mapinfo.midev.geometry.DirectPosition pos(String x, String y)
x - the x coordinate for the new direct positiony - the y coordinate for the new direct positionNumberFormatException - if any of the coordinate values cannot be
parsed into a double value.NullPointerException - if any of the coordinate values is
nullpublic static IDirectPositionList posList(com.mapinfo.midev.geometry.DirectPosition... positions)
positions - an array of direct positions.positions parameter.