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
ConstructorsConstructorDescriptionProjected(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) Creates a newProjectedinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanorg.locationtech.jts.geom.GeometryA projected form ofgetSource().org.geotools.api.referencing.crs.CoordinateReferenceSystemTheCoordinateReferenceSystemofgetProjected().org.geotools.api.referencing.operation.MathTransformAMathTransformthat is able to return projected geometries back togetSourceCrs().org.locationtech.jts.geom.GeometryThe originalGeometryorg.geotools.api.referencing.crs.CoordinateReferenceSystemTheCoordinateReferenceSystemofgetSource()inthashCode()org.locationtech.jts.geom.GeometryprojectAlso(org.locationtech.jts.geom.Geometry geom) Helper to bring another geometry into the same projected CRS asgetProjected().org.locationtech.jts.geom.GeometrytoSourceCrs(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) Creates a new
Projectedinstance.- Parameters:
source- The originalGeometrysourceCrs- TheCoordinateReferenceSystemofgetSource()projected- A projected form ofgetSource().If the
getSourceCrs()is a projected CRS then this will be the same object as seegetSource().projectedCrs- TheCoordinateReferenceSystemofgetProjected().projectedToSource- AMathTransformthat is able to return projected geometries back togetSourceCrs().
-
-
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
geomtransformed 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
CoordinateReferenceSystemofgetSource() -
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
CoordinateReferenceSystemofgetProjected(). -
getProjectedToSource
public org.geotools.api.referencing.operation.MathTransform getProjectedToSource()A
MathTransformthat is able to return projected geometries back togetSourceCrs(). -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-