|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.geometry.JTS
JTS Geometry utility methods, bringing geotools to JTS.
Offers geotools based services such as reprojection.
Responsibilities:
Nested Class Summary | |
static class |
JTS.ReferencedEnvelope
|
Constructor Summary | |
JTS()
|
Method Summary | |
static JTS.ReferencedEnvelope |
create(com.vividsolutions.jts.geom.Envelope env,
org.opengis.referencing.crs.CoordinateReferenceSystem crs)
|
static GeometryCoordinateSequenceTransformer |
createGeometryTransformer()
Creates a GeometryCoordinateSequenceTransformer. |
static GeometryCoordinateSequenceTransformer |
createPreciseGeometryTransformer(double flatness)
Creates a GeometryCoordinateSequenceTransformer. |
static com.vividsolutions.jts.geom.Envelope |
empty()
|
static com.vividsolutions.jts.geom.Geometry |
preciseTransform(com.vividsolutions.jts.geom.Geometry geom,
double flatness,
org.opengis.referencing.operation.MathTransform transform)
Transforms the geometry using the Precise transformer. |
static com.vividsolutions.jts.geom.Envelope |
toGeographic(com.vividsolutions.jts.geom.Envelope env,
org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Transforms the envelope from its current crs to WGS84 coordinate system. |
static com.vividsolutions.jts.geom.Coordinate |
transform(com.vividsolutions.jts.geom.Coordinate source,
com.vividsolutions.jts.geom.Coordinate dest,
org.opengis.referencing.operation.MathTransform transform)
Transforms the coordinate using the provided math transform. |
static com.vividsolutions.jts.geom.Envelope |
transform(com.vividsolutions.jts.geom.Envelope envelope,
org.opengis.referencing.operation.MathTransform transform)
Transforms the Envelope using the MathTransform. |
static com.vividsolutions.jts.geom.Envelope |
transform(com.vividsolutions.jts.geom.Envelope envelope,
org.opengis.referencing.operation.MathTransform transform,
int npoints)
Transforms the Envelope using the MathTransform. |
static com.vividsolutions.jts.geom.Geometry |
transform(com.vividsolutions.jts.geom.Geometry geom,
org.opengis.referencing.operation.MathTransform transform)
Transforms the geometry using the default transformer. |
static JTS.ReferencedEnvelope |
transform(JTS.ReferencedEnvelope envelope,
org.opengis.referencing.crs.CoordinateReferenceSystem crs,
boolean lenient)
|
static void |
xform(org.opengis.referencing.operation.MathTransform mt,
double[] src,
double[] dest,
int dimensions)
Like a transform but eXtreme! |
static void |
xform(org.opengis.referencing.operation.MathTransform mt,
double[] src,
double[] dest,
int dimensions,
float failureThreshold)
Like a transform but eXtreme! |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JTS()
Method Detail |
public static com.vividsolutions.jts.geom.Envelope empty()
public static JTS.ReferencedEnvelope create(com.vividsolutions.jts.geom.Envelope env, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
public static com.vividsolutions.jts.geom.Envelope transform(com.vividsolutions.jts.geom.Envelope envelope, org.opengis.referencing.operation.MathTransform transform, int npoints) throws org.opengis.referencing.operation.TransformException
envelope
- the envelope to transformtransform
- the transformation to usenpoints
- decification of each side of the rectange.
org.opengis.referencing.operation.TransformException
public static void xform(org.opengis.referencing.operation.MathTransform mt, double[] src, double[] dest, int dimensions) throws org.opengis.referencing.operation.TransformException
mt
- src
- dest
-
org.opengis.referencing.operation.TransformException
public static void xform(org.opengis.referencing.operation.MathTransform mt, double[] src, double[] dest, int dimensions, float failureThreshold) throws org.opengis.referencing.operation.TransformException
mt
- src
- dest
-
org.opengis.referencing.operation.TransformException
public static com.vividsolutions.jts.geom.Envelope transform(com.vividsolutions.jts.geom.Envelope envelope, org.opengis.referencing.operation.MathTransform transform) throws org.opengis.referencing.operation.TransformException
envelope
- the envelope to transformtransform
- the transformation to use
org.opengis.referencing.operation.TransformException
public static JTS.ReferencedEnvelope transform(JTS.ReferencedEnvelope envelope, org.opengis.referencing.crs.CoordinateReferenceSystem crs, boolean lenient) throws org.opengis.referencing.operation.TransformException, org.opengis.referencing.operation.OperationNotFoundException, java.util.NoSuchElementException, org.opengis.referencing.FactoryException
org.opengis.referencing.operation.TransformException
org.opengis.referencing.operation.OperationNotFoundException
java.util.NoSuchElementException
org.opengis.referencing.FactoryException
public static GeometryCoordinateSequenceTransformer createGeometryTransformer()
public static GeometryCoordinateSequenceTransformer createPreciseGeometryTransformer(double flatness)
flatness
- The error in the transform is linked to the "flattening", the higher the flattening,
the bigger the error, but also, the lesser the number of points that will be used
to represent the resulting coordinate sequence.
public static com.vividsolutions.jts.geom.Geometry transform(com.vividsolutions.jts.geom.Geometry geom, org.opengis.referencing.operation.MathTransform transform) throws org.opengis.spatialschema.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException
geom
- The geom to transformtransform
- the transform to use during the transformation.
org.opengis.spatialschema.geometry.MismatchedDimensionException
org.opengis.referencing.operation.TransformException
public static com.vividsolutions.jts.geom.Geometry preciseTransform(com.vividsolutions.jts.geom.Geometry geom, double flatness, org.opengis.referencing.operation.MathTransform transform) throws org.opengis.spatialschema.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException
geom
- The geom to transformflatness
- the "flatness" of the new geometry. Higher is more accurate but has more vertices.transform
- the transform to use during the transformation.
org.opengis.spatialschema.geometry.MismatchedDimensionException
org.opengis.referencing.operation.TransformException
public static com.vividsolutions.jts.geom.Coordinate transform(com.vividsolutions.jts.geom.Coordinate source, com.vividsolutions.jts.geom.Coordinate dest, org.opengis.referencing.operation.MathTransform transform) throws org.opengis.referencing.operation.TransformException
source
- the source coordinate that will be transformeddest
- the coordinate that will be set. May be null or the source coordinate (or new coordinate of course).
return the destination coordinate if not null or a new Coordinate.
org.opengis.referencing.operation.TransformException
public static com.vividsolutions.jts.geom.Envelope toGeographic(com.vividsolutions.jts.geom.Envelope env, org.opengis.referencing.crs.CoordinateReferenceSystem crs) throws org.opengis.referencing.operation.OperationNotFoundException, java.util.NoSuchElementException, org.opengis.referencing.FactoryException, org.opengis.referencing.operation.TransformException
env
- The envelope to transform.crs
- The CRS the envelope is currently in.
org.opengis.referencing.operation.OperationNotFoundException
java.util.NoSuchElementException
org.opengis.referencing.FactoryException
org.opengis.referencing.operation.TransformException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |