Skip to main content

I am trying to transform an ESRI shapefile to a GML.

To generate the GML I use a template/schema (supplied by the recipient). Unfortunately the result does not look like the delivered example .

Because of this, the file will not be accepted.

How can this be corrected? I am fairly new to this so please try to keep it
simple.

 

Below is the template/schema

 

1)
First of all the naming is incorrect, rws:Objecten is expected
but gml:FeatureCollection is generated.

2)
Below that, I expect the xmlns extensions to be underneath
each other instead of in one line.

3)
Also gml:id="GML-ID-0" should
be behind rws:Objecten
but it is somewhere else.

4)
It also generates gml:boundedBy, this is not in the
source data.

5)
gml:pointProperty is created instead of rws:puntObject.

6)
Inside gml:pointProperty, naming and positioning is
different.

Why is this happening and how can I generate a GML that looks exactly
like the example XML format?

If you need to see/test it for yourself, .

Thanks in advance.



Hello @jomme,

 

 

1) The reason that gml:FeatureCollection is being generated over rws:Objecten, is due to a parent/child id not being created to link the features. As such, if you add an AttributeCreator to the Objecten feature(with an attribute of gml_id = *value you wish to have*, along with an AttributeCreator on the pObject feature with gml_parent_id *matching the gml_id value on Objecten). This will link the features so that you will have rws:Objecten rather than gml:FeatureCollection. If you remove these, you should see the gml:FeatureCollection return.

 

 

2/3) I suspect gml:id and gml:boundedby are as a result of specifying the GML Version as 3.2.1 rather than Application Schema(setting this will allow the writer to write to the version that is specified in the Application Schema).

 

4/5/6) This has to do with again the GML version is set to 3.2.1 rather than the Application Schema along with having the geometry attribute being overwritten. When writing the geometry for GML, we write it out as xml_geometry. In this instance, the geometry we want to write out would be puntObject or vlakObject or lijnObject depending on the Application's schema. A quick example of the xml_geometry type can be found here: https://knowledge.safe.com/articles/775/inspire-gml-basic-writing-example.html

 

 

I've attached your workspace, showcasing the various changes described above.

 

I hope that helps.

testgml.fmw


Reply