Open iboates opened 7 years ago
@iboates , how do you clip using Osmosis?
When I clipped a polygon area, there was no problem as far as I remember. I'm not anymore 100% sure anymore, if it was develop
branch and not master
, but I will try again.
This was the command I used:
osmosis --read-pbf ./europe-latest.osm.pbf --bounding-polygon \
file="boundary.poly" --write-xml file="clipped.osm"
If you can post your Osmosis command we can try to reproduce.
@dkastl I used this command:
osmosis/bin/osmosis --read-xml data/routing_data.osm bounding-box top={0} left={0} right={0} bottom={0} --write-xml data/routing_data_bb.osm
The {0} are the extent values that get automatically inserted.
I see the same on development 2.3.1, although
an example is
<way id="7824261" version="18" timestamp="2017-08-28T18:33:42Z" changeset="51518580" uid="209796" user="LudovicG">
<nd ref="2522436537"/>
<nd ref="296145012"/>
<nd ref="57309342"/>
<tag k="highway" v="primary"/>
<tag k="lanes" v="2"/>
<tag k="name" v="Pont Mirabeau"/>
<tag k="oneway" v="yes"/>
<tag k="surface" v="asphalt"/>
</way>
which enters the database with source_osm 2522436537 target_osm 296146263
this is when using these commands:
wget -O europe.osm.pbf http://download.geofabrik.de/europe-latest.osm.pbf
# osmconvert is 0.8.5
osmconvert europe.osm.pbf --drop-author -o=europe.o5m
#osmfilter is 1.4.3
./osmfilter europe.o5m --keep=" ( highway=motorway =motorway_link = motorway_junction =trunk =trunk_link =primary =primary_link ) or ( route=ferry ) " --drop="access=no" -o=roads/europe-roads.osm
# osm2pgrouting Version 2.3.1
osm2pgrouting --tags --f roads/europe-roads_small.osm --conf mapconfig.xml --dbname routing --username damiaan --clean
Also having this issue from the osm2pgrouting 2.3.3 installed via homebrew on mac.
osmosis --read-xml latest.osm --bb left=1 right=2top=1 bottom=2 --write-xml subset.osm
osm2pgrouting --f subset.osm --conf mapconfig.xml --dbname postgres --username postgres --clean
I am testing out the
develop
in the application i am developing and this is the output i get when running on an osm file that has been clipped by a bounding box usingosmosis
:https://imgur.com/a/JIGgt
It looks like a lot of the lines are being misconnected. I tried it again using no bounding box and it seems to work fine.
This does not happen when using the master branch.
Here is the output of the run: