fix(parcel-sync): scan uses remote GIS layer instead of empty local DB

- scanNoGeometryParcels now fetches TERENURI_ACTIVE features from remote
  ArcGIS (lightweight, no geometry) to cross-reference with eTerra immovable list
- Cross-references by both NATIONAL_CADASTRAL_REFERENCE and IMMOVABLE_ID
- Works correctly regardless of whether user has synced to local DB
- Renamed totalInDb -> withGeometry in NoGeomScanResult, UI, and API
- Extended fetchAllLayer() to forward outFields/returnGeometry options
This commit is contained in:
AI Assistant
2026-03-07 17:32:49 +02:00
parent 40b9522e12
commit b01ea9fc37
4 changed files with 49 additions and 28 deletions
+3 -3
View File
@@ -2,11 +2,11 @@
* POST /api/eterra/no-geom-scan
*
* Scans eTerra immovable list for a UAT and counts how many parcels
* exist in the eTerra database but have no geometry in the GIS layer
* (i.e., they are NOT in the local TERENURI_ACTIVE DB).
* exist in the eTerra database but have no geometry in the remote
* ArcGIS GIS layer (TERENURI_ACTIVE). Cross-references remotely.
*
* Body: { siruta: string }
* Returns: { totalImmovables, totalInDb, noGeomCount, samples }
* Returns: { totalImmovables, withGeometry, noGeomCount, samples }
*
* Requires active eTerra session.
*/