how do i write a gml file like the example (the only thing i need to write in the gml is the poslist (geometry)
It seems like everybody is trying to do that 😂 I've already helped 3 of my clients with it.
What I ended up doing was taking a look at the sample document provided by Kadaster, extracted the geometry of the areas to an attribute as GML, using a GeometryExtractor, then used a series of StringReplacers to tweak that output until it matched the sample. Write to a txt file with the extension .gml and that did the trick.
It seems like everybody is trying to do that 😂 I've already helped 3 of my clients with it.
What I ended up doing was taking a look at the sample document provided by Kadaster, extracted the geometry of the areas to an attribute as GML, using a GeometryExtractor, then used a series of StringReplacers to tweak that output until it matched the sample. Write to a txt file with the extension .gml and that did the trick.
Thanks for the answer I think the best option is the xxmltemplater the only thing that change is the geometry.
I hoped that fme could create the right header . Why does the kadaster create their own file formats?
Here is my solution.
I extract the geometry and remove unnecessary strings from the geometry. (POLYGON(( )) )
Then ik insert the xmltemplater with the root template:
<gml:FeatureCollection xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nen3610="http://www.ravi.nl/nen3610" xmlns:kad="urn:schemas-kadaster-nl:/imkad" xsi:schemaLocation="urn:schemas-kadaster-nl:/imkad PBGebied.xsd">
<gml:featureMember>
<kad:PBGebied>
<nen3610:identificatie/>
{fme:process-features("SUB")}
</kad:PBGebied>
</gml:featureMember>
</gml:FeatureCollection>
And the sub template:
<gml:multiSurfaceProperty>
<gml:MultiSurface>
<gml:surfaceMember>
<gml:Surface>
<gml:patches>
<gml:PolygonPatch>
<gml:exterior>
<gml:LinearRing>
<gml:posList>
{fme:get-attribute("_geometry")}
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:PolygonPatch>
</gml:patches>
</gml:Surface>
</gml:surfaceMember>
</gml:MultiSurface>
</gml:multiSurfaceProperty>
Then i write the xml_fragment to a textfile (after i renamed it as text_line_data)