diff --git a/README.md b/README.md index 7ccf9e1..72db7e9 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ BullMQ Worker (download queue, concurrency 1) BullMQ Worker (pipeline queue, concurrency 8) ├── refresh-city → orchestrates full ingest via FlowProducer ├── extract-pois → osmium filter + osm2pgsql flex → raw_pois - ├── generate-grid → PostGIS 200 m hex grid → grid_points + ├── generate-grid → PostGIS 200 m rectangular grid → grid_points ├── compute-scores → two-phase orchestrator (see Scoring below) ├── compute-routing → Valhalla matrix → grid_poi_details │ (15 parallel jobs: 3 modes × 5 categories) @@ -121,7 +121,7 @@ Destinations are sourced from OpenStreetMap and grouped into five categories — ### Grid -Each city is covered by a hexagonal grid at 200 m spacing. Hexagons tessellate uniformly and avoid the directional bias of square grids. One score is stored per grid point per (category × travel mode × threshold × profile) combination. +Each city is covered by a regular rectangular grid at 200 m spacing, generated in Web Mercator (EPSG:3857) and projected back to WGS84. One score is stored per grid point per (category × travel mode × threshold × profile) combination. On the map each grid point is rendered as a circle. ### Routing @@ -246,7 +246,7 @@ For each city the worker pipeline runs in two phases: **Phase 1 — Routing** (parallel child jobs, dispatched by `compute-scores`) -- *Walking, cycling, driving* — 15 parallel jobs (3 modes × 5 categories). A PostGIS KNN lateral join finds the 6 spatially nearest POIs per grid point; those coordinates are sent to Valhalla's `sources_to_targets` matrix API in batches. The nearest POI per subcategory is persisted to `grid_poi_details`. +- *Walking, cycling, driving* — 15 parallel jobs (3 modes × 5 categories). A PostGIS KNN lateral join finds the 6 spatially nearest POIs per grid point in the category; those coordinates are sent to Valhalla's `sources_to_targets` matrix API in batches. The nearest POI per subcategory is persisted to `grid_poi_details`. - *Transit* — 1 job per city (`compute-transit`). Concurrent isochrone calls (8 at a time) to the dedicated transit Valhalla instance; PostGIS `ST_Within` classifies POIs into contour bands. Runs first so it overlaps with the routing jobs. **Phase 2 — Score aggregation**