SCHEMAXIS · Declared work. Results you can check.Documentation ↗ · Contact
schemaxis/Agent’s Hands

Documentation / generated/gdal-operations.md
Core 11629ae · View or edit Markdown on GitHub ↗

Gdal operation reference

Generated from the current declarations. Do not edit this file by hand.

Types, limits and defaults below describe resolved values. Runtime expressions must produce these types. Unknown options are rejected; defaults apply only when omitted. Constructor options must be constant after document composition.

Index#

window

window#

Crop a georeferenced raster and choose a new grid shape while preserving the selected extent, CRS, band units and nodata. Useful for bounded GIS elevation, temperature and categorical grid subsets.

Common mistakes and assumptions:

  • Nearest downsampling loses unsampled pixels and is not an average.
  • CRS assertion never reprojects coordinates; EPSG:4326 raster axes are longitude then latitude.

Native binding: osgeo.gdal.Translate(srcWin, width, height, resampleAlg=nearest). Output kind: ["image","text"].

Inputs: none.

Option Meaning Type / constraints Default
source Absolute local .tif/.tiff regular file, at most 8 MiB and 262144 pixels. Single-band north-up uncompressed strips only, no symlink/device/remote input. Source bytes are captured; changes invalidate reuse. {"type":"string","minLength":1,"maxLength":4096} required
x Zero-based leftmost source column, in pixels, from the upper-left corner. The window must remain fully inside the source; no padded pixels. {"type":"integer","minimum":0,"maximum":4096} required
y Zero-based topmost source row, in pixels, increasing downward. It is not a northing; north-up grids have negative geotransform y spacing. {"type":"integer","minimum":0,"maximum":4096} required
width Number of source columns to retain,1–4096 pixels. Together with height at most 262144; x+width must fit the source. {"type":"integer","minimum":1,"maximum":4096} required
height Number of source rows to retain,1–4096 pixels. Together with width at most 262144; y+height must fit the source. {"type":"integer","minimum":1,"maximum":4096} required
outputWidth Number of columns on the output grid,1–4096, at most 262144 output pixels. Equal to width retains horizontal spacing; a changed count preserves extent and changes pixel width. {"type":"integer","minimum":1,"maximum":4096} required
outputHeight Number of rows on the output grid,1–4096, at most 262144 output pixels. Equal to height retains vertical spacing; a changed count preserves extent and negative y spacing. {"type":"integer","minimum":1,"maximum":4096} required
epsg Required assertion of source CRS, 4326 or 3857. 4326 raster coordinates are x longitude and y latitude in degrees; 3857 uses easting/northing metres. A mismatch is refused; this field does not reproject. {"type":"enum","values":[4326,3857]} required
units Required assertion of band value units: m for metres, K for kelvin, 1 for dimensionless. Distinct from horizontal CRS units. Source units must match and output units are preserved, without vertical-datum inference. {"type":"enum","values":["m","K","1"]} required
nodata Required finite source nodata sentinel. Must match the tag and fit the source dtype exactly. Nearest sampling copies a nodata pixel unchanged; statistics exclude it and use null extrema/mean when every pixel is nodata. {"type":"number"} required
resampling Only nearest is supported. Output centres select source indices floor((2*i+1)sourceSize/(2outputSize)); ties select the higher index. No averaging or conservation; bilinear is deliberately refused. {"type":"enum","values":["nearest"]} required
lossPolicy Choose strict to refuse unsupported bands, masks, overviews, compression or metadata. Only TIFF strip layout, byte order and descriptive CRS citations may change; no silent semantic metadata loss. {"type":"enum","values":["strict"]} required