Question

How to write a geometry in OGC GML with hierachical structure ?

  • 7 February 2023
  • 1 reply
  • 5 views

Hello,

I want write these in an OGC GML :

 

<fme:AffleurantPCRS gml:id="id0ed4a56f-dd55-473e-a7f2-9ae5bcbf3af2">

<fme:producteur>Producteur</fme:producteur>

<fme:symbolisation>

<fme:AffleurantSymbolePCRS>

<fme:angleRotation>142.70918</fme:angleRotation>

<fme:idSym>ID16da9e5d-ef01-4922-8cf3-a4058f4a888a</fme:idSym>

<gml:pointProperty>

            <gml:Point srsName="EPSG:2154" srsDimension="2">

               <gml:pos>619127.353 6753771.724</gml:pos>

            </gml:Point>

</gml:pointProperty>

</fme:AffleurantSymbolePCRS>

</fme:symbolisation>

</fme:AffleurantPCRS>

 

My geometry is in AffleurantSymbolePCRS/symbolisation/AffleurantSymbolePCRS

 

I have read the documentation : https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/gml/user_attributes_w.htm

That said : "Geometry attributesThese attributes are used to control the name and the position of the GML geometry elements. Currently, only the generic xml_geometry type is supported, so the geometry attribute only specifies the name and the position for the GML geometric property"

But I don't understand. And there is no example.

 

I have tested these attributs :

name : AffleurantSymbolePCRS.symbolisation.AffleurantSymbolePCRS

value : <?xml version="1.0" encoding="US_ASCII" standalone="no" ?><geometry><point><coord x="619127.353" y="6753771.724" z="0"/></point></geometry>

type : xml_geometry

 

name : AffleurantSymbolePCRS.symbolisation.AffleurantSymbolePCRS

value : <geometry><point><coord x="619127.353" y="6753771.724" z="0"/></point></geometry>

type : xml_geometry

 

name : geometry

value : AffleurantSymbolePCRS.symbolisation.AffleurantSymbolePCRS

type : xml_geometry

 

But I never have the geometry.

It's not urgent, I already found a solution with an attribute xml_xml. But it's not pretty. I want write the geometry with the writer and understand the documentation !

 

Thank You

 

Christelle


1 reply

Userlevel 3
Badge +13

Hello @christelle​, thanks for posting to the FME Community. Sorry you've had issues writing your geometry thus far! It may help if you can share your workspace (and or a screenshot of), so we can see your translation process.

 

May I ask what GML version/mode you're trying to write? (GML Writer parameters > GML Version). Also, are you using the GeometryPropertySetter to appropriately name the geometry you're trying to output? This name should be the same as the xml attribute you're trying to write too (either 'AffleurantSymbolePCRS.symbolisation.AffleurantSymbolePCRS' or just 'AffleurantSymbolePCRS' - not familiar enough with the dataset to comment, apologies!). Happy to help, Kailin.

Reply