mcpField
G
geohash-spatial-code-maps

geohash-spatial-code-maps

github.com/pproencaData & databases218121 installsUpdated 11w ago
Repository

About geohash-spatial-code-maps

A reference skill for implementing geohashes and using them for spatial queries, indexing, and codebase maps. It is aimed at TypeScript and Rust developers, with prioritized rules covering both established geohash practices and a proposed code-mapping pattern.

Key features

  1. 01Geohash 编码与解码规则
  2. 02精度、邻接与范围查询
  3. 03空间索引与存储建议
  4. 04代码库映射至二维空间
  5. 05地图式导航与渲染建议

Use cases

  1. 01实现或审查 TypeScript、Rust 地理哈希
  2. 02调试边界与精度相关错误
  3. 03为位置数据设计邻近搜索
  4. 04将代码库组织为可导航地图

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pproenca/dot-skills --skill geohash-spatial-code-maps

After installing, type/geohash-spatial-code-mapsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

AGENTS.md
metadata.json
assets/templates/
_template.md
references/
_sections.md
dec-avoid-roundtrip-reencode.md
dec-decode-to-bbox.md
dec-precompute-reverse-alphabet.md
dec-symmetric-interval-reconstruction.md
enc-base32-alphabet.md
enc-binary-chop-no-float-drift.md
enc-five-bit-char-boundary.md
enc-integer-morton-encode.md
enc-interleave-longitude-first.md
enc-normalize-input-domain.md
idx-db-prefix-index.md
idx-integer-sortable-key.md
idx-range-query-from-covering-set.md
idx-sorted-string-range-scan.md
idx-trie-hierarchical-bucketing.md
map-coupling-implies-proximity.md
map-deterministic-projection.md
map-normalize-to-geohash-domain.md
map-persist-coordinate-sidecar.md
map-precision-as-architectural-level.md
map-prefix-as-domain-region.md
map-stable-coordinates.md
nav-breadcrumb-prefix-path.md
nav-cluster-by-prefix.md
nav-level-of-detail-aggregation.md
nav-precision-to-zoom-levels.md

Details

From the project README

Geohash & Spatial Code Maps Best Practices

How to implement geohashes correctly in TypeScript and Rust, how to query and index them at scale, and how to apply them to the "codebase as a navigable 2D map" pattern — projecting code into a plane so geohash prefixes become domain regions you can fly through like Google Maps. Contains 42 rules across 8 categories, prioritised by impact.

When to Apply

Reference these guidelines when:

  • Implementing or reviewing a geohash encoder/decoder in TypeScript or Rust (bit interleaving, base32, precision, neighbours)
  • Building proximity / radius / bounding-box search on lat/lon data, or storing geohashes as index keys (SQL B-tree, Redis sorted sets)
  • Debugging the classic geohash bugs — swapped axes, wrong alphabet, border false negatives, off-by-one cells at high precision
  • Projecting a codebase (or any abstract graph) into a 2D plane and geohashing it so prefixes name business domains or features
  • Navigating a geohashed dataset like a slippy map: zoom-to-precision, viewport tile loading, level-of-detail aggregation, prefix clustering, deep links

A note on scope

Categories 1–4, 6, and 7 are textbook geohashing, drawn from authoritative sources (the geohash spec, the davetroy/geohash-js neighbour tables, Redis, Elasticsearch). Categories 5 (map-) and 8 (nav-) are a novel synthesis — there is no canonical "geohash your codebase" library, so those rules derive design principles from established techniques (deterministic graph layout, Morton/Z-order keys, slippy-map tiling, software cartography). They are honest about when the pattern is overkill.

Rule Categories by Priority

PriorityCategoryImpactPrefixRules
1Encoding & Bit InterleavingCRITICALenc-6
2Precision & Cell GeometryCRITICALprec-5
3Neighbours & AdjacencyHIGHnbr-5
4Proximity & Range QueriesHIGHqry-5
5Codebase-as-Map Spatial LayoutHIGHmap-7
6Decoding & Bounding BoxesMEDIUM-HIGHdec-4
7Spatial Indexing & StorageMEDIUM-HIGHidx-5
8Navigation & RenderingMEDIUMnav-5

Quick Reference

1. Encoding & Bit Interleaving (CRITICAL)
2. Precision & Cell Geometry (CRITICAL)
3. Neighbours & Adjacency (HIGH)
4. Proximity & Range Queries (HIGH)
5. Codebase-as-Map Spatial Layout (HIGH)
6. Decoding & Bounding Boxes (MEDIUM-HIGH)
7. Spatial Indexing & Storage (MEDIUM-HIGH)
8. Navigation & Rendering (MEDIUM)

How to Use

Read individual reference files for detailed explanations, code examples, and "when NOT to apply" guidance:

Rules cross-link via [[other-rule-slug]]; follow them when a related pattern is referenced. To build a code map end to end, the spine is: map-deterministic-projection → map-normalize-to-geohash-domain → encode (category 1) → map-prefix-as-domain-region → navigate (category 8).

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information

Comments

Markdown supported