Interface GeometryProblems

All Superinterfaces:
ProblemFactory

public interface GeometryProblems extends ProblemFactory

Problems relating to Geometry operations, errors, etc

  • Method Summary

    Modifier and Type
    Method
    Description
    autoProjectionNotFound(double latitude, double longitude)
    When no auto projection could be found.
    badWkt(String wktText)
    The Well-Known Text format supplied by the user appears to be invalid.
    cannotReproject(org.locationtech.jts.geom.Geometry geom, org.geotools.api.referencing.crs.CoordinateReferenceSystem sourceCrs, org.geotools.api.referencing.crs.CoordinateReferenceSystem targetCrs)
    When a Geometry cannot be re-projected from the source CoordinateReferenceSystem to the target.
    crsMixtureReprojected(Object affected, org.geotools.api.referencing.crs.CoordinateReferenceSystem target)
    The data for {0} contained a mixture of CRSs, so has been reprojected to CRS {1}.
    fixedInvalid(org.locationtech.jts.geom.Geometry original, org.locationtech.jts.geom.Geometry fixed, String tupleContext)
    When an invalid geometry (original) has been fixed.
    fixedInvalidPostReprojection(org.geotools.api.referencing.crs.CoordinateReferenceSystem sourceCrs, org.geotools.api.referencing.crs.CoordinateReferenceSystem targetCrs, org.locationtech.jts.geom.Geometry invalid, org.locationtech.jts.geom.Geometry fixed)
    When an geometry has become invalid during re-projection, but has been fixed.
    get()
     
    invalid(org.locationtech.jts.geom.Geometry geom, org.locationtech.jts.operation.valid.TopologyValidationError error, String tupleContext)
    When an invalid geometry has been detected and geometry fixing does not work.
    invalidPostReprojection(org.geotools.api.referencing.crs.CoordinateReferenceSystem sourceCrs, org.geotools.api.referencing.crs.CoordinateReferenceSystem targetCrs)
    When an invalid geometry has been created due to re-projection and geometry fixing does not work.
    mismatchedCrs(org.geotools.api.referencing.crs.CoordinateReferenceSystem lhsCrs, org.geotools.api.referencing.crs.CoordinateReferenceSystem rhsCrs)
     
    mixedGeometryTypes(Object geometryCollection)
    Could not perform an operation because we got a mix of geometry types (e.g.
    notReferenced(Type geometryType)
    When a geometry type is found but it is not Referenced e.g it is missing CRS
    reprojectionIgnoringDatumShift(org.geotools.api.referencing.crs.CoordinateReferenceSystem sourceCrs, org.geotools.api.referencing.crs.CoordinateReferenceSystem targetCrs)
    When a reprojection transform will ignore datum shifts.
    Tip for the user when a JTS TopologyException is hit.
    Return this to explain that a CRS name couldn't be turned in to a CoordinateReferenceSystem.
  • Method Details

    • get

      static GeometryProblems get()
    • topologyExceptionTip

      Problem topologyExceptionTip()

      Tip for the user when a JTS TopologyException is hit.

    • cannotReproject

      Problem cannotReproject(org.locationtech.jts.geom.Geometry geom, org.geotools.api.referencing.crs.CoordinateReferenceSystem sourceCrs, org.geotools.api.referencing.crs.CoordinateReferenceSystem targetCrs)

      When a Geometry cannot be re-projected from the source CoordinateReferenceSystem to the target.

      This occurs when the geometry is larger than the targetCrs is.

    • autoProjectionNotFound

      Problem autoProjectionNotFound(double latitude, double longitude)

      When no auto projection could be found. This is most likely to occur if the co-ordinate order differs to what is stated in the CRS. So likely to be geometries from CSV and forceXY is incorrect.

      Would also occur if the longitude is first co-ordinate but the first axis is not named 'Longitude' for some reason.

    • reprojectionIgnoringDatumShift

      Problem reprojectionIgnoringDatumShift(org.geotools.api.referencing.crs.CoordinateReferenceSystem sourceCrs, org.geotools.api.referencing.crs.CoordinateReferenceSystem targetCrs)

      When a reprojection transform will ignore datum shifts.

    • crsMixtureReprojected

      Problem crsMixtureReprojected(Object affected, org.geotools.api.referencing.crs.CoordinateReferenceSystem target)

      The data for {0} contained a mixture of CRSs, so has been reprojected to CRS {1}.

    • unknownCrsCode

      Problem unknownCrsCode(String crsCode)

      Return this to explain that a CRS name couldn't be turned in to a CoordinateReferenceSystem. Will need to be wrapped in some sort of context-giving problem, e.g. was it a function argument? A bookmark parameter?

    • notReferenced

      Problem notReferenced(Type geometryType)

      When a geometry type is found but it is not Referenced e.g it is missing CRS

    • badWkt

      Problem badWkt(String wktText)

      The Well-Known Text format supplied by the user appears to be invalid.

    • invalid

      Problem invalid(org.locationtech.jts.geom.Geometry geom, org.locationtech.jts.operation.valid.TopologyValidationError error, String tupleContext)

      When an invalid geometry has been detected and geometry fixing does not work.

      Parameters:
      geom - the invalid geometry
      error - the error describing how geom is invalid
      tupleContext - abbreviated content of the tuple
    • invalidPostReprojection

      Problem invalidPostReprojection(org.geotools.api.referencing.crs.CoordinateReferenceSystem sourceCrs, org.geotools.api.referencing.crs.CoordinateReferenceSystem targetCrs)

      When an invalid geometry has been created due to re-projection and geometry fixing does not work.

      Parameters:
      sourceCrs - the CRS that the geometry was originally in
      targetCrs - the CRS that original was re-projected to
    • fixedInvalid

      Problem fixedInvalid(org.locationtech.jts.geom.Geometry original, org.locationtech.jts.geom.Geometry fixed, String tupleContext)

      When an invalid geometry (original) has been fixed.

      Parameters:
      original - the original (and invalid) geometry
      fixed - a fixed version of original
      tupleContext - abbreviated content of the tuple
    • fixedInvalidPostReprojection

      Problem fixedInvalidPostReprojection(org.geotools.api.referencing.crs.CoordinateReferenceSystem sourceCrs, org.geotools.api.referencing.crs.CoordinateReferenceSystem targetCrs, org.locationtech.jts.geom.Geometry invalid, org.locationtech.jts.geom.Geometry fixed)

      When an geometry has become invalid during re-projection, but has been fixed.

      Parameters:
      sourceCrs - the CRS that the geometry was originally in
      targetCrs - the CRS that original was re-projected to
      invalid - the invalid geometry
      fixed - a fixed version of original
    • mismatchedCrs

      Problem mismatchedCrs(org.geotools.api.referencing.crs.CoordinateReferenceSystem lhsCrs, org.geotools.api.referencing.crs.CoordinateReferenceSystem rhsCrs)
    • mixedGeometryTypes

      Problem mixedGeometryTypes(Object geometryCollection)

      Could not perform an operation because we got a mix of geometry types (e.g. lines and polygons) where we expected to have a homogenous set.

      Parameters:
      geometryCollection - provides more details of the problematic geometry