Class ProjectGeometryOp.Projected

java.lang.Object
nz.org.riskscape.engine.geo.ProjectGeometryOp.Projected
Enclosing class:
ProjectGeometryOp

public class ProjectGeometryOp.Projected extends Object

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

    Constructors
    Constructor
    Description
    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 Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    boolean
     
    org.locationtech.jts.geom.Geometry
    A projected form of getSource().
    org.geotools.api.referencing.crs.CoordinateReferenceSystem
    The CoordinateReferenceSystem of getProjected().
    org.geotools.api.referencing.operation.MathTransform
    A MathTransform that is able to return projected geometries back to getSourceCrs().
    org.locationtech.jts.geom.Geometry
    The original Geometry
    org.geotools.api.referencing.crs.CoordinateReferenceSystem
    The CoordinateReferenceSystem of getSource()
    int
     
    org.locationtech.jts.geom.Geometry
    projectAlso(org.locationtech.jts.geom.Geometry geom)
    Helper to bring another geometry into the same projected CRS as getProjected().
    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 to getSourceCrs().
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 to getSourceCrs().

      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 as getProjected().
    • getSource

      public org.locationtech.jts.geom.Geometry getSource()

      The original Geometry

    • getSourceCrs

      public org.geotools.api.referencing.crs.CoordinateReferenceSystem getSourceCrs()

      The CoordinateReferenceSystem of getSource()

    • 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 see getSource().

    • getProjectedCrs

      public org.geotools.api.referencing.crs.CoordinateReferenceSystem getProjectedCrs()

      The CoordinateReferenceSystem of getProjected().

    • getProjectedToSource

      public org.geotools.api.referencing.operation.MathTransform getProjectedToSource()

      A MathTransform that is able to return projected geometries back to getSourceCrs().

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object