Hi devs, working on the import layer feature I noticed that there's a difference when getting the layer CRS using the PG and SL provider's crs() method.
While the PG crs() calls the QgsCoordinateReferenceSystem::createFromSrid, the SL crs method instead uses the QgsCoordinateReferenceSystem::createFromPrj4. This is an inconsistent behavior. When I load a table with geometry and srid 3003, if the source is a PG database I get a layer with the QGis 3003 definition that contains towgs84 params, otherwise from SL I get a layer with a custom CRS, similar to the QGis one but without the towgs84 params. This creates some problems trying to import the SL layer into a PG database because QGis is unable to get the postgisSrid from the SL layer with the custom CRS, even if it should be 3003. I think both should work in the same manner, but I don't know if it's more correct to get crs from srid (in this case both the layers will use the QGis crs definition) or from the proj4string. Any idea? -- Giuseppe Sucameli
_______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer