[pgrouting-users] about use of navteq data

Charles Galpin cgalpin at lhsw.com
Mon Jan 24 12:04:14 EST 2011


On Jan 24, 2011, at 11:36 AM, lorenzo amato wrote:

> Hi Charles, Hi list
> 
> I'm approaching Navteq data in this days. 
> I have a navteq shapefile streets.shp, so the first thing to do (i suppose) is to import it in postgis with the shp2postgresql tool or with ogr2ogr library.

I use shp2pgsql. I use something like

shp2pgsql -d -I -D -s Shapefile.shp table_name > table_name.sql

If you need the Traffic table, be aware you will want to use the -n option instead of -I on that one since the latest navteq data does not contain any geometry in this table like it used to and it won't load otherwise. 

> After that, with this:
> 
> 2011/1/24 Charles Galpin <cgalpin at lhsw.com>
>  
> .. but in theory you should be able to use navteq's ref_in_id and nref_in_id  which are the equivalent of the source/target pgRouting builds itself, but I had issues (but can't recall the specifics).
> 
> you mean that I can directly use pgrouting on navteq data using ref_in_id and nref_in_id as source and target?

I said in theory :) It will probably need some preparation work, just like you'll need to do some prep work for the assign_vertex way too.  In the Navteq data each link has a ref_in_id and nref_in_id and a flag indicating the direction 'dir_travel', and any links that share these nodes meet. But many streets are bi-directional and the links are not all oriented from source to target (you have to use the combination of them to figure it out).  So a street will be marked as going "from" the reference node 'ref_in_id' or "to" it (in other words "from" the non-reference node 'nref_in_id').  

So  you would likely want to first make sure all the links are aligned from source to target, and then possibly split out the bidirectional links into two links (one for each direction). I do both for my needs but I don't think either are needed for the assign_vertex method (not sure on the bi-directional issue).

And as Stephen just said, I have seen several references to the fact that you want the source/target ids to be as small as possible for performance, so then you'd likely want to generate new source/target columns from them with incrementing numbers to get a smaller consecutive set.

hth
charles

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20110124/886f47dc/attachment.html


More information about the Pgrouting-users mailing list