Skip to content

Raster Operations Based on Extents

For many workflows, it may be easier to base your analysis on the extent of a region. In more complicated analyses, it may be useful to analyze data from one file based on the extent of another file. In these cases, ETHOS.GeoKit's Extent object could be useful.

You can use the Extent object to:

Create Rasters based on Extents

  • Create rasters from Extent objects with automatic pixel size computation

Clip Rasters

  • Warp and clip rasters to specified Extents (via warp())
  • Support multiple resampling algorithms (e.g., bilinear interpolation)

Extent Creation and Transformation

  • You can create Extent objects from various sources
    • From coordinates
    • Create Extents from raster files (via fromRaster())
    • Create Extents from vector files, like shapefiles (via fromVector())
    • Create Extents from in-memory geometries (via fromGeom())
  • Transform Extents to different coordinate systems (via castTo())

Merging Overlapping Extents

  • Combine overlapping Extents to create a bounding box covering both (via + operator)
  • Convert Extents to OGR Geometry objects (via .box property) for visualization and spatial operations