I have two gml files one contains linear data and the other one contains polygon data. I want to have the correct ogr command to merge the two gml files into one file.
I found this answer from 2012 that says ogr does not provide full support for gml data:
How to merge several GML files into one
I am wondering if it is possible in 2023 with ogr2ogr.
I already asked ChatGPT and it gave me few commands that throw error:
ogr2ogr -f "GML" merged.gml 1.gml -update -append 2.gml
that gave me this error:
ERROR 1: Unable to open existing output datasource `merged.gml'.
I also used this command:
ogr2ogr -f "GML" "C:\path\to\directory\merged.gml" 1.gml
ogr2ogr -f "GML" -update -append "C:\path\to\directory\merged.gml" 2.gml -nln merged_layer
that gave me this error:
ERROR 1: Unable to open existing output datasource `merged.gml'.
I also checked the access rights and it was ok I also ran the CMD as Admin.
Does anyone know the ogr command to merge 2 gml files?