I'm searching for an approach as someone who just started to work with geodata recently.

It's about the following situation: I received several XML files. I need to perform a geometric difference task between 2 objects, and export it afterwards to XML or GML again.

Using QGIS doesn't seem to work here as for no proper export, also for having no automation when the same tasks need to be repeated for new source data. I read about the GDAL library and PostGIS database, I can just make a guess that this is what I'm looking for, I cannot really say it for sure as I'm not able to overlook it all.

Can someone tell me if this is what I'm looking for and give general steps on how to proceed?

  • I received several XML files XML is too generic a term to be able to give an answer here. What is the structure or schema of the XML (is it actually GML), can you edit the question to add a detail of the XML files you have?
    – nmtoken
    Jan 18, 2019 at 10:47

1 Answer 1


I think broadly any of those approaches would work. Not sure why you state qgis can't be automated, there are very good python bindings and a good processing workflow builder. Also not sure where you got the idea that QGIS can't export data, that is one of it's strengths. GDAL is obviously automatable as well, but at some point you probably need to go into QGIS anyway to check your results.

Similarly PostGIS will do it too, and has importers and exporters to GML, although all processing will have to be done on its native geometry.

In short, I would pick the tool that you are most familiar with or is most applicable to the task of those, and use GDAL if you love the Command Line, QGIS if you are a visual person, and Postgis if everything is already in a database or you like working with them. Other options are available, e.g. Python Shapely if you want geometric tools in a python library.

It's worth remembering that pretty much all these tools use the same geoprocessing library under the hood (usually GEOS) so the difference is mainly around the wider capabilities of the tools and how they fit into the ecosystem.

  • When using qqis, I can only export one layer at once into a seperated gml file, not export the complete dataset ?! At least not by using the visual interface. Nov 1, 2018 at 14:47
  • OK, I see what you mean. You could probably do it programatically, but probably GDAL or PostGIS are better bets. Support for GML is a bit patchy I would say, it's not, ahem, the OGC's finest hour, and the XML makes it difficult to work with for huge geospatial files.
    – Stev_k
    Nov 1, 2018 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.