I have little experience with postgres and none with pgrouting.
I'm trying to use the pgr_drivingDistance
function with Open Street Map data (generated through osm2po
), but whenever I run my query:
SELECT pgr_drivingDistance('SELECT id, osm_source_id::int4 AS source, osm_target_id::int4 AS target, cost::float8 AS cost FROM nyc_2po_4pgr', 85, 2, false, false);
I get ERROR: integer out of range
—I assume because some of the osm_source_ids I'm getting in don't fit in an int4
. Is that what's going on?
I'm using a small subsection of the OSM data, so I assume I could squash the source_ids/target_ids into an int4
range. How would I do that?
Alternatively, is there a way to make the pgr_drivingDistance
work with the larger source/target ids?