Solved

How to write multiple geometries per feature to Interlis2

  • 1 February 2022
  • 3 replies
  • 98 views

Badge +7

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".

icon

Best answer by david_r 1 February 2022, 11:47

View original

3 replies

Userlevel 4

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

 

Badge +7

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!

Userlevel 4

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.

Reply