Hi Andrew,<div><br></div><div>osm2pgrouting right now doesn't work with PostGIS 2.0.</div><div>Even if you load legacy.sql it will fail because of MULTILINESTRING geometry type created by the tool.</div><div>The source shouldn't be too difficult to fix and make it work with PostGIS 2.0. A pull request would be very welcome, because I currently have no time to fix and test it.</div>
<div><br></div><div>One alternative would be to use osm2po (<a href="http://osm2po.de">osm2po.de</a>), which is fast and already has fixed the MULTILINESTRING issue.</div><div><br></div><div>Daniel</div><div><br></div><div>
<br></div><div><br><div class="gmail_quote">On Tue, Mar 19, 2013 at 2:53 AM, Andrew J Perrin <span dir="ltr"><<a href="mailto:andrew_perrin@unc.edu" target="_blank">andrew_perrin@unc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Greetings-<br>
<br>
I have postgis 2.0 installed under postgresql 9.1 on a Debian server. I am seeking to use pgRouting for a research task: we will ultimately need to be able to locate the three nearest locations (by routing, not geography) in our database to a list of addresses we will provide.<br>
<br>
I am working on importing OSM data on North Carolina, which will include all the routing information we need. I downloaded the file from <a href="http://download.geofabrik.de/north-america/us/north-carolina-latest.osm.bz2" target="_blank">http://download.geofabrik.de/<u></u>north-america/us/north-<u></u>carolina-latest.osm.bz2</a> and uncompressed it.<br>
<br>
I then ran:<br>
<br>
/usr/src/osm2pgrouting-master/<u></u>osm2pgrouting -file ./north-carolina-latest.osm -conf /usr/src/osm2pgrouting-master/<u></u>mapconfig.xml -dbname lenoir -user postgres -passwd *******<br>
<br>
The output was:<br>
host=127.0.0.1 user=postgres dbname=lenoir port=5432 password=*******<br>
connection success<br>
Trying to load config file /usr/src/osm2pgrouting-master/<u></u>mapconfig.xml<br>
Trying to parse config<br>
Trying to load data<br>
Trying to parse data<br>
Split ways<br>
Adding tag types and classes to database...<br>
Adding relations to database...<br>
Adding nodes to database...<br>
SSL error: sslv3 alert unexpected message<br>
Adding ways to database...<br>
Creating topology...<br>
#########################<br>
size of streets: 484625<br>
size of splitted ways : 1080943<br>
finished<br>
<br>
HOWEVER, no records are in the "ways" or "nodes" tables afterward:<br>
lenoir=# select count(*) from nodes;<br>
count<br>
-------<br>
0<br>
(1 row)<br>
<br>
lenoir=# select count(*) from ways;<br>
count<br>
-------<br>
0<br>
(1 row)<br>
<br>
<br>
...and the postgresql log shows:<br>
2013-03-18 13:41:12 EDT ERROR: value "2147643707" is out of range for type integer<br>
2013-03-18 13:41:12 EDT CONTEXT: COPY nodes, line 31000313, column id: "2147643707"<br>
2013-03-18 13:41:12 EDT STATEMENT: COPY nodes(id, lon, lat) from STDIN<br>
2013-03-18 13:41:13 EDT LOG: SSL renegotiation failure<br>
2013-03-18 13:41:13 EDT STATEMENT: COPY nodes(id, lon, lat) from STDIN<br>
2013-03-18 13:41:13 EDT LOG: SSL error: unexpected record<br>
2013-03-18 13:41:13 EDT STATEMENT: COPY nodes(id, lon, lat) from STDIN<br>
2013-03-18 13:41:13 EDT LOG: could not send data to client: Connection reset by peer<br>
2013-03-18 13:41:13 EDT STATEMENT: COPY nodes(id, lon, lat) from STDIN<br>
2013-03-18 13:41:13 EDT LOG: SSL error: unexpected record<br>
2013-03-18 13:41:13 EDT LOG: could not receive data from client: Connection reset by peer<br>
2013-03-18 13:41:13 EDT LOG: unexpected EOF on client connection<br>
<br>
<br>
Thanks for any advice.<br>
<br>
<br>
<br>
<br>
-- <br>
--<br>
<br>
------------------------------<u></u>------------------------------<u></u>----------<br>
Andrew J Perrin - Associate Professor of Sociology<br>
University of North Carolina - CB#3210, Chapel Hill, NC 27599-3210 USA<br>
<a href="mailto:andrew_perrin@unc.edu" target="_blank">andrew_perrin@unc.edu</a> - <a href="http://perrin.socsci.unc.edu" target="_blank">http://perrin.socsci.unc.edu</a> - (919) 962-6876<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG & Georepublic Japan<br>eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66,99,171)" target="_blank">daniel.kastl@georepublic.de</a><br>
Web: <a href="http://georepublic.de/" style="color:rgb(66,99,171)" target="_blank">http://georepublic.de</a></span>
</div>