Skip to content
Back to skills

Cadastral Schema

ASecurity

Mauza/Parcel Firestore model, size limits, geohash, geometry storage, rule constraints.

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 19, 2026
ai-agentsbackend

Security analysis

A100/100

Scanned September 19, 2026

npx -y skills add Adilmunawar/ZD-claude-plugin --skill cadastral-schema --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cadastral Schema?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cadastral Schema
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adilmunawar-cadastral-schema/badge)](https://www.skillsdirectory.com/skills/adilmunawar-cadastral-schema)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cadastral-schema
paths: ["src/firebase/**", "src/types/**", "firestore.rules", "docs/backend.json"]
description: Mauza/Parcel Firestore model, size limits, geohash, geometry storage, rule constraints.
---

# Cadastral schema (Firestore + Storage)

**Mauzas/{mauzaId}** — searchable metadata only. Required: `id`, `name`, `tehsil`, `district`, `hudbust_no`, `boundingBox [W,S,E,N]`, `geometryUrl`, `totalParcels`, `createdAt`. Optional: `parcelsGeometryUrl`, `totalAreaAcres`, `isCompressedInFirestore`, `assignedStatus`, `groupName`, `customMauzaId`.
**Parcels/{parcelId}** — `id`, `mauza_ref`, `plot_no`, `land_use`, `area_sqm`, `centroid` (GeoPoint), `geohash`, `geometryUrl`, plus attributes from the source DBF.

Rules of thumb
- Geometry never lives in the document body except as gzip+base64 under 1 MB (`isCompressedInFirestore=true`, compressed via `compressJsonToBase64`). Larger → Cloud Storage minified GeoJSON, referenced by URL.
- Firestore document limit is 1 MiB; keep metadata documents under 100 KB so listing queries stay cheap.
- `geohash` (geofire-common) on every parcel and mauza centroid enables radius queries; always set it on write.
- Ids: `mauzaId = name.replace(/[^a-zA-Z0-9-_.]/g, '_')`; parcel ids are stable across re-uploads (derive from `customMauzaId + plot_no`), so re-import updates rather than duplicates.
- `firestore.rules` validate field presence and types on write; a write that omits `geometryUrl`, `geohash` or `area_sqm` is rejected — mirror any schema change in the rules and in `docs/backend.json`.
- Units: `area_sqm` in documents; acres only for display (`× 0.000247105`).
- Batch uploads: chunk to ≤ 500 writes per batch; show progress; make re-runs idempotent.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…