Class RasterPredicates

java.lang.Object
org.apache.sedona.common.raster.RasterPredicates

public class RasterPredicates extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isCRSMatchesSRID(org.geotools.api.referencing.crs.CoordinateReferenceSystem crs, int srid)
    Test if crs matches the EPSG code.
    static boolean
    rsContains(org.geotools.coverage.grid.GridCoverage2D left, org.geotools.coverage.grid.GridCoverage2D right)
     
    static boolean
    rsContains(org.geotools.coverage.grid.GridCoverage2D raster, org.locationtech.jts.geom.Geometry geometry)
     
    static boolean
    rsIntersects(org.geotools.coverage.grid.GridCoverage2D left, org.geotools.coverage.grid.GridCoverage2D right)
     
    static boolean
    rsIntersects(org.geotools.coverage.grid.GridCoverage2D raster, org.locationtech.jts.geom.Geometry geometry)
    Test if a raster intersects a query window.
    static boolean
    rsWithin(org.geotools.coverage.grid.GridCoverage2D raster, org.locationtech.jts.geom.Geometry geometry)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RasterPredicates

      public RasterPredicates()
  • Method Details

    • rsIntersects

      public static boolean rsIntersects(org.geotools.coverage.grid.GridCoverage2D raster, org.locationtech.jts.geom.Geometry geometry)
      Test if a raster intersects a query window. If both the raster and the query window have a CRS, the query window and the envelope of the raster will be transformed to a common CRS before testing for intersection. Please note that the CRS transformation will be lenient, which means that the transformation may not be accurate.
      Parameters:
      raster - the raster
      geometry - the query window
      Returns:
      true if the raster intersects the query window
    • rsContains

      public static boolean rsContains(org.geotools.coverage.grid.GridCoverage2D raster, org.locationtech.jts.geom.Geometry geometry)
    • rsWithin

      public static boolean rsWithin(org.geotools.coverage.grid.GridCoverage2D raster, org.locationtech.jts.geom.Geometry geometry)
    • rsIntersects

      public static boolean rsIntersects(org.geotools.coverage.grid.GridCoverage2D left, org.geotools.coverage.grid.GridCoverage2D right)
    • rsContains

      public static boolean rsContains(org.geotools.coverage.grid.GridCoverage2D left, org.geotools.coverage.grid.GridCoverage2D right)
    • isCRSMatchesSRID

      public static boolean isCRSMatchesSRID(org.geotools.api.referencing.crs.CoordinateReferenceSystem crs, int srid)
      Test if crs matches the EPSG code. This method tries to avoid the expensive CRS.decode and CRS.equalsIgnoreMetadata calls. If the crs has an identifier matching the EPSG code, we assume that the crs matches the EPSG code.
      Parameters:
      crs - The crs to test
      srid - The SRID to test. The axis-order of the decoded CRS is assumed to be in lon/lat order
      Returns:
      true if the crs matches the EPSG code, false otherwise