[OSM-talk] OSMXapi

Daniel Taylor daniel.taylor at danielt.com
Thu Mar 20 23:13:07 GMT 2008


Frederik Ramm wrote:
> Hi,
> 
>> That might be the cause of your issues, and if so there doesn't seem to 
>> be a way around it.
> 
> If you need a properly "cut" bounding box then you can run your .osm
> file from OsmXAPI through an Osmosis -bb task afterwards. This will
> drop all nodes outside the box, and cut ways extending past the box.
> 
> Bye
> Frederik
> 
Frederik,

Well that was another thing that puzzled me, because I tried that and it 
didn't (seem to) work. (Although it's entirely possible that it's my fault).

http://wiki.openstreetmap.org/index.php/Osmosis#--bounding-box_.28--bb.29

Says that the completeWays and completeRelations are off ('no') by 
default (I tried enabling them just to see if the logic was reversed 
(ie. a bug) and explicitly turning them off, but on luck).

Here's what I was using:

java -jar osmosis-0.24/osmosis.jar --read-xml file=data.osm -bb 
left=-2.6951453125 right=53.53062734375 top=2.6072546875 
bottom=53.57457265625 completeRelations=no completeWays=no --write-xml 
file=data.osm

I could be doing that wrong, I even tried cutting it into a tiny bbox 
using coordinates that where only a few seconds apart, but still 
couldn't make it work.

It does make some difference however (new file here shown against a backup):
-rw-r--r--  1 daniel daniel    1046290 2008-03-20 23:03 data.osm
-rw-r--r--  1 daniel daniel    1190058 2008-03-20 13:49 data.osm.1

No visible changes though, hmm weird, that one must be my fault, I'll 
keep playing.

Thanks for your help,

- Daniel




More information about the talk mailing list