I've posted on here before about my battles with drivetime polygons and got some sensible suggestions back.
I'm on a Windows 7 PC. I've followed the excellent guide at underdark.wordpress.com and got postgreSQL installed, with PostGIS and pgRouting. I've downloaded OSM data for the UK from Cloudmade (and Geofabrik for that matter) and I've used the wonderful osm2po to get that data into the postgreSQL database. So far, so good. No errors, no problems, looks like a database to me. I've got a table called network with obvious column names like id, source, target, kmh, cost etc. Just what I would have expected if I'd defined them myself.
So I've fired up the SQL query panel, banged in the SELECT * FROM Driving_Distance statement and fed it the id, source, target and cost columns. I was trying to find 30 minutes around Northampton and the output did indeed some roads within Northampton(shire) - but the rest were in North Wales, which can't possibly be right. At 3:30am this morning it occured to me that the table also had columns named osm_source_id, osm_target_id and osm_id so perhaps it might be a bit more sensible if I used those. Made sense to me as most things do at that time of the morning, so I ran it again and now I just get "starting vertex not found" every single time.
So to summarise. This works, but doesn't find the right roads:
SELECT network.id,network.x2,network.y2,network.geom_way FROM network JOIN (SELECT * FROM driving_distance(' SELECT id, source, target, cost/60::float8 AS "cost" FROM network', 1516905, 0.025, false, false)) AS route ON network.id = route.vertex_id;
This doesn't work at all:
SELECT network.id,network.x2,network.y2,network.geom_way FROM network JOIN (SELECT * FROM driving_distance(' SELECT osm_id::int4 AS "id", osm_source_id::int4 AS "source", osm_target_id::int4 AS "target", cost/60::float8 AS "cost" FROM network', 1516905, 0.025, false, false)) AS route ON network.id = route.vertex_id;
The same message happens whether or not I'm using Cloudmade or Geofabrik data, so I'm at a bit of a loss.