API Reference
odc.geo.xr
Interfacing with xarray.DataArray
and xarray.Dataset
classes.
|
ODC extension base class. |
Query |
|
|
Compute geobox of this data in other projection. |
Return names of spatial dimensions, or |
|
Query |
|
|
Crops and optionally mask an |
|
Apply a polygon geometry as a mask, setting all |
|
Plot xarray data on an interactive |
|
ODC extension for |
|
|
Reload geospatial state info in-place. |
|
|
Save |
|
Compress |
|
Reproject raster to different projection/resolution. |
|
Apply colormap to data. |
|
Add image to an interactive map. |
|
Save image to RAM in jpeg/png/webp format. |
Index of the Y dimension. |
|
Index of the X dimension. |
|
Extract |
|
|
ODC extension for |
|
Convert dataset to RGBA image. |
Reload geospatial state info in-place. |
|
|
Assign CRS for a non-georegistered array or dataset. |
|
Generate raster from geometry. |
|
Find spatial dimensions of |
|
Wrap xarray around numpy array with CRS and x,y coords. |
|
Dictionary of Coordinates in xarray format. |
|
Reproject raster to different projection/resolution. |
|
Construct geo-registered xarray from a |
|
Apply colormap to data. |
|
Convert dataset to RGBA image. |
|
Add image to an interactive map. |
|
Perform reproject from ndarray->ndarray using rasterio as backend library. |
|
Compress |
|
Save |
|
Save image to RAM in jpeg/png/webp format. |
|
Apply a polygon geometry as a mask, setting all |
|
Crops and optionally mask an |
odc.geo.cog
Cloud Optimized GeoTIFF construction
|
Save a Cloud Optimized GeoTIFF to S3 or file with Dask. |
|
Return padded gbox with safe dimensions for COG. |
|
Compress |
|
Save |
|
Write COG from externally computed overviews. |
odc.geo.geobox
Methods for creating and manipulating geoboxes.
GeoBox
|
Defines the location and resolution of a rectangular grid of data, including it's |
|
Construct |
|
Construct |
|
Construct GeoBox from rasterio. |
Linear mapping from pixel space to CRS. |
|
Anchor point in pixel coordinates. |
|
|
Boundary of a |
|
Produce a tile buffered by |
Query coordinates. |
|
Coordinate Reference System of the GeoBox. |
|
List of dimension names of the GeoBox. |
|
List of dimension names of the GeoBox. |
|
Flip along X axis. |
|
Flip along Y axis. |
|
GeoBox footprint in native CRS. |
|
|
Plot a visual representation of the GeoBox's extent on an interactive |
|
Compute footprint in foreign CRS. |
GeoBox bounding box in the native CRS. |
|
Query bounds in folium/ipyleaflet style. |
|
GeoBox extent in EPSG:4326. |
|
|
Compute overlap as ROI. |
Height in pixels (ny). |
|
Check if geobox is "empty". |
|
Same size geobox to the left of this one. |
|
Same size geobox to the right of this one. |
|
Same size geobox directly above this one. |
|
Same size geobox directly below this one. |
|
|
Pad geobox. |
|
Possibly expand |
Resolution, pixel size in CRS units. |
|
Aspect ratio (X/Y in pixel space). |
|
|
Rotate GeoBox around the center. |
Shape in pixels |
|
Linear mapping from pixel space to CRS. |
|
|
Shift GeoBox in pixel plane. |
|
Snap pixel grid to |
|
Construct compatible geobox covering given |
|
Compute GeoBox covering the same region in a different projection. |
Width in pixels (nx). |
|
|
Compute |
|
Change GeoBox shape. |
|
Generate quasi-random sample of image locations. |
|
Apply affine transform on pixel side. |
|
Apply affine transform on CRS side. |
GeoboxTiles
|
Partition GeoBox into sub geoboxes. |
Access base Geobox |
|
Query chunk shape for a given chunk. |
|
Intersect with a bounding box. |
|
Number of tiles along each dimension. |
|
|
Return tile indexes overlapping with a given geometry. |
Figure out tile to tile overlap graph between two grids. |
|
Access ROI covered by tile. |
Standalone Methods
|
Bounding box of |
|
Intersection of geoboxes. |
|
Union of geoboxes as a geobox. |
|
Compute |
|
Alias for |
|
Alias for |
|
Alias for |
|
Alias for |
|
Alias for |
|
Alias for |
|
Alias for |
|
Alias for |
|
Alias for |
|
Alias for |
odc.geo.crs
Contains CRS class and related operations.
|
Wrapper around |
|
Construct appropriate UTM CRS for a given point. |
EPSG Code of the CRS or |
|
|
Generate WKT representation of this CRS. |
|
Build coordinate transformer to other projection. |
Get |
|
List of dimension units of the CRS. |
|
List of dimension names of the CRS. |
|
CRS Mismatch Error. |
|
|
Normalise CRS representation. |
|
Normalise CRS representation, raise error if input is |
|
Helper method for converting resolution between meters/degrees. |
odc.geo.geom
Shapely geometry classes with CRS information attached.
|
2D Geometry with CRS. |
|
Convert geometry to a different Coordinate Reference System. |
|
Render geometry to GeoJSON. |
|
Plot Geometry on an interactive |
|
Bounding box, defining extent in cartesian coordinates. |
|
Plot BoundingBox on an interactive |
|
Construct |
|
Construct |
|
Construct |
|
Map bounding box through a linear transform. |
|
Return a new BoundingBox, buffered in the x and y dimensions. |
|
Points along the perimeter as a linear ring. |
|
Generate quasi-random sample of points within this boundingbox. |
|
Create a 2D Box (Polygon). |
|
Create a 2D LineString (Connected set of lines). |
|
Create a 2D Point. |
|
Create a 2D Polygon. |
|
Construct |
|
Create a 2D MultiLineString (Multiple disconnected sets of lines). |
|
Create a 2D MultiPoint Geometry. |
|
Create a 2D MultiPolygon. |
|
Create a 2D Polygon from an affine transform and shape. |
|
Chop a geometry along the antimeridian. |
|
Tweak Geometry in the vicinity of longitude discontinuity. |
|
Compute common CRS. |
|
Adds points so they are at most resolution units apart. |
|
Check for intersection. |
|
Return the bounding box of a geometry in lon/lat. |
|
Compute longitude of the center point of a geometry. |
|
Project vertical line along some longitude into a given CRS. |
|
Returns a sequence of Geometry[Line] objects. |
|
Compute intersection of boudning boxes. |
|
Compute union of bounding boxes. |
|
Compute intersection of multiple (multi)polygons. |
|
Compute union of multiple (multi)polygons efficiently. |
|
Creates the Delaunay triangulation and returns a geometry collection. |
odc.geo
Basic types used for unambigous specification of X/Y values.
|
Immutable container for anything X/Y. |
Convert to tuple in X,Y order. |
|
Convert to tuple in Y,X order. |
|
Convert to tuple in Longitude,Latitude order. |
|
Convert to tuple in Latitude,Longitude order. |
|
Access X value. |
|
Access Y value. |
|
Access Longitude value (X). |
|
Access Latitude value (Y). |
|
Interpret as |
|
Interpret as |
|
|
Resolution for X/Y dimensions. |
|
2d shape. |
|
2d index. |
|
Defines which way to snap geobox pixel grid. |
|
Construct from X,Y order. |
|
Construct from Y,X order. |
|
Resolution for square pixels with inverted Y axis. |
|
Construct resolution from X,Y order. |
|
Construct resolution from Y,X order. |
|
Shape from width/height. |
|
Normalise shape representation. |
|
Construct 2d index in X,Y order. |
|
Construct 2d index in Y,X order. |
odc.geo.roi
Various helper methods for working with 2d slices into arrays.
|
Points along axis aligned polygon. |
|
Get boundary points from a 2d roi. |
|
Return center point of an |
|
Build ROI from sample points. |
|
Compute intersection of two ROIs. |
|
Check if ROI is "empty". |
|
Check if ROI covers the entire region. |
|
Normalise ROI. |
|
Pad ROI on each side, with clamping. |
|
Shape of an array after cropping with |
|
Compute ROI for a scaled down image. |
|
Compute shape of the overview image. |
|
Compute ROI for a scaled up image. |
odc.geo.math
|
Class for translating continous coordinates to bin index. |
|
Lookup bin index that |
|
Construct |
|
Wrapper around polyval2d with input normalization. |
|
Fit 2d polynomial that minimizes |
|
Evaluate on the Cartesian product of x and y. |
Make a new transform by chaining a linear mapping |
|
|
Compute Affine transform from axis. |
|
Align integer down. |
|
Align integer up. |
|
Broadcast |
|
Clamp |
|
Compute resolution and offset from x/y axis data. |
|
Like |
|
Check if transfrom is pure scale and translation. |
|
Check if number is close enough to an integer. |
|
Turn almost ints to actual ints. |
|
Turn almost zeros to actual zeros. |
|
Normalize |
|
Snap scale. |
|
Snap scale and translation parts to integer when close enough. |
|
Split float number into whole and fractional parts. |
Split translation into pixel aligned and sub-pixel parts. |
|
|
Generate quasi-random set of points. |
odc.geo.gridspec
|
Definition for a regular spatial grid. |
|
Construct |
|
Construct |
Pixel boundary alignment. |
|
List of dimension names of the grid spec. |
|
Tile shape in pixels (Y,X order, like numpy). |
|
|
Compute tile index from a point. |
|
Tile geobox. |
|
Lookup |
|
Query tiles overlapping with bounding box. |
|
Query tiles overlapping with a given polygon. |
|
Render to GeoJSON. |
odc.geo.overlap
|
Describes computed data loading parameters. |
|
Given points |
|
Compute output |
|
Compute reprojection information. |
odc.geo.converters
|
Convert Geopandas data into list of |
|
Extract Ground Control points from |
|
Extract Ground Control points from |
|
|
|
Construct GeoBox from rasterio. |