I'm wanting to know about the best practices and the most practical approaches to relation hierarchies. And importantly if the ideal approach is different from the practical approach. Specifically, I've recently added a relation for the Haida Gwaii island group (edit). It is a major island group and had not been labelled correctly. As many of the islands were already mapped as multipolygons, I added these mulitpolygons to the relation. Now when I look at the relation it only shows the islands mapped as a single way. I'm not sure if this is a problem. Perhaps it's suboptimal, but at present the best solution. My main goal in mapping this group of islands was to have it mapped in a meaningful way in the database, but it'd be nice if it would display in a meaningful way when searched for, and if a label was rendered. asked 26 Jul '16, 20:44 keithonearth |
Relations of type=multipolygon don't accept other relations as members, but only ways (closed or not), with roles outer and inner. Multipolygon relations don't accept nodes either. So including multipolygon relations as members of the Haida Gwaii archipelago is the reason for your problem. There is actually an alternave to the type=multipolygon, that is the type=cluster, that would accept as members a) single ways (for simple islands), 2) multipolygon relations for complex islands, like Graham island, and even c) islands mapped as nodes. No roles for any of them. But type=cluster is only a draft!. To map the whole Haida Gwaii archipelago as type=multipolygon relation, you have to download all the natural=coastline ways of the archipelago (3,843 ways), download the relation and open it, delete all members, then select all those 3,843 ways, add them to the relation as outer and upload. Procedure with JOSM: To download all the coastline ways, you better use overpass with JOSM (Shift + Alt + UpArrow): Next, you download the relation. For that, you first get its id: We see that it is 6439518. Now we download the relation with Download object... (Ctrl + Shift + O) (we only download the relation members and not in a separate layer): Now, we open the relation, select all its current members and we delete them: Now, we set two filters, natural="coastline" and type:node as follows: And select all coastline ways: You add them to the Haida Gwaii archipelago multipolygon relation, with role outer: And now you are ready to upload the modified relation to OSM. answered 04 Aug '16, 00:51 edvac 1
Thank you edvac, for your amazingly thorough answer. I've followed your suggestion, and updated the relation for Haida Gwaii. More than just teaching me an efficient way to do this one task your post has taught me lots of good JOSM tricks. (I'd never used the filter before, for example. Thanks!
(05 Aug '16, 03:24)
keithonearth
You are welcome :)
(27 Dec '17, 19:48)
edvac
|