geo pack¶
35 nodes, in noodlelab[geo] and above.
Geo/Plot¶
Map Plot¶
geo.map_plot
A map from any mix of layers, drawn bottom to top: hillshade, raster,
polygons, lines, points. Layers are projected to the CRS of the first of
raster, polygons, lines and points. Classified rasters get a legend, other
rasters and numeric point colours a colour bar; the default class colours
suit land cover (water, bare, grassland, forest), class_colors sets others.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
Optional. |
|
|
Grey relief drawn under the raster Optional. |
|
|
Optional. |
|
|
Optional. |
|
|
Optional. |
|
|
Fill by column Default |
|
|
Label column Default |
|
|
Colour by column Default |
|
|
Label column Default |
|
|
Default |
|
|
Scale by column Default |
|
|
Default |
|
|
Classified rasters: one colour per class, e.g. #2e7d32, #f2c14e, #d7301f Default |
|
|
Default |
|
|
Default |
|
|
Default |
|
|
Default |
|
|
Default |
|
|
Default |
|
|
Inches Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Geo/Raster¶
Classify¶
geo.classify
Group values into classes (e.g. NDVI into land cover), and the area of each class. A value equal to a break goes into the upper class.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Class boundaries, ascending: 0.1, 0.3, 0.6 Default |
|
|
One more label than breaks Default |
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Hillshade¶
geo.hillshade
Shaded relief, 0 (dark) to 1 (lit), as seen with the sun at the given direction and height: the classic map backdrop for terrain.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Sun direction, degrees from north Default |
|
|
Sun height, degrees Default |
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
IDW Interpolation¶
geo.idw_interpolation
Interpolate point measurements onto a grid by inverse distance weighting: each cell is the average of its nearest points, weighted by 1/distanceᵖ. Uses the template’s grid if one is linked (to line up with other rasters), otherwise the points’ extent. Points in longitude and latitude are projected to UTM first.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Default |
|
|
Optional. |
|
|
Cell size in metres, without a template Default |
|
|
Default |
|
|
Default |
|
|
Metres added around the points Default |
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Mask Raster¶
geo.mask_raster
Keep the cells inside the polygons (or outside, inverted); the rest become missing.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Normalized Difference¶
geo.normalized_difference
(A − B) / (A + B), between −1 and 1: with A = near infrared and B = red, the vegetation index NDVI; with green and NIR, the water index NDWI.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Point Density¶
geo.point_density
Kernel density: how many points (or how much weight) per km², smoothed with a Gaussian of the given bandwidth. Hot spots of events such as earthquakes or observations.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Optional. |
|
|
Cell size in metres, without a template Default |
|
|
Smoothing radius in metres Default |
|
|
Metres added around the points Default |
|
|
Weight column Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Raster Math¶
geo.raster_math
Cell-by-cell arithmetic between two rasters on the same grid, or a raster and a number. Comparisons give 1 (true) and 0 (false).
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Optional. |
|
|
Used when B is not linked Default |
|
|
Default |
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Raster Statistics¶
geo.raster_statistics
Summary statistics of the valid cells, and the area they cover (km², for rasters in metres).
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Raster Values¶
geo.raster_values
The raster’s valid (non-missing) values as a flat array, for histograms and statistics. Inserted when a raster is linked into an array input.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Read ASCII Grid¶
geo.read_ascii_grid
Read an ESRI ASCII grid (.asc), the plain-text raster format most GIS programs export. The CRS comes from a .prj file with the same name, or is given here. No-data cells become NaN.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
EPSG code; empty: from the .prj file next to it Default |
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Read Raster¶
geo.read_raster
Read one band of a GeoTIFF, or of any raster GDAL reads (.vrt, .img, .jp2, NetCDF…), as a grid of floats. No-data cells become NaN, and the CRS comes from the file.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Which band, from 1 Default |
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Reclassify¶
geo.reclassify
Give each class of a classified raster a number, such as a runoff coefficient or a roughness per land-cover class.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
One number per class, in class order: 1.0, 0.6, 0.35, 0.2 Default |
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Sample Raster¶
geo.sample_raster
Add the raster value under each point as a column (the cell the point falls in; NaN outside the grid).
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Slope & Aspect¶
geo.slope_aspect
Terrain slope in degrees (0 = flat) and aspect, the compass direction the slope faces (0 = north, 90 = east), from an elevation model in a projected CRS.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Elevation units per horizontal unit Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Zonal Statistics¶
geo.zonal_statistics
Summarise a raster inside each polygon: mean, min, max, standard deviation, and the area covered (km²); optionally the share above a threshold (e.g. of an interpolated concentration over a limit), or, for a classified raster, the share of each class. A cell belongs to a zone when its centre is inside.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
Column name prefix; empty: the raster’s name Default |
|
|
Default |
|
|
Add the % of each zone’s area above the threshold Default |
|
|
Classified raster: the % of each zone in each class Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Geo/Seismology¶
Gutenberg-Richter¶
geo.gutenberg_richter
The magnitude–frequency distribution log₁₀ N(≥M) = a − b·M of a catalogue.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Default |
|
|
Default |
|
|
Default |
|
|
The fixed magnitude of completeness Default |
|
|
Added to the maximum-curvature estimate (often 0.2) Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Geo/Track¶
Track Statistics¶
geo.track_statistics
Analyse a GPS log (one row per fix, in time order): the geodesic distance on the WGS84 ellipsoid, speed, grade, total ascent and descent (from lightly smoothed elevation, so GPS noise does not add up), and moving time.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Default |
|
|
Default |
|
|
Default |
|
|
Metres; none: no climbing figures Default |
|
|
km/h: slower counts as stopped Default |
|
|
Points in the elevation smoothing window Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Geo/Vector¶
Add Coordinates¶
geo.add_coordinates
Add each feature’s x and y (of its centroid, for lines and polygons) as columns, for tables in reports or plots.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
The coordinates’ CRS; empty: the data’s Default |
|
|
Default |
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
As Features¶
geo.as_features
Features again after table nodes: the table nodes (Add Column, Filter
Rows, Join Tables, …) work on GeoDataFrames too, but say they return a
plain table. This passes a GeoDataFrame through, or rebuilds one from a
geometry column. Offered when such a table is linked into a
features input.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Only for tables that lost their CRS Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Buffer¶
geo.buffer
The area within a distance of each feature, e.g. a protection zone around a river. Computed in metres whatever the CRS; the result is in the input’s CRS.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Default |
|
|
Merge overlapping buffers into one area Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Centroids¶
geo.centroids
The centre point of each feature (computed in metres, returned in the input’s CRS).
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Clip¶
geo.clip
Cut features to the area of the mask polygons (points outside are dropped).
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Count In Polygons¶
geo.count_in_polygons
How many points fall in each polygon (earthquakes per region, samples per district), optionally with an aggregate of a point attribute and the density per km².
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
Default |
|
|
Also aggregate this column Default |
|
|
Default |
|
|
Also add the count per km² Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Dissolve¶
geo.dissolve
Merge features into one per group, aggregating their numeric columns.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Merge features with the same value Default |
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Distance To Nearest¶
geo.distance_to_nearest
Add the distance in metres from each feature to the nearest target feature (e.g. wells to the river), computed in a metric CRS.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Filter Features¶
geo.filter_features
Keep the features matching a condition on their attributes.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
A pandas query on the columns: magnitude >= 3 and type == “well” Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Measure¶
geo.measure
Add each feature’s area and perimeter (polygons) or length (lines) as columns. Longitude/latitude data is measured on the ellipsoid (geodesic), projected data in its own units (metres).
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Default |
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Points From Table¶
geo.points_from_table
Make point features from two coordinate columns, e.g. station or sample locations in a CSV. Rows without coordinates are dropped.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Default |
|
|
Default |
|
|
The CRS of the coordinates Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Read Vector File¶
geo.read_vector
Read GeoJSON, GeoPackage, Shapefile or FlatGeobuf features, from the workspace or remote storage (downloaded once and cached).
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
For GeoPackages with several layers Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Reproject¶
geo.reproject
Transform the coordinates to another CRS: UTM for metres, EPSG:4326 for longitude and latitude, or a national grid.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
An EPSG code, or “UTM” for the UTM zone of the data Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Spatial Join¶
geo.spatial_join
Attach the attributes of right to each feature of left by their
spatial relation: the district each well lies within, or the nearest river
(with the distance in metres in distance_m).
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
Default |
|
|
Default |
|
|
Nearest only; 0 m: no limit Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Output¶
Save ASCII Grid¶
geo.save_ascii_grid
Write a raster as an ESRI ASCII grid into this run’s output folder, with a .prj file for its CRS.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Default |
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Save GeoTIFF¶
geo.save_geotiff
Write a raster as a compressed GeoTIFF (float32, NaN as no-data) into this run’s output folder.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Save Vector File¶
geo.save_vector
Write features into this run’s output folder. The extension picks the format: .geojson, .gpkg (GeoPackage) or .fgb (FlatGeobuf).
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|