geospatial-utilities
Guides SamGeo geospatial utility workflows for CRS checks, tile downloads, image preparation, raster/vector conversion, split/merge, region analysis, and UTM helpers.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- geospatial-utilities
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Guides SamGeo geospatial utility workflows for CRS checks, tile downloads, image preparation, raster/vector conversion, split/merge, region analysis, and UTM helpers.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md4.6 KB
- 参考文档references/troubleshooting.md2.4 KB
- 参考文档references/workflows.md3.2 KB
- 脚本scripts/mini_geotiff_roundtrip.py2.9 KB
03 SKILL.md 正文
Geospatial utilities
Use this sub-skill when the task is primarily raster/vector preparation,
coordinate handling, CRS troubleshooting, data conversion, or safe validation
around samgeo.common rather than direct model inference.
Read this when
- The user needs
tms_to_geotiff,image_to_cog,reproject,raster_to_vector,split_raster,merge_rasters,regularize,smooth_vector, orregion_groups. - The user asks how to prepare multi-band GeoTIFFs for SAM, choose
bands, or inspect raster metadata/statistics. - The task involves converting prompt coordinates or boxes from CRS coordinates to pixel coordinates.
- The user is debugging CRS distortion, empty vector outputs, out-of-bounds prompts, tile downloads, or vector driver issues.
Route elsewhere
- Model-specific automatic/prompt segmentation: core-segmentation.
- SAM3 tiled, text, or video workflows: samgeo3-workflows.
- Optional model wrappers and captioning: specialized-models.
- HTTP API request/response details: api-server.
Utility workflow order
- Inspect the raster first: CRS, transform, width/height, band count, dtype, nodata, and stats.
- Normalize imagery to uint8 RGB for SAM with
read_image_for_samorprepare_image_for_sam. - For map-tile workflows, keep bounding boxes small and confirm provider terms.
- After segmentation, inspect mask values before vectorization.
- Convert masks to vector formats, then optionally simplify, regularize, or smooth geometries.
- Reproject only when the user explicitly wants a different CRS for downstream visualization or analysis.
References and scripts
- workflows.md gives data-preparation and conversion recipes for common SamGeo support tasks.
- api-reference.md records verified helper signatures and input/output assumptions.
- troubleshooting.md covers CRS, bands, all-zero masks, tile download, GDAL/vector, and large-raster failures.
- scripts/mini_geotiff_roundtrip.py creates a tiny GeoTIFF and empty mask, then validates image prep and vector conversion without network access.
Native validation candidates
tests/test_utmconv.pyis the safe native case for UTM math.- The local subset of
tests/test_common.pyvalidates image prep, multi-band reads, and empty-mask vectorization. - Network examples such as map tile downloads are optional and should be run only when network/provider access is authorized.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).