<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 24, 2011, at 11:36 AM, lorenzo amato wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Charles, Hi list<div><br></div><div>I'm approaching Navteq data in this days. </div><div>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.</div></blockquote><div><br></div>I use shp2pgsql. I use something like</div><div><br></div><div>shp2pgsql -d -I -D -s Shapefile.shp table_name > table_name.sql</div><div><br></div><div>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. </div><div><br><blockquote type="cite"><div>After that, with this:</div><div><br><div class="gmail_quote">2011/1/24 Charles Galpin <span dir="ltr"><<a href="mailto:cgalpin@lhsw.com">cgalpin@lhsw.com</a>></span><br><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
.. 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).</blockquote><div>
<br></div><div>you mean that I can directly use pgrouting on navteq data using ref_in_id and nref_in_id as source and target?</div></div></div></blockquote></div><br><div>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'). </div><div><br></div><div>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).</div><div><br></div><div>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.</div><div><br></div><div>hth</div><div>charles</div><div><br></div></body></html>