Class ProjectGeometryOp.Projected
- Enclosing class:
- ProjectGeometryOp
Contains a source Geometry
and the same geometry re-projected to a gridded CRS.
Useful when geometries need to be measured or segmented.
-
Constructor Summary
ConstructorDescriptionProjected
(org.locationtech.jts.geom.Geometry source, org.geotools.api.referencing.crs.CoordinateReferenceSystem sourceCrs, org.locationtech.jts.geom.Geometry projected, org.geotools.api.referencing.crs.CoordinateReferenceSystem projectedCrs, org.geotools.api.referencing.operation.MathTransform projectedToSource) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
org.locationtech.jts.geom.Geometry
A projected form ofgetSource()
.org.geotools.api.referencing.crs.CoordinateReferenceSystem
TheCoordinateReferenceSystem
ofgetProjected()
.org.geotools.api.referencing.operation.MathTransform
AMathTransform
that is able to return projected geometries back togetSourceCrs()
.org.locationtech.jts.geom.Geometry
The originalGeometry
org.geotools.api.referencing.crs.CoordinateReferenceSystem
TheCoordinateReferenceSystem
ofgetSource()
int
hashCode()
org.locationtech.jts.geom.Geometry
projectAlso
(org.locationtech.jts.geom.Geometry geom) Helper to bring another geometry into the same projected CRS asgetProjected()
.org.locationtech.jts.geom.Geometry
toSourceCrs
(org.locationtech.jts.geom.Geometry geom) Re-projects theGeometry
(which is expected to be in the projected CRS) back togetSourceCrs()
.toString()
-
Constructor Details
-
Projected
public Projected(org.locationtech.jts.geom.Geometry source, org.geotools.api.referencing.crs.CoordinateReferenceSystem sourceCrs, org.locationtech.jts.geom.Geometry projected, org.geotools.api.referencing.crs.CoordinateReferenceSystem projectedCrs, org.geotools.api.referencing.operation.MathTransform projectedToSource)
-
-
Method Details
-
toSourceCrs
public org.locationtech.jts.geom.Geometry toSourceCrs(org.locationtech.jts.geom.Geometry geom) Re-projects the
Geometry
(which is expected to be in the projected CRS) back togetSourceCrs()
.- Parameters:
geom
-- Returns:
- Geometry
-
projectAlso
public org.locationtech.jts.geom.Geometry projectAlso(org.locationtech.jts.geom.Geometry geom) Helper to bring another geometry into the same projected CRS as
getProjected()
. This is useful when there are two or more geometries required for a given operation, such as union or difference.- Returns:
- the
geom
transformed into the same CRS asgetProjected()
.
-
getSource
public org.locationtech.jts.geom.Geometry getSource()The original
Geometry
-
getSourceCrs
public org.geotools.api.referencing.crs.CoordinateReferenceSystem getSourceCrs()The
CoordinateReferenceSystem
ofgetSource()
-
getProjected
public org.locationtech.jts.geom.Geometry getProjected()A projected form of
getSource()
.If the
getSourceCrs()
is a projected CRS then this will be the same object as seegetSource()
. -
getProjectedCrs
public org.geotools.api.referencing.crs.CoordinateReferenceSystem getProjectedCrs()The
CoordinateReferenceSystem
ofgetProjected()
. -
getProjectedToSource
public org.geotools.api.referencing.operation.MathTransform getProjectedToSource()A
MathTransform
that is able to return projected geometries back togetSourceCrs()
. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-