feat(parcel-sync): fix click, color styling, UAT boundary cross-check

Click fix:
- Keep l-terenuri-fill visible but transparent (opacity 0) so it still
  catches click events for FeatureInfoPanel. Enrichment overlay renders
  underneath.

Color changes:
- No enrichment: amber/yellow fill (was light green)
- With enrichment: green fill
- Buildings: red fill = no legal docs, blue = legal, gray = unknown
- Parcel outline: red = building no legal, blue = building legal

Boundary cross-check (/api/geoportal/boundary-check?siruta=X):
- Finds "foreign" parcels: registered in other UATs but geometrically
  within this UAT boundary (orange dashed)
- Finds "edge" parcels: registered here but centroid outside boundary
  (purple dashed)
- Alert banner shows count, legend updated with mismatch indicators

Martin config: added gis_cladiri_status source with build_legal property.
Enrichment views: gis_cladiri_status now JOINs parent parcel's BUILD_LEGAL.

Requires: docker restart martin + POST /api/geoportal/setup-enrichment-views

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
AI Assistant
2026-03-24 16:05:12 +02:00
parent 2848868263
commit ba71ca3ef5
4 changed files with 450 additions and 92 deletions
@@ -47,8 +47,14 @@ const VIEWS = [
f."cadastralRef" AS cadastral_ref,
f."areaValue" AS area_value,
f."isActive" AS is_active,
COALESCE((p.enrichment->>'BUILD_LEGAL')::int, -1) AS build_legal,
f.geom
FROM "GisFeature" f
LEFT JOIN "GisFeature" p
ON p.siruta = f.siruta
AND p."cadastralRef" = f."cadastralRef"
AND (p."layerId" LIKE 'TERENURI%' OR p."layerId" LIKE 'CADGEN_LAND%')
AND p.enrichment IS NOT NULL
WHERE f.geom IS NOT NULL
AND (f."layerId" LIKE 'CLADIRI%' OR f."layerId" LIKE 'CADGEN_BUILDING%')`,
},