feat(tradein): бэкфилл координат листингов из ekb_geoportal_buildings (street+house match) #1841
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#1841
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/tradein-backfill-coords-geoportal"
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?
Зачем
Много листингов с
lat IS NULL(геокод не отработал). Теперь есть полный реестр зданий ЕКБ (ekb_geoportal_buildings, 34735) — можно проставить координаты джоином по адресу. Не-ЕКБ листинги не сматчатся (другой город) → останутся без координат (корректно: radius-фильтр оценки их не берёт = заодно не тянет padding-мусор в комплы).Что — задача
app/tasks/backfill_listings_coords_geoportal.pylat IS NULL(ЕКБ-скоуп) батчами.geocoder._parse_street_house(обрабатывает «г. Екатеринбург, ул. Малышева, 30, кв. 28» → street/house, чистит кв./корпус) + матч черезgeocoder._geoportal_house_match(нормализация street_norm/house_norm как в ingest).UPDATE listings SET lat, lon, geom=ST_SetSRID(ST_MakePoint(CAST(:lon AS double precision),CAST(:lat AS double precision)),4326) WHERE id=:id AND lat IS NULL. psycopg v3, CAST-форма.WHERE lat IS NULL— повтор не трогает заполненные), commit батчами, лог кандидаты/сматчено/обновлено/без-матча.Запуск (после деплоя)
Тесты
tests/tasks/test_backfill_listings_coords_geoportal.py): матч→coords, без-матча→skip, уже-с-координатами→skip, идемпотентностьWHERE lat IS NULL.⚠️ Это runnable-таска (не авто-расписание). Запущу вручную после деплоя. Связано: #1786 (геопортал), аудит скрапперов 2026-06-20.