feat(site-finder): opportunity-ЗУ + red-line map layers (§12.1-13, #958) #1177

Merged
bot-backend merged 1 commit from feat/map-layers-958 into main 2026-06-09 07:19:54 +00:00
Collaborator

Summary

Adds two §12.1-13 toggleable map layers to the Site Finder analysis map (#958). The geometry was already serialized on /analyze but dropped by the MiniMap adapter — this wires it through:

  • Перспективные ЗУ (nspd_opportunity_parcels.geom_wkt, POLYGON/MULTIPOLYGON) — --viz-3 teal; per-subtype RU popups (ЗУ на торгах / свободный / перспективный / ООПТ).
  • Красные линии застройки (nspd_red_lines.geom_wkt, LINESTRING/MULTILINESTRING) — --warn dashed; popup shows intersection-length (ALERT) or nearby distance.

Wired as toggles in the existing CpLayerControlPanel (Рынок group); reuses wkt.ts extended with LINESTRING/MULTILINESTRING. Leaflet stays behind dynamic(ssr:false). Empty/invalid geometry → renders nothing gracefully; panel counts reflect only mappable features.

Flagged backend follow-ups (NOT faked)

The other §12.1-13 layers carry no frontend-map-able geometry yet — left as backend follow-ups:

  • §22 future_market / special_indices = district scalars (no coords); future_competitors lacks lat/lon → "hidden/future supply" layer needs geom attached.
  • ППТ-ПМТ (planning_projects) polygons not exposed to frontend.
  • future-ЖК (newbuilding_listings) points not in /analyze.

Test plan

  • npm run lint clean; npx tsc --noEmit clean
  • vitest wkt.test.ts20 passed (+4: LINESTRING/MULTILINESTRING lon/lat order, comma-split nesting, GEOMETRYCOLLECTION→null guard)
  • code-reviewer APPROVE (wkt correctness, no any / no useEffect-HTTP / XSS / dep-drift all clear; backend contract field-for-field verified)
  • visual smoke: /site-finder/analysis/<cad> with a loaded NSPD quarter dump → toggle "Перспективные ЗУ" / "Красные линии" in the Рынок group; popups RU; empty-dump parcel renders nothing without errors.

Scope

Frontend only (6 files). No backend/parcels.py touched; no new dependency (react-leaflet already present, no lockfile drift).

Refs #958

## Summary Adds two §12.1-13 toggleable map layers to the Site Finder analysis map (#958). The geometry was already serialized on `/analyze` but **dropped by the `MiniMap` adapter** — this wires it through: - **Перспективные ЗУ** (`nspd_opportunity_parcels.geom_wkt`, POLYGON/MULTIPOLYGON) — `--viz-3` teal; per-subtype RU popups (ЗУ на торгах / свободный / перспективный / ООПТ). - **Красные линии застройки** (`nspd_red_lines.geom_wkt`, LINESTRING/MULTILINESTRING) — `--warn` dashed; popup shows intersection-length (ALERT) or nearby distance. Wired as toggles in the existing `CpLayerControlPanel` (Рынок group); reuses `wkt.ts` extended with LINESTRING/MULTILINESTRING. Leaflet stays behind `dynamic(ssr:false)`. Empty/invalid geometry → renders nothing gracefully; panel counts reflect only mappable features. ## Flagged backend follow-ups (NOT faked) The other §12.1-13 layers carry no frontend-map-able geometry yet — left as backend follow-ups: - §22 `future_market` / `special_indices` = district scalars (no coords); `future_competitors` lacks lat/lon → "hidden/future supply" layer needs geom attached. - ППТ-ПМТ (`planning_projects`) polygons not exposed to frontend. - future-ЖК (`newbuilding_listings`) points not in `/analyze`. ## Test plan - [x] `npm run lint` clean; `npx tsc --noEmit` clean - [x] `vitest wkt.test.ts` → **20 passed** (+4: LINESTRING/MULTILINESTRING lon/lat order, comma-split nesting, GEOMETRYCOLLECTION→null guard) - [x] code-reviewer ✅ APPROVE (wkt correctness, no any / no useEffect-HTTP / XSS / dep-drift all clear; backend contract field-for-field verified) - [ ] visual smoke: `/site-finder/analysis/<cad>` with a loaded NSPD quarter dump → toggle "Перспективные ЗУ" / "Красные линии" in the Рынок group; popups RU; empty-dump parcel renders nothing without errors. ## Scope Frontend only (6 files). No backend/parcels.py touched; no new dependency (react-leaflet already present, no lockfile drift). Refs #958
bot-backend added 1 commit 2026-06-09 07:17:50 +00:00
feat(site-finder): add opportunity-ЗУ + red-line map layers (§12.1-13, #958)
All checks were successful
CI / changes (push) Successful in 6s
CI / backend-tests (push) Has been skipped
CI / frontend-tests (push) Successful in 40s
CI / changes (pull_request) Successful in 5s
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Successful in 39s
521d75a8e9
Render the §12.1-13 geometry already exposed on /analyze but previously
dropped by the MiniMap adapter:
- Перспективные ЗУ (nspd_opportunity_parcels.geom_wkt) — viz-3 polygons
- Красные линии застройки (nspd_red_lines.geom_wkt) — warn dashed lines

Wired as toggles in the existing CpLayerControlPanel (Рынок group),
reusing wkt.ts (extended with LINESTRING/MULTILINESTRING for red lines).
Empty/invalid geometry renders nothing gracefully; popups RU plain-text.

§22 forecast (future_market/special_indices), ППТ-ПМТ planning polygons
and future-ЖК points carry no map-able geometry on the frontend yet — left
as backend follow-ups, not faked.

Refs #958
bot-backend merged commit df9d54b532 into main 2026-06-09 07:19:54 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lekss361/gendesign#1177
No description provided.