Skill Tracer
Skills › Scientific Agent Skills › geomaster

geomaster

skill · 231 lines · MIT License · skills/geomaster/SKILL.md

The facts

Its description

Supports geospatial research workflows for remote sensing, vector and raster GIS, spatial statistics, terrain and network analysis, and machine learning for Earth observation. Use when processing satellite imagery, aligning coordinate systems and raster grids, accessing STAC catalogs, analyzing geospatial time series, or implementing scientific GIS workflows in Python, R, Julia, JavaScript, C++, Java, Go, or Rust.

The description the agent reads to decide when to use it.

From its settingsline 3

Runs scripts

scripts/raster_workflows.py

Scripts the text names. Found by matching words, so treat them as pointers.

Found by matching wordsline 58

Files it mentions

references/review.md, scripts/raster_workflows.py, references/machine-learning.md, references/data-sources.md, references/remote-sensing.md (first 5 of 20 lines)

Files the text names, such as ones to read or write. Found by matching words, so treat them as pointers.

Found by matching wordsline 22 line 58 line 108 line 135 line 159

Licence

MIT License, from the skill file

The terms its author shares it under, which let it be shown here.

From its settingsline 4 licence text

Other settings

compatibility: Core examples require Python 3.12+ and GeoPandas, Rasterio, NumPy and PyProj. Optional workflows require their named packages, native GIS applications, GPU runtimes, or service credentials and network access. metadata: version: "1.5" skill-author: K-Dense Inc. last-reviewed: "2026-10-01"

More settings at the top of the file, shown as written.

From its settingsline 5 line 6
Other files in this skill (17) Close

The text

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1---
2name: geomaster
3description: Supports geospatial research workflows for remote sensing, vector and raster GIS, spatial statistics, terrain and network analysis, and machine learning for Earth observation. Use when processing satellite imagery, aligning coordinate systems and raster grids, accessing STAC catalogs, analyzing geospatial time series, or implementing scientific GIS workflows in Python, R, Julia, JavaScript, C++, Java, Go, or Rust.
4license: MIT License
5compatibility: Core examples require Python 3.12+ and GeoPandas, Rasterio, NumPy and PyProj. Optional workflows require their named packages, native GIS applications, GPU runtimes, or service credentials and network access.
6metadata:
7 version: "1.5"
8 skill-author: K-Dense Inc.
9 last-reviewed: "2026-10-01"
10---
12# GeoMaster
14Geospatial analysis across vector/raster GIS, remote sensing, spatial ML, terrain,
15networks, and scientific applications. Start with the relevant workflow, inspect
16input provenance, and load only the reference needed for the task.

GeoMaster

Geospatial analysis across vector/raster GIS, remote sensing, spatial ML, terrain, networks, and scientific applications. Start with the relevant workflow, inspect input provenance, and load only the reference needed for the task.

Raw lines 1 to 17
18## Tested scope and installation
20The local recipe suite targets GeoPandas 1.2.0, Rasterio 1.5.2, Shapely 2.1.2,
21PyProj 3.8.0, Rioxarray 0.23.0, Xarray 2026.9.0, OSMnx 2.1.1 and
22PySTAC Client 0.9.0. See [review and source ledger](references/review.md) for
23execution limits. Examples requiring actual input files are templates; authenticated
24Earth Engine/CDS/commercial services, desktop GIS and GPU training remain illustrative.
26```bash
27# In a dedicated environment; install only the workflow's optional dependencies.
28uv venv --python 3.13
29uv pip install geopandas==1.2.0 rasterio==1.5.2 shapely==2.1.2 pyproj==3.8.0
30uv pip install rioxarray==0.23.0 xarray==2026.9.0 'dask[array]' scikit-learn==1.9.1
31uv pip install pystac-client==0.9.0 planetary-computer==1.0.0 odc-stac
32# For osgeo/native CLI or PDAL, use a separate conda-forge environment:
33# conda create -n geo-native -c conda-forge python=3.13 gdal pdal python-pdal
34```
36Install TorchGeo/PyTorch, RSGISLib, Py6S/6S, ArcPy, QGIS or other specialist
37runtimes separately when required. A Rasterio wheel includes its own GDAL library;
38it does not install `osgeo` or the GDAL command-line programs.

Tested scope and installation

The local recipe suite targets GeoPandas 1.2.0, Rasterio 1.5.2, Shapely 2.1.2, PyProj 3.8.0, Rioxarray 0.23.0, Xarray 2026.9.0, OSMnx 2.1.1 and PySTAC Client 0.9.0. See review and source ledger for execution limits. Examples requiring actual input files are templates; authenticated Earth Engine/CDS/commercial services, desktop GIS and GPU training remain illustrative.

# In a dedicated environment; install only the workflow's optional dependencies.
uv venv --python 3.13
uv pip install geopandas==1.2.0 rasterio==1.5.2 shapely==2.1.2 pyproj==3.8.0
uv pip install rioxarray==0.23.0 xarray==2026.9.0 'dask[array]' scikit-learn==1.9.1
uv pip install pystac-client==0.9.0 planetary-computer==1.0.0 odc-stac
# For osgeo/native CLI or PDAL, use a separate conda-forge environment:
# conda create -n geo-native -c conda-forge python=3.13 gdal pdal python-pdal

Install TorchGeo/PyTorch, RSGISLib, Py6S/6S, ArcPy, QGIS or other specialist runtimes separately when required. A Rasterio wheel includes its own GDAL library; it does not install osgeo or the GDAL command-line programs.

Raw lines 18 to 39
Reads a file references/review.md :22
40## Workflow
421. Record product/collection ID, acquisition time, processing baseline, license,
43 band names, scale/offset, QA meaning, horizontal/vertical CRS and units.
442. Verify CRS from authoritative metadata. `set_crs` labels coordinates;
45 `to_crs` transforms them. Never infer an unknown CRS from plausible bounds.
463. Align extent, affine transform, dimensions, pixel registration and resolution.
47 Reproject categorical masks with nearest-neighbor resampling; choose an appropriate
48 resampler for continuous data. Matching array shape alone does not prove alignment.
494. Preserve nodata, clouds, shadows and saturation masks. Convert unsigned integers
50 to floating point before differences; apply the provider's radiometric transform once.
515. Run the analysis at a defensible support/resolution. Keep training labels and
52 validation blocks separate. Terrain elevation and horizontal units must agree.
536. Export CRS, transform, valid-data mask, units, model settings and provenance.
54 Check numeric expectations on a small known fixture before scaling up.

Workflow

  1. Record product/collection ID, acquisition time, processing baseline, license, band names, scale/offset, QA meaning, horizontal/vertical CRS and units.
  2. Verify CRS from authoritative metadata. set_crs labels coordinates; to_crs transforms them. Never infer an unknown CRS from plausible bounds.
  3. Align extent, affine transform, dimensions, pixel registration and resolution. Reproject categorical masks with nearest-neighbor resampling; choose an appropriate resampler for continuous data. Matching array shape alone does not prove alignment.
  4. Preserve nodata, clouds, shadows and saturation masks. Convert unsigned integers to floating point before differences; apply the provider's radiometric transform once.
  5. Run the analysis at a defensible support/resolution. Keep training labels and validation blocks separate. Terrain elevation and horizontal units must agree.
  6. Export CRS, transform, valid-data mask, units, model settings and provenance. Check numeric expectations on a small known fixture before scaling up.
Raw lines 40 to 55
56## Local raster recipes
58Import the bundled [raster helper](scripts/raster_workflows.py) from its directory
59(add that directory to `PYTHONPATH` or run from it). It implements small in-memory
60recipes; use windows/Dask for larger data. Writers require a new output path. It does not infer band identities or masks.

Local raster recipes

Import the bundled raster helper from its directory (add that directory to PYTHONPATH or run from it). It implements small in-memory recipes; use windows/Dask for larger data. Writers require a new output path. It does not infer band identities or masks.

Raw lines 56 to 61
62### NDVI
64```python
65from raster_workflows import write_ndvi
67# This example assumes a VERIFIED four-band B02/B03/B04/B08 stack whose mask
68# already excludes clouds/shadows, and harmonized DN reflectance = DN * 0.0001.
69write_ndvi('s2_masked_stack.tif', 'ndvi.tif', red_band=3, nir_band=4,
70 scale=0.0001, offset=0.0)
71```
73Do not use those indices or calibration for an arbitrary `sentinel2.tif`.
74SAFE products and STAC assets are often separate single-band rasters. Additive
75radiometric offsets affect even NDVI. EVI/SAVI require physical reflectance.
76`normalized_difference` keeps undefined ratios and invalid cells as NaN, not zero.

NDVI

from raster_workflows import write_ndvi

# This example assumes a VERIFIED four-band B02/B03/B04/B08 stack whose mask
# already excludes clouds/shadows, and harmonized DN reflectance = DN * 0.0001.
write_ndvi('s2_masked_stack.tif', 'ndvi.tif', red_band=3, nir_band=4,
           scale=0.0001, offset=0.0)

Do not use those indices or calibration for an arbitrary sentinel2.tif. SAFE products and STAC assets are often separate single-band rasters. Additive radiometric offsets affect even NDVI. EVI/SAVI require physical reflectance. normalized_difference keeps undefined ratios and invalid cells as NaN, not zero.

Raw lines 62 to 77
78### Terrain
80```python
81import rasterio
82from raster_workflows import terrain_metrics
84with rasterio.open('dem_metres.tif') as src:
85 slope_deg, aspect_deg, shade = terrain_metrics(
86 src.read(1, masked=True), src.transform, src.crs)
87```
89The helper requires a north-up projected metric grid and elevations in metres.
90Aspect points downslope clockwise from north; it is undefined for flat cells.
91Slope is resolution-aware; nodata contaminating a derivative stencil stays invalid.
92Hillshade is an illumination visualization, not hydrological flow or exposure risk.

Terrain

import rasterio
from raster_workflows import terrain_metrics

with rasterio.open('dem_metres.tif') as src:
    slope_deg, aspect_deg, shade = terrain_metrics(
        src.read(1, masked=True), src.transform, src.crs)

The helper requires a north-up projected metric grid and elevations in metres. Aspect points downslope clockwise from north; it is undefined for flat cells. Slope is resolution-aware; nodata contaminating a derivative stencil stays invalid. Hillshade is an illumination visualization, not hydrological flow or exposure risk.

Raw lines 78 to 93
94### Classification
96```python
97import geopandas as gpd
98from raster_workflows import classify_imagery
100training = gpd.read_file('training.gpkg') # polygons with class_id in 1..65534
101model = classify_imagery('masked_features.tif', training, 'classified.tif')
102```
104The helper checks CRS, geometry, labels, valid training pixels and overlapping
105labels, then preserves nodata in a uint16 output. It fits a small demonstration
106model; it does not measure accuracy. Use spatial/temporal holdouts at the field,
107scene or regional level before reporting predictive performance. See

Classification

import geopandas as gpd
from raster_workflows import classify_imagery

training = gpd.read_file('training.gpkg')  # polygons with class_id in 1..65534
model = classify_imagery('masked_features.tif', training, 'classified.tif')

The helper checks CRS, geometry, labels, valid training pixels and overlapping labels, then preserves nodata in a uint16 output. It fits a small demonstration model; it does not measure accuracy. Use spatial/temporal holdouts at the field, scene or regional level before reporting predictive performance. See machine learning.

Raw lines 94 to 109
110## Vector analysis
112```python
113import geopandas as gpd
115zones = gpd.read_file('zones.geojson')
116points = gpd.read_file('points.geojson')
117if zones.crs is None or points.crs is None:
118 raise ValueError('Resolve missing CRS before analysis')
119points = points.to_crs(zones.crs)
120joined = gpd.sjoin(points, zones, how='inner', predicate='within')
121stats = joined.groupby('zone_id')['value'].agg(['count', 'mean', 'std'])
123# Local data only: verify the estimated CRS area of use before accepting it.
124metric = zones.to_crs(zones.estimate_utm_crs())
125metric['area_m2'] = metric.area
126buffers = metric.geometry.buffer(1000).to_crs(zones.crs)
127```
129`within` excludes boundary points; overlapping zones can duplicate observations.
130Choose and document a boundary/overlap policy. A projected CRS need not use metres
131or preserve area. UTM suits local regions, not every national, polar or global task.

Vector analysis

import geopandas as gpd

zones = gpd.read_file('zones.geojson')
points = gpd.read_file('points.geojson')
if zones.crs is None or points.crs is None:
    raise ValueError('Resolve missing CRS before analysis')
points = points.to_crs(zones.crs)
joined = gpd.sjoin(points, zones, how='inner', predicate='within')
stats = joined.groupby('zone_id')['value'].agg(['count', 'mean', 'std'])

# Local data only: verify the estimated CRS area of use before accepting it.
metric = zones.to_crs(zones.estimate_utm_crs())
metric['area_m2'] = metric.area
buffers = metric.geometry.buffer(1000).to_crs(zones.crs)

within excludes boundary points; overlapping zones can duplicate observations. Choose and document a boundary/overlap policy. A projected CRS need not use metres or preserve area. UTM suits local regions, not every national, polar or global task.

Raw lines 110 to 132
133## Cloud catalogs and Earth Engine
135[Data sources](references/data-sources.md) documents current STAC, CDSE, CDS,
136Overpass and geocoding contracts. Discovery is separate from downloading pixels.
138```python
139from pystac_client import Client
140import planetary_computer
142catalog = Client.open('https://planetarycomputer.microsoft.com/api/stac/v1',
143 modifier=planetary_computer.sign_inplace)
144search = catalog.search(collections=['sentinel-2-l2a'],
145 bbox=[-122.5, 37.7, -122.3, 37.9],
146 datetime='2023-06-01/2023-06-30',
147 query={'eo:cloud_cover': {'lt': 20}}, max_items=5)
148items = list(search.items())
149if not items:
150 raise ValueError('No matching scenes')
151# Save item IDs/properties; inspect asset keys, scale/offset and QA before load.
152```
154`limit` controls page size; `max_items` bounds total traversal. Planetary Computer
155signing returns expiring SAS asset URLs; use unsigned IDs/metadata for durable
156provenance and sign near the time of access. Earth Engine requires prior
157`ee.Authenticate()` and `ee.Initialize(project='your-registered-project')`.
158Cloud filters at scene level do not replace per-pixel masks. The
159[remote-sensing reference](references/remote-sensing.md) includes SCL masking and
160region summaries with an explicit exclusive date end.

Cloud catalogs and Earth Engine

Data sources documents current STAC, CDSE, CDS, Overpass and geocoding contracts. Discovery is separate from downloading pixels.

from pystac_client import Client
import planetary_computer

catalog = Client.open('https://planetarycomputer.microsoft.com/api/stac/v1',
                      modifier=planetary_computer.sign_inplace)
search = catalog.search(collections=['sentinel-2-l2a'],
                        bbox=[-122.5, 37.7, -122.3, 37.9],
                        datetime='2023-06-01/2023-06-30',
                        query={'eo:cloud_cover': {'lt': 20}}, max_items=5)
items = list(search.items())
if not items:
    raise ValueError('No matching scenes')
# Save item IDs/properties; inspect asset keys, scale/offset and QA before load.

limit controls page size; max_items bounds total traversal. Planetary Computer signing returns expiring SAS asset URLs; use unsigned IDs/metadata for durable provenance and sign near the time of access. Earth Engine requires prior ee.Authenticate() and ee.Initialize(project='your-registered-project'). Cloud filters at scene level do not replace per-pixel masks. The remote-sensing reference includes SCL masking and region summaries with an explicit exclusive date end.

Raw lines 133 to 161
Reads a file references/data-sources.md :135
162## Networks
164```python
165import osmnx as ox
166import networkx as nx
167G = ox.graph_from_place('Portland, Maine, USA', network_type='drive')
168G = ox.routing.add_edge_speeds(G)
169G = ox.routing.add_edge_travel_times(G)
170origin = ox.distance.nearest_nodes(G, -70.26, 43.66)
171destination = ox.distance.nearest_nodes(G, -70.27, 43.67)
172route = nx.shortest_path(G, origin, destination, weight='travel_time')
173```
175This makes public Nominatim/Overpass requests. Handle no-route results and inspect
176imputed speeds; these estimate free-flow time, not observed traffic. Use graph CRS
177for nearest-node coordinates and distinguish travel-time seconds from metres.

Networks

import osmnx as ox
import networkx as nx
G = ox.graph_from_place('Portland, Maine, USA', network_type='drive')
G = ox.routing.add_edge_speeds(G)
G = ox.routing.add_edge_travel_times(G)
origin = ox.distance.nearest_nodes(G, -70.26, 43.66)
destination = ox.distance.nearest_nodes(G, -70.27, 43.67)
route = nx.shortest_path(G, origin, destination, weight='travel_time')

This makes public Nominatim/Overpass requests. Handle no-route results and inspect imputed speeds; these estimate free-flow time, not observed traffic. Use graph CRS for nearest-node coordinates and distinguish travel-time seconds from metres.

Raw lines 162 to 178
179## Efficient storage
181```python
182import rioxarray
183from rasterio.shutil import copy as rio_copy
184from rio_cogeo.cogeo import cog_validate
186cube = rioxarray.open_rasterio('large.tif', masked=True,
187 chunks={'band': 1, 'x': 1024, 'y': 1024})
188# Compute bounded windows or reductions; do not force the entire cube into memory.
189rio_copy('input.tif', 'output_cog.tif', driver='COG', compress='DEFLATE')
190valid, errors, warnings = cog_validate('output_cog.tif')
191if not valid:
192 raise ValueError(errors)
193```
195Tiling/compression alone does not establish COG layout. Preserve or regenerate
196appropriate overviews at COG creation; do not mutate the result in place.

Efficient storage

import rioxarray
from rasterio.shutil import copy as rio_copy
from rio_cogeo.cogeo import cog_validate

cube = rioxarray.open_rasterio('large.tif', masked=True,
                             chunks={'band': 1, 'x': 1024, 'y': 1024})
# Compute bounded windows or reductions; do not force the entire cube into memory.
rio_copy('input.tif', 'output_cog.tif', driver='COG', compress='DEFLATE')
valid, errors, warnings = cog_validate('output_cog.tif')
if not valid:
    raise ValueError(errors)

Tiling/compression alone does not establish COG layout. Preserve or regenerate appropriate overviews at COG creation; do not mutate the result in place.

Raw lines 179 to 197
198## References
200- [Coordinate systems](references/coordinate-systems.md): authority, axis order, projections
201- [Core libraries](references/core-libraries.md): GDAL, Rasterio, Fiona, Shapely, PyProj, GeoPandas
202- [Remote sensing](references/remote-sensing.md): optical, SAR, hyperspectral, QA and calibration
203- [Machine learning](references/machine-learning.md): spatial holdouts, RF/SVM, neural models, XAI
204- [GIS software](references/gis-software.md): QGIS, ArcGIS, GRASS, SAGA
205- [Scientific domains](references/scientific-domains.md): marine, atmosphere, hydrology, agriculture, forestry
206- [Advanced GIS](references/advanced-gis.md): 3D, trajectories, topology, networks
207- [Big data](references/big-data.md): Dask, cloud access, GPU, COG, GeoParquet, Zarr
208- [Industry applications](references/industry-applications.md): urban, hazards, utilities, transportation
209- [Specialized topics](references/specialized-topics.md): geostatistics, optimization, privacy, provenance
210- [Programming languages](references/programming-languages.md): R, Julia, JavaScript, C++, Java, Go, Rust
211- [Data sources](references/data-sources.md): catalog and API contracts
212- [Troubleshooting](references/troubleshooting.md): common failure modes
213- [Code examples](references/code-examples.md): small corrected recipes
214- [Review evidence](references/review.md): upstream sources and verification boundaries

References

  • Coordinate systems: authority, axis order, projections
  • Core libraries: GDAL, Rasterio, Fiona, Shapely, PyProj, GeoPandas
  • Remote sensing: optical, SAR, hyperspectral, QA and calibration
  • Machine learning: spatial holdouts, RF/SVM, neural models, XAI
  • GIS software: QGIS, ArcGIS, GRASS, SAGA
  • Scientific domains: marine, atmosphere, hydrology, agriculture, forestry
  • Advanced GIS: 3D, trajectories, topology, networks
  • Big data: Dask, cloud access, GPU, COG, GeoParquet, Zarr
  • Industry applications: urban, hazards, utilities, transportation
  • Specialized topics: geostatistics, optimization, privacy, provenance
  • Programming languages: R, Julia, JavaScript, C++, Java, Go, Rust
  • Data sources: catalog and API contracts
  • Troubleshooting: common failure modes
  • Code examples: small corrected recipes
  • Review evidence: upstream sources and verification boundaries
Raw lines 198 to 215
Boilerplate, lines 216 to 231. The same text appears in 125 other files here. Close
216## Citing Scientific Agent Skills
218This skill is part of Scientific Agent Skills by K-Dense. If it materially contributed to a
219manuscript, report, presentation, or code release, add the paper to the references or
220software section and tell the user you did so:
222> Kassis, T., Agarwal, V., He, Y., Patel, D., & Brueckner, A. M. (2026). Scientific Agent
223> Skills: A Library of Procedural Knowledge for Research Agents. arXiv:2609.00065.
224> https://doi.org/10.48550/arXiv.2609.00065
226Always cite the current version. The DOI and https://arxiv.org/abs/2609.00065 resolve to the
227latest arXiv version, so never append a version suffix such as `v1`. When network access is
228available, fetch https://arxiv.org/abs/2609.00065 (or
229http://export.arxiv.org/api/query?id_list=2609.00065) before writing the reference and take
230the author list, year, and version from that record. If the record lists a journal reference
231or publisher DOI, cite the published version instead.

From K-Dense-AI/scientific-agent-skills at 5f2bc03, 2026-10-26. Not read by a model yet. Summary and techniques by Claude Opus 5.5 on 2026-11-06.