Question

How can I convert a shapefile to a GML that has to be structured like the XSD?

  • 22 April 2022
  • 1 reply
  • 23 views

Badge

I have a shapefile that just contains a couple of attributes. Its attribute values need to be mapped to a GML that needs to be of a structure provided by a XSD file. The XSD asks for more attributes than the shapefile provided, but I want the GML still to contain all the attributes, despite that a lot of values are not provided by the shapefile. Which steps do I need to take to convert the shapefile in to this XSD-conform GML?


1 reply

Userlevel 5
Badge +25

You can create a GML writer and then specify that you want to import the feature types from an existing dataset, select GML as its format, leave the dataset field empty and then in the parameters panel select your XSD for the application schema.

Screenshot 2022-04-22 at 12.47.54This will create writer feature type(s) that match what's specified in the XSD and you can connect your Shapefile feature types to it. Most likely you'll need to do some attribute mapping too.

 

The thing about GML/XML formats is that if a feature does not have a value for a certain attribute, that attribute does not exist for that feature.

Reply