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.