feat(site-finder): OSM инж.сети на карту analyze (#1746) #1934
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#1934
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/1746-utility-infra-map"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Что
Финальный фронт-кусок #1746: слой OSM инженерных сетей (
osm_utility_infrastructure_ekb, эндпоинтGET /parcels/{cad}/utility-infrastructure) наносится на карту в секции «Сети» analyze — рядом с точками подключения НСПД и ЗОУИТ из #1751, на той же карте с тогглами.Бэкенд-часть (таблица 3084 элемента, эндпоинт, weekly-beat, типы) уже задеплоена ранее. Это рендер.
Как
useUtilityInfrastructure— react-query хук (зеркалоuseConnectionPoints).UtilityInfrastructureLayer— Point→CircleMarker, LineString/Polygon (+Multi)→<GeoJSON>(важно: данные — в основном ЛЭП-линии, не точки), цвет поinfrastructure_kind(power/water/gas/heat/communication/sewage), попапы (имя + тип + source_tag + расстояние).UtilityLayerControlPanel— сворачиваемая легенда, чекбокс+счётчик на тип, «показать все».SiteMap— опц. пропutilityInfrastructure+visibleUtilityKindsSet (поведение CP/ЗОУИТ/POI/market не тронуто).Section2NetworksUtilities— карта показывается, если есть данные CP или OSM; пустое состояние при нуле фич.[lon,lat]→[lat,lon], группировка.Контракт (проверен live curl на проде)
UtilityInfrastructureResponse { features[], summary{total_features, nearest_distance_m, nearest_by_kind} };geometry_geojson— готовый GeoJSON-объект (ST_AsGeoJSON), координаты[lon,lat]. Ответ капается бэкендомLIMIT 200(не 3к) → нет джанка на рендере.Проверки
npm run type-check✅ ·npm run lint✅ (0 warnings) ·npm run build✅ (25 routes) ·npm run test✅ 168 passed (156 + 12 new).code-reviewer: ✅ APPROVE, 0 critical (3 косметических минора, скопированы из паттерна #1751 1:1).Пост-деплой визуальная проверка: открыть
/site-finder/analysis/66:41:0702048:27секцию «Сети» → янтарные ЛЭП-линии + работающие тогглы «Инженерные сети (OSM)».Refs #1746
Section2 "Сети" map now shows the OSM engineering-networks layer (osm_utility_infrastructure_ekb, endpoint /parcels/{cad}/utility-infrastructure) alongside the NSPD connection-points + ЗОУИТ layers from #1751, on the same map. - useUtilityInfrastructure hook (react-query, mirrors useConnectionPoints) - UtilityInfrastructureLayer: Point→CircleMarker, LineString/Polygon(+Multi)→GeoJSON, per-kind colour (power/water/gas/heat/communication/sewage), popups - UtilityLayerControlPanel: collapsible legend, per-kind toggle + count - SiteMap: optional utilityInfrastructure prop + visibleKinds state (CP/ЗОУИТ unchanged) - 12 unit tests (geometry parsing + [lon,lat]→[lat,lon] swap + grouping) Refs #1746