System Architecture¶
Django Apps¶
apps.core: home, shared map config, root templatesapps.authentication: auth/profile/role supportapps.parcels: parcel domain model, views, APIs, upload/export, analytics
Frontend Module Layout (Parcels)¶
static/parcels/js/map/*: map init/data/render/controls/selectionstatic/parcels/js/map/raster-layers.js: basemap + DEM/landcover panel controls and overlay layeringstatic/parcels/js/analytics/*: statistics dashboard behaviorstatic/parcels/js/shared/*: selection store, form lock, style settings, icons, side panels
Selection Architecture¶
- Single tab-scoped selection store (
sessionStorage) - Shared by map and list/search workflows
- Emits change events to synchronize UI components
Map Data Architecture¶
parcel_geojson_viewhandles viewport requests- Uses
services.get_viewport_map_data(...) - At low zoom/high density: returns centroid-grid summaries
- At high zoom/lower density: returns individual parcel geometries
Spatial Computation Strategy¶
Preference is PostGIS-native operations where available:
- selection predicates (
intersects,within, centroid-in-shape) - area calculations (
ST_Area, transformed CRS) - centroid bucketing and grid summaries
Fallback Python paths exist for non-PostGIS local contexts.
Overlap Governance¶
apps.parcels.overlap_governance is the shared policy service for ordinary and
grouped workflows. It uses projected PostGIS candidates, symmetric topology
tolerances, validity intervals, declared-source exclusions, and bounded legacy
exemptions. Submit, review, approval, versioning, and the database trigger share
one transaction-scoped dataset advisory lock. Browser maps consume only WGS84
advisory geometry through map-overlap-conflicts.js; they never alter proposal
geometry.