|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.geometry.JTS
org.geotools.geometry.jts
package. We hope to keep
JTS dependencies in their own package, in order to use other packages for a partial
(if accepted by the communauty) ISO 19107 implementation in a future Geotools
release.
JTS Geometry utility methods, bringing geotools to JTS.
Offers geotools based services such as reprojection.
Responsibilities:
Nested Class Summary | |
static class |
JTS.ReferencedEnvelope
Deprecated. Moved to ReferencedEnvelope . |
Method Summary | |
static JTS.ReferencedEnvelope |
create(com.vividsolutions.jts.geom.Envelope env,
org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Deprecated. ReferencedEnvelope provides more constructors,
and not all of them are listed in this factory. |
static GeometryCoordinateSequenceTransformer |
createGeometryTransformer()
Deprecated. Creates a GeometryCoordinateSequenceTransformer. |
static GeometryCoordinateSequenceTransformer |
createPreciseGeometryTransformer(double flatness)
Deprecated. Creates a GeometryCoordinateSequenceTransformer. |
static com.vividsolutions.jts.geom.Envelope |
empty()
Deprecated. JTS 1.5 source code inspection show that already invokes Envelope.setToNull() , so this method actually seems to add overhead. |
static com.vividsolutions.jts.geom.Geometry |
preciseTransform(com.vividsolutions.jts.geom.Geometry geom,
double flatness,
org.opengis.referencing.operation.MathTransform transform)
Deprecated. 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)
Deprecated. This method suffers from the same precision problem than transform(Envelope,MathTransform) . Consider using
JTS.toGeographic(com.vividsolutions.jts.geom.Envelope, org.opengis.referencing.crs.CoordinateReferenceSystem) instead. |
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)
Deprecated. 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)
Deprecated. This implementation gives unaccurate results for transformations more complicated than scales and translations. It should transform at least the four corners (it currently transforms only 2 corners), preferably more. Consider using JTS.transform(Envelope,MathTransform) instead,
which transform a densified envelope. |
static com.vividsolutions.jts.geom.Envelope |
transform(com.vividsolutions.jts.geom.Envelope envelope,
org.opengis.referencing.operation.MathTransform transform,
int npoints)
Deprecated. JTS should provides a slightly more efficient
implementation. |
static com.vividsolutions.jts.geom.Geometry |
transform(com.vividsolutions.jts.geom.Geometry geom,
org.opengis.referencing.operation.MathTransform transform)
Deprecated. Transforms the geometry using the default transformer. |
static JTS.ReferencedEnvelope |
transform(JTS.ReferencedEnvelope envelope,
org.opengis.referencing.crs.CoordinateReferenceSystem crs,
boolean lenient)
Deprecated. Moved to ReferencedEnvelope.transform(org.opengis.referencing.crs.CoordinateReferenceSystem, boolean) ,
as a class member. |
static void |
xform(org.opengis.referencing.operation.MathTransform mt,
double[] src,
double[] dest,
int dimensions)
Deprecated. Like a transform but eXtreme! |
static void |
xform(org.opengis.referencing.operation.MathTransform mt,
double[] src,
double[] dest,
int dimensions,
float failureThreshold)
Deprecated. This implementation do not copies last coordinate correctly transformed as the javadoc said. Consider using JTS instead. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static com.vividsolutions.jts.geom.Envelope empty()
Envelope.setToNull()
, so this method actually seems to add overhead.
public static JTS.ReferencedEnvelope create(com.vividsolutions.jts.geom.Envelope env, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
ReferencedEnvelope
provides more constructors,
and not all of them are listed in this factory.
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
JTS
should provides a slightly more efficient
implementation.
envelope
- the envelope to transform.transform
- the transform to use.npoints
- densification of each side of the rectange.
org.opengis.referencing.operation.TransformException
- if a coordinate can't be transformed.public static void xform(org.opengis.referencing.operation.MathTransform mt, double[] src, double[] dest, int dimensions) throws org.opengis.referencing.operation.TransformException
mt
- The math transform to apply.src
- The source coordinates.dest
- The destination array for transformed coordinates.
org.opengis.referencing.operation.TransformException
- if this method failed to transform any of the points.public static void xform(org.opengis.referencing.operation.MathTransform mt, double[] src, double[] dest, int dimensions, float failureThreshold) throws org.opengis.referencing.operation.TransformException
JTS
instead.
mt
- The math transform to apply.src
- The source coordinates.dest
- The destination array for transformed coordinates.failureThreshold
- Ignored for now.
org.opengis.referencing.operation.TransformException
- if this method failed to transform any of the points.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
JTS.transform(Envelope,MathTransform)
instead,
which transform a densified envelope.
envelope
- the envelope to transform.transform
- the transform to use.
org.opengis.referencing.operation.TransformException
- if at least one coordinate can't be transformed.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
ReferencedEnvelope.transform(org.opengis.referencing.crs.CoordinateReferenceSystem, boolean)
,
as a class member.
envelope
- the envelope to transform.crs
- The target coordinate reference system.lenient
- if datum shift should be applied even if there is insuffisient
information. Otherwise (if ), an exception is thrown in such case.
org.opengis.referencing.operation.TransformException
- if at least one coordinate can't be transformed.
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
- if the geometry doesn't have the expected dimension
for the specified transform.
org.opengis.referencing.operation.TransformException
- if a point can't be transformed.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
- if the geometry doesn't have the expected dimension
for the specified transform.
org.opengis.referencing.operation.TransformException
- if a point can't be transformed.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).
org.opengis.referencing.operation.TransformException
- if the coordinate can't be transformed.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
transform(Envelope,MathTransform)
. Consider using
JTS.toGeographic(com.vividsolutions.jts.geom.Envelope, org.opengis.referencing.crs.CoordinateReferenceSystem)
instead.
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 |