Skip to main content
Question

OSM-XML Writing a osm_relation_type=multipolygon


I want to write areas with holes as "osm_relation_type=multipolygon".

It works fine when I give the objects directly to the OSM-writer (FME does all the work).

However, I would like to assign the node/way/feature-ID myself and determine the number of vertices of a "way" myself.

I tried following workflow:

  1. Getting a "feature-ID" to the area
  2. Splitting the areas in simple features an features with holes
  3. Extracting the outershell and hole
  4. Writing the tag "role=inner" (hole) and "role=outer" (outershell) to the geometry
  5. Splitting the geometry after 1964 (e.g. year of birth) vertices
  6. Copy the "feature-ID" to "feature_relation_id"
  7. Getting a "way-ID" to the way
  8. Joining a feature and it's ways by "feature-ID" and the attribute "feature_relation_id" an creating the members (ref/role/type)
  9. Dropping the original feature-geometry
  10. Add the attributes "user", "timestamp", "version" and "visible".
  11. Hoping the OSM-writer understands what I'm done.

Everything looks good in the inspector. But this doesn't work.

I have attached a screencopy of the inspector and my workbench (2020.0).

Thank You very much for Your help.

3 replies

daraghatsafe
Forum|alt.badge.img

Hi @mokarto. Just want to be sure I understand the problem correctly. When you write the data out there is no feature_id attached to the polygons, is this correct?

Daragh


  • Author
  • May 27, 2020

In addition: just the single ways of the feature are written out. I miss the non geometric relation "multipolygon" which is composed of the was as members (ref/role/type) of the multipolygon. Also I miss the information on the ways that they ara a member of the relation "multipolygon (e.g. as shown in josm).


  • Author
  • June 7, 2020

What a pitty! I chose the ID too big. It works perfect with a Feature/Way/Node-ID less than 1,000,000,000.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings