You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ranking roads by osm_type with goal of scoring roads with lower speed
153
150
limits higher. Uses helper table loaded by PgOSM Flex.
@@ -182,7 +179,6 @@ BEGIN
182
179
FROM normal_rnk
183
180
;
184
181
185
-
186
182
/*
187
183
Identify roads where a building could be
188
184
Not using actual buildings / addresses because:
@@ -239,12 +235,13 @@ END
239
235
$$
240
236
;
241
237
242
-
238
+
COMMENT ON PROCEDURE geo_faker.point_in_place_landuse IS 'Uses osm.landuse_polygon and osm.road_line to simulate probable locations for commercial store locations. Can be customized for custom landuse types by manually defining landuse_osm_types temp table.'
PARTITION BY store_id, customer_id ORDER BY distance
360
+
) AS rnk
361
+
FROM possible_roads
362
+
)
363
+
INSERT INTO faker_customer_location (store_id, customer_id, geom)
364
+
SELECT store_id, customer_id,
365
+
ST_Snap(geom_customer, geom_road, 300) AS geom_snapped
366
+
FROM ranked
367
+
WHERE rnk =1
368
+
;
369
+
COMMIT;
370
+
371
+
END LOOP;
372
+
373
+
END;
374
+
$$;
375
+
376
+
377
+
COMMENT ON PROCEDURE geo_faker.points_around_point IS 'Creates fake customer locations around a store. Locations are snapped to roads. Locations not scoped to landuse at this time. Requires faker_store_location temp table with fake store data.';
0 commit comments