Skip to content

Commit 4d30950

Browse files
committed
Add using of -t to getid command when creating boundaries for extracts.
1 parent 2485be0 commit 4d30950

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

_osmium_tool_manual/09_creating_extracts.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,21 @@ For Paris this could be
3939

4040
https://www.openstreetmap.org/api/0.6/relation/7444/full
4141

42+
(This will not always work, see below on how to fix this.)
43+
4244
This works well for smaller multipolygons (such as city boundaries), but for
4345
very large multipolygons (such as a whole country) chances are you'll get a
4446
timeout from the API. If you have an OSM file lying around that contains the
4547
boundary, you can use osmium to get the relation and all the nodes and ways
4648
used in that relation:
4749

48-
osmium getid -r france.pbf r7444 -o paris-boundary.osm
50+
osmium getid -r -t france.pbf r7444 -o paris-boundary.osm
51+
52+
The options are important here: `-r` makes sure you get all the members of
53+
the relation and all the nodes in the member ways. `-t` removes the tags from
54+
all objects except the relation 7444 itself. This way only the relation itself
55+
is turned into a (multi)polygon and not other relations or closed ways that
56+
happen to be in the data.
4957

5058
And now you can create the extract:
5159

0 commit comments

Comments
 (0)