File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -39,13 +39,21 @@ For Paris this could be
39
39
40
40
https://www.openstreetmap.org/api/0.6/relation/7444/full
41
41
42
+ (This will not always work, see below on how to fix this.)
43
+
42
44
This works well for smaller multipolygons (such as city boundaries), but for
43
45
very large multipolygons (such as a whole country) chances are you'll get a
44
46
timeout from the API. If you have an OSM file lying around that contains the
45
47
boundary, you can use osmium to get the relation and all the nodes and ways
46
48
used in that relation:
47
49
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.
49
57
50
58
And now you can create the extract:
51
59
You can’t perform that action at this time.
0 commit comments