[postgis-users] pgr_drivingdistance problem

James Keener jim at jimkeener.com
Fri Aug 28 17:45:45 PDT 2015


When I run |pgr_drivingdistance|
<http://docs.pgrouting.org/2.0/en/src/driving_distance/doc/dd_driving_distance.html>
on an small extract (578 rows) (attached) from an extract of
Pennsylvania's osm pbf file
<http://download.geofabrik.de/north-america/us/pennsylvania.html> not
all edges are being followed. I first downloaded the pbf. Then I
imported it with |osm2pgrouting|
<https://github.com/pgRouting/osm2pgrouting> |

osmosis --read-pbf file=pennsylvania-latest.osm.pbf --write-xml pennsylvania-latest.osm
osm2pgrouting -file pennsylvania-latest.osm -conf /usr/share/osm2pgrouting/mapconfig.xml -dbname osm3 -user jim -skipnodes -passwd hunter2

| and then running |

CREATE TABLE smallways AS
  SELECT * FROM ways 
  WHERE ST_DISTANCE(the_geom, ST_GEOMFROMTEXT('POINT(-79.900121 40.448889)', 4326)) < 0.2;

| and creating the appropriate indices to build a test environment (the
output of which is the small extract (578 rows)(attached)). To test
|pgr_drivingdistance|, I did the following: |

CREATE OR REPLACE VIEW testing AS 
  SELECT gid,
    the_geom
  FROM ( SELECT
          seq,
          id1 AS vertext_id,
          id2 AS gid,
          cost
         FROM pgr_drivingdistance(
          'SELECT gid AS id, source, target, 
                  length AS cost, reverse_cost 
           FROM smallways', 
          179103,
          0.5,
          false, 
          true) ) t
  INNER JOIN smallways USING (gid);

| and then loading that view into QGIS, I see the following:
<cid:part5.06050408.08070207 at jimkeener.com>
Why are some edges not being selected? I initially thought it was the
|(source, target)| (labels in screenshot) ordering, but that doesn't
seem to be the case, as some edges such as 148517 to the SW of the
annotated starting point, seems to be in good order. |

Jim
|
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150828/22aa7231/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot - 08282015 - 07:57:32 PM.jpg
Type: image/jpeg
Size: 41978 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150828/22aa7231/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot - 08282015 - 07:57:32 PM.png
Type: image/png
Size: 125238 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150828/22aa7231/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smallways.sql.bz2
Type: application/x-bzip
Size: 40003 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150828/22aa7231/attachment.bin>


More information about the postgis-users mailing list