Utilities#
|
Assign CRS for a non-georegistered array or dataset. |
|
Compute number of CRS units per degree for a projected CRS at a given location in lon/lat. |
|
Union of geoboxes. |
|
Intersection of geoboxes. |
|
Given a source geobox and integer scaler compute geobox of a scaled down image. |
|
Returns True if geometries intersect, else False |
|
Return CRS common across geometries, or raise CRSMismatchError |
|
True if Affine transform has scale and translation components only. |
|
broadcast A*(x_i, y_i) across all elements of x/y arrays in any shape (usually 2d image) |
|
Get boundary points from a 2d roi. |
|
|
|
Check if ROI covers the entire region. |
|
Compute intersection of two ROIs |
|
|
|
Fill in missing .start/.stop, also deal with negative values, which are treated as offsets from the end. |
|
Compute envelope around a bunch of points and return it as roi (tuple of row/col slices) |
|
Return center point of roi |
|
Pad ROI on each side, with clamping (0,..) -> shape |
|
|
|
|
|
|
Compute decomposition Affine matrix sans translation into Rotation, Shear and Scale. |
|
|
Given points X,Y compute A, such that: Y = A*X. |
|
Given an arbitrary locally linear transform estimate scale change around a point. |
|
direction: from src to dst .back: goes the other way .linear: None|Affine linear transform src->dst if transform is linear (i.e. |
|
Given two GeoBoxes find the region within the source GeoBox that overlaps with the destination GeoBox, and also compute the scale factor (>1 means shrink). |
Split translation into pixel aligned and sub-pixel components. |
|
|
s, t define linear transform from destination coordinate space to source >> x_s = s * x_d + t |
Translate numpy slices to rasterio window tuples. |
|
|
Perform Affine warp using best available backend (GDAL via rasterio is the only one so far). |
|
Perform reproject from ndarray->ndarray using rasterio as backend library. |