Skip to main content
Solved

How to write multiple geometries per feature to Interlis2

  • February 1, 2022
  • 3 replies
  • 233 views

reservoirdog
Supporter
Forum|alt.badge.img+12

In an Interlis Model provided by the state, I have to write two geometries per feature to Interlis2. Using this FME article (Writing to Database Tables that contain Multiple Geometry Columns) I was able to read the multiple geometries from Oracle. In the database I have a view with both geometries (point and additional polygon). The linked article only provides information for writing multiple geometries to databases. In the Interlis-Writer (ili2fme) I don't have any settings for treating features with multiple geometries. Is it even possible?

The interlis model needs the "primary" geometry (point) to be written as standard geometry, while the secondary geometry (polygon) should be written into a specifiy attribute "Detailgeometrie". How can I tell FME to write the secondary geometry to a specific attribute?

 

Attached is the interlis-model (ili) provided by state.

The class with multiple geometries is "InfrastrukturKnoten" with its optional attribute "Detailgeometrie".

Best answer by david_r

FME and the ili2fme plugin only handles a single geometry in "automatic" mode. If you need to write multiple geometries, you'll have to provide them as regular attributes. You can use the GeometryExtractor (set to the same encoding as the ili2fme writer) for this.

See also http://www.ili2fme.ch/reference#multiple-geometries-per-class

There are also several helpful documents here:

https://www.geo.admin.ch/de/geo-information-switzerland/geobasedata-harmonization/geodata-models.html

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • 8392 replies
  • Best Answer
  • February 1, 2022

FME and the ili2fme plugin only handles a single geometry in "automatic" mode. If you need to write multiple geometries, you'll have to provide them as regular attributes. You can use the GeometryExtractor (set to the same encoding as the ili2fme writer) for this.

See also http://www.ili2fme.ch/reference#multiple-geometries-per-class

There are also several helpful documents here:

https://www.geo.admin.ch/de/geo-information-switzerland/geobasedata-harmonization/geodata-models.html

 


reservoirdog
Supporter
Forum|alt.badge.img+12
  • Author
  • Supporter
  • 37 replies
  • February 1, 2022

Thx David.

At first I enabled "Handle multiple Spatial Columns" at the Oracle Reader which wasn't working in the end.

Now I disabled this option and put the additional geometry into the desired attribute like you said with the GeometryExtractor and joined these via Featuremerger to the objects. This way is working now.

I think it isn't possible to divide the geometries afterwards, if they are read from Oracle into one feature.

Thanks for your inputs!


david_r
Celebrity
  • 8392 replies
  • February 1, 2022

Thx David.

At first I enabled "Handle multiple Spatial Columns" at the Oracle Reader which wasn't working in the end.

Now I disabled this option and put the additional geometry into the desired attribute like you said with the GeometryExtractor and joined these via Featuremerger to the objects. This way is working now.

I think it isn't possible to divide the geometries afterwards, if they are read from Oracle into one feature.

Thanks for your inputs!

Interlis is a very particular format which does not have much in common with e.g. Oracle Spatial, which is why the article you linked in your original question does not apply when writing to Interlis.

Great to hear that you found the solution.