[gdal-dev] GML file with multiple shape types

Even Rouault even.rouault at mines-paris.org
Fri May 23 11:17:35 PDT 2014


Le vendredi 23 mai 2014 18:49:17, mccorb a écrit :
> 1. Can OGR style GML files have multiple shape types (point, linestring,
> polygon, etc) and coordinate projections defined in a single file? Based on
> just the file structure it looks like the answer is probably yes...

- OGR can general GML files with several layers, each with any arbitrary shape 
type.
- OGR can generate GML files with different SRS per layer (some recent fixes in 
OGR 1.11 have been done related to that by the way). However when reading them 
back, it will generally not report the SRS in that situation.

> 2. If yes, can OGR2OGR be run somehow with multiple shape files to create a
> single output GML file?

The GML driver doesn't support append mode, so you will have to do the merging 
by yourself first. But that is not necessarily complicated :
* If your input files are shapefiles, you can just put them in a single 
directory and use the directory name as the OGR datasource name. In which case 
each shapefile will be seen as a layer.
* Otherwise, you can use the virtual dataset mechanism (VRT) to combine 
arbitrary layers into a single virtual dataset.

> 
> thanks
> 
> 
> 
> 
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/GML-file-with-multiple-shape-types-tp5
> 142207.html Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list