[osmosis-dev] Using osmosis with --bounding-polygon

David Paleino dapal at debian.org
Sun Nov 29 08:51:33 GMT 2009


Hello people,
I already sent this to talk@, and I got no replies so far -- and probably 
here is the most correct place to post it.

I'm trying to create small dumps following some administrative borders. For 
example, starting from the Italy planet, I'd like to create dumps of regions 
and provinces.

Here's what I did:

a) download the members of the proper relation with JOSM (maybe I could 
   automate this with osmosis)
b) manually edit (some scripting will soon come) the ways to remove <tag 
   k='*' v='*' /> and only add polygon_file="foo.poly" and 
   polygon_id="way_N"
c) give this .osm to osm2poly, and hijack the output to "mazara.poly" [1]
d) run osmosis (from the SVN checkout, in my case) on it:

$ bin/osmosis --read-api left=12.373 right=12.886 bottom=37.573 top=37.89 \
> --bounding-polygon file="../mazara.poly" idTrackerType="BitSet" \
> completeWays="yes" --write-xml file="../mazara-poly.osm"

What I get in "mazara-poly.osm" is some ways, not all the objects contained 
within the polygon.

If I skip "completeWays=yes", I'm only getting a bunch of nodes (the dump 
seems ok, but josm only shows some nodes).

With completeWays=yes, I'm getting some ways, i.e. those crossing the 
borders of the polygon, plus some others inside (connected to the former 
ones). But I'm not getting (almost) any way starting and ending within the 
polygon, nor any node/building/anything else. I'm also getting a small 
adjacent administrative border, but this would be a minor issue at the 
current state.

Any help would be much apreciated :)

Kindly,
David

[1] http://people.debian.org/~dapal/mazara.poly

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://snipr.com/qa_page
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174





More information about the osmosis-dev mailing list