id summary reporter owner description type status priority milestone component version severity resolution keywords cc 7126 In GML, sub-geometries of an OGRGeometryCollection can lose their spatial reference sbarker warmerdam "Some GML data files only have the spatial reference (srsName) in the gml:Envelope, within the gml:boundedBy section at the start of the file. The spatial references are not specified for each geometry in the file. An example of such a file is https://3d.bk.tudelft.nl/download/3dfier/Delft.gml.zip This appears to be valid according to section 9.10 of GML 3.2.1. Such files need to be opened with ""FORCE_SRS_DETECTION=YES"" in the GDALOpenEx open options, otherwise the spatial references are not found for any geometries. With ""FORCE_SRS_DETECTION=YES"" specified, individual geometries have their spatial reference set correctly. But child geometries of an OGRGeometryCollection, extracted using OGRGeometryCollection::getGeometryRef, do not pick up their parent's spatial reference. Instead, OGRGeometry::getSpatialReference returns a NULL pointer for those child geometries. A workaround is to find the spatial reference of the geometry collection, and use that when transforming the child geometries. " defect closed low OGR_SF 2.2.0 normal fixed GML