python-gis-ecosystem-21-crs-transforms-pyproj

Sub-skill of python-gis-ecosystem: 2.1 Coordinate Reference System Transforms (pyproj + GeoPandas) (+5).

5 stars

Best use case

python-gis-ecosystem-21-crs-transforms-pyproj is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of python-gis-ecosystem: 2.1 Coordinate Reference System Transforms (pyproj + GeoPandas) (+5).

Teams using python-gis-ecosystem-21-crs-transforms-pyproj should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/21-coordinate-reference-system-transforms-pyproj-g/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_archive/engineering/gis/python-gis-ecosystem/21-coordinate-reference-system-transforms-pyproj-g/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/21-coordinate-reference-system-transforms-pyproj-g/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How python-gis-ecosystem-21-crs-transforms-pyproj Compares

Feature / Agentpython-gis-ecosystem-21-crs-transforms-pyprojStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of python-gis-ecosystem: 2.1 Coordinate Reference System Transforms (pyproj + GeoPandas) (+5).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 2.1 Coordinate Reference System Transforms (pyproj + GeoPandas) (+5)

## 2.1 Coordinate Reference System Transforms (pyproj + GeoPandas)


```python
import geopandas as gpd

# Reproject wells to UTM Zone 31N (North Sea)
gdf_utm = gdf.to_crs("EPSG:32631")

# pyproj direct transform (for arrays)
from pyproj import Transformer
transformer = Transformer.from_crs("EPSG:4326", "EPSG:32631",
                                    always_xy=True)
x_utm, y_utm = transformer.transform(df["longitude"].values,
                                      df["latitude"].values)
```


## 2.2 Spatial Operations (Shapely + GeoPandas)


```python
import geopandas as gpd

# Buffer 500 m around wells (must be in projected CRS)
gdf_utm["geometry_buffer"] = gdf_utm.geometry.buffer(500)

# Spatial join: which lease blocks contain wells?
lease_blocks = gpd.read_file("lease_blocks.gpkg")
joined = gpd.sjoin(gdf_utm, lease_blocks,
                   how="left", predicate="within")

# Dissolve: merge overlapping buffers
merged = gdf_utm.set_geometry("geometry_buffer").dissolve()
```


## 2.3 Raster Processing (Rasterio)


```python
import rasterio
import numpy as np

with rasterio.open("bathymetry.tif") as src:
    depth = src.read(1).astype(float)
    depth[depth == src.nodata] = np.nan
    transform = src.transform   # affine transform
    crs = src.crs

# Extract depth at well locations
from rasterio.sample import sample_gen
coords = list(zip(gdf_utm.geometry.x, gdf_utm.geometry.y))
sampled = list(sample_gen(rasterio.open("bathymetry.tif"), coords))
gdf_utm["depth_m"] = [s[0] for s in sampled]
```


## 2.4 NetCDF / Metocean (xarray + rioxarray)


```python
import xarray as xr
import rioxarray    # noqa: F401 — registers .rio accessor

ds = xr.open_dataset("era5_wind.nc")
u10 = ds["u10"]                       # eastward wind component
v10 = ds["v10"]                       # northward wind component
ws  = np.sqrt(u10**2 + v10**2).rename("wind_speed")

# Clip to AOI (after setting spatial dims)
ds_clipped = ds.rio.set_spatial_dims("longitude", "latitude")
ds_clipped = ds_clipped.rio.write_crs("EPSG:4326")
ds_clipped = ds_clipped.rio.clip_box(
    minx=-5.0, miny=54.0, maxx=2.0, maxy=60.0
)
```


## 2.5 Interactive Map (Folium)


```python
import folium

m = folium.Map(location=[57.0, -1.0], zoom_start=6,
               tiles="CartoDB positron")

# Add well markers
for _, row in gdf.iterrows():
    folium.CircleMarker(
        location=[row.geometry.y, row.geometry.x],
        radius=5, color="red", fill=True,
        popup=row.get("well_name", "well")
    ).add_to(m)

m.save("wells_map.html")
```


## 2.6 Static Map (Cartopy)


```python
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import cartopy.feature as cfeature

fig, ax = plt.subplots(
    figsize=(10, 8),
    subplot_kw={"projection": ccrs.Mercator()}
)
ax.add_feature(cfeature.LAND, facecolor="lightgray")
ax.add_feature(cfeature.COASTLINE, linewidth=0.5)
ax.set_extent([-5, 2, 54, 60], crs=ccrs.PlateCarree())
ax.scatter(
    gdf.geometry.x, gdf.geometry.y,
    transform=ccrs.PlateCarree(), s=20, c="red", zorder=5
)
plt.savefig("wells_map.png", dpi=150, bbox_inches="tight")
```

---

Related Skills

repo-ecosystem-hygiene

5
from vamseeachanta/workspace-hub

Interpret the daily read-only repo ecosystem hygiene audit and route remediation through approved workflows.

provider-session-ecosystem-audit-and-exporters

5
from vamseeachanta/workspace-hub

Build and maintain cross-provider session-log audits for Codex, Codex, Hermes, and Gemini, including exporter design, normalization, and behavioral verification.

python-import-path-mismatch-debugging

5
from vamseeachanta/workspace-hub

Diagnose and fix ModuleNotFoundError when a package is installed but imports still fail due to environment/path mismatches

python-import-path-debugging

5
from vamseeachanta/workspace-hub

Diagnose ModuleNotFoundError when a package is installed but still fails to import

ecosystem-terminology

5
from vamseeachanta/workspace-hub

Canonical names, abbreviations, and relationship vocabulary for the workspace-hub ecosystem. Load this when naming repos, modules, machines, files, or expanding acronyms to ensure consistency across humans and agents. type: reference

llm-wiki-ecosystem-gap-to-issues

5
from vamseeachanta/workspace-hub

Review the workspace-hub LLM-wiki/document-intelligence ecosystem, identify high-leverage gaps, and create grounded GitHub feature issues without duplicating existing work.

python-debugpy

5
from vamseeachanta/workspace-hub

Debug Python: pdb REPL + debugpy remote (DAP).

hermes-ecosystem-integration

5
from vamseeachanta/workspace-hub

Wire Hermes into workspace-hub ecosystem — multi-repo skills, config sync, session export to learning pipeline, memory cross-pollination, skill patch tracking, and cross-machine health checks.

python-project-template

5
from vamseeachanta/workspace-hub

Generate standardized Python project structure with pyproject.toml, UV environment, pytest configuration, and workspace-hub compliance. Creates production-ready project scaffolding.

xlsx-to-python

5
from vamseeachanta/workspace-hub

Convert Excel calculation spreadsheets to Python code — extract formulas, build dependency graphs, generate pytest tests using cell values as assertions, and produce dark-intelligence archive YAMLs.

excel-workbook-to-python-v2

5
from vamseeachanta/workspace-hub

Convert engineering Excel workbooks to Python code using Codex Desktop cowork on Windows. Proven superior quality vs Linux openpyxl extraction (24 vs 7 functions, 81 vs 53 tests). Validated on Ballymore jumper installation analysis.

skill-ecosystem-curation

5
from vamseeachanta/workspace-hub

Class-level skill ecosystem curation: housekeeping, deduplication/collision reconciliation, archival, and consolidation governance.