Closed francot closed 6 years ago
can you send the result of: osm2pgrouting --version
Version 2.3.3
I was seeing the same thing with same version of osm2pgrouting. I removed visible="true" from the way node in my test file and the import into the DB worked. Maybe this might help inform what's going on with this error.
Hi @francot and @laura-moore ,
This error is raising because a bad boolean assignment using boost::lexical_cast while osm2pgrouting is parsing OSM elements. I reproduced the error with my own dataset too.
@cvvergara I fixed this bug with this PR: https://github.com/pgRouting/osm2pgrouting/pull/219
This bug is a regression because it was fixed in osm2pgrouting versions before v2.3.0 (in v2.2.0 was working fine). The code is exactly the same it was in v2.2.2.
Thanks!
Expected behavior and actual behavior
osm2pgrouting --f /home/franco/workspace/osm/map.osm --dbname routing --username postgres --conf /home/franco/workspace/osm2pgrouting/mapconfig.xml
return:
Testing database connection: routing database connection successful: routing Connecting to the database connection success
Creating tables... TABLE: ways_vertices_pgr already exists. TABLE: ways_vertices_pgr already exists. TABLE: ways_vertices_pgr already exists. TABLE: ways_vertices_pgr already exists. Opening configuration file: /home/franco/workspace/osm2pgrouting/mapconfig.xml Parsing configuration
Exporting configuration ...
bad lexical cast: source type value could not be interpreted as target
Steps to reproduce the problem:
osm data I use: (directly download from https://www.openstreetmap.org/) https://www.dropbox.com/s/z77wrxinbyojiau/map.osm?dl=0
Specifications
"PostgreSQL 9.5.10 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609, 64-bit"
"POSTGIS="2.2.1 r14555" GEOS="3.5.0-CAPI-1.9.0 r4084" PROJ="Rel. 4.9.2, 08 September 2015" GDAL="GDAL 1.11.3, released 2015/09/16" LIBXML="2.9.3" LIBJSON="0.11.99" TOPOLOGY RASTER"
"(2.1.0,pgrouting-2.1.0,1,b38118a,master,1.58.0)"
Latest Version from github of osm2pgrouting