Closed cyril1929 closed 2 months ago
I can confirm with GDAL 3.10.0dev-a44e40295c, released 2024/06/21 (OSGeo4W).
Also the name of the geometry has changed.
Was: <ogr:geometryProperty>
Is now: <ogr:GEOMETRY>
This srsName drop affects the FeatureCollection level Envelope. The featureMembers still have Envelopes with srsName - and with Lat-Lon axis order.
<ogr:FeatureCollection
gml:id="aFeatureCollection"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ogr.maptools.org/ srs3.xsd"
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml/3.2">
<gml:boundedBy><gml:Envelope><gml:lowerCorner>23.5343338 63.1870744</gml:lowerCorner><gml:upperCorner>23.5511729 63.1915115</gml:upperCorner></gml:Envelope></gml:boundedBy>
<ogr:featureMember>
<ogr:SELECT gml:id="SELECT.0">
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>63.1870744 23.5454641</gml:lowerCorner><gml:upperCorner>63.1871252 23.5455768</gml:upperCorner></gml:Envelope></gml:boundedBy>
Also the name of the geometry has changed.
That's expected ant not an issue, and not a new behaviour. This is due to SQL SQLite layer reporting a name GEOMETRY geometry field. Direct translation from GeoJSON which has a unnamed/empty geometry field fallbacks to using "geometryProperty" in the GML writer.
For the SRS issue, fix in #10334
A workaround is to do a ogr2ogr to a format like GeoJSON (or shapefile, but not GeoPackage, PostGIS, etc) that has not a named geometry field using the -sql clause, and then ogr2ogr that temporary GeoJSON file to GML
Thanks !
What is the bug?
When we produce a GML from a GeoJson with a SQL dialect, the gml:Envelope in the response no longer contains SRS.
The srs is however always present if no sql query is put.
By the way, not having srs reverses the axes.
I don't think this change in behavior was intentional?
Steps to reproduce the issue
return :
while :
return :
Versions and provenance
The regression appeared in version 3.9.1. No worries in version 3.9.0 and earlier.
Additional context
No response