OSGeo / gdal

GDAL is an open source MIT licensed translator library for raster and vector geospatial data formats.
https://gdal.org
Other
4.9k stars 2.55k forks source link

GMLAS not using global srsName if local is missing but GML does #8152

Open gislkvr opened 1 year ago

gislkvr commented 1 year ago

Expected behavior and actual behavior.

While import GML to Postgresql/Postgis using GMLAS driver, geometries with SRID=0 are generated if local srsName is missing. GML driver instead correctly uses global srsName specification. The same behavior for GMLAS driver would be highly desirable.

Steps to reproduce the problem.

  1. ogr2ogr -f Postgresql PG:"..." GMLAS:"/path/to.gml" -oo REMOVE_UNUSED_LAYERS=YES -oo REMOVE_UNUSED_FIELDS=YES -oo XSD="https://repository.gdi-de.org/schemas/de.xleitstelle.xplanung/5.4/XPlanung-Operationen.xsd" -lco SCHEMA=xplanung

File: to.gml

GDAL version

GDAL 3.2.2

rouault commented 1 year ago

@gislkvr Please attach the file as a github attachment (the URL you provided is a local one to your network)