qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.65k stars 3.01k forks source link

Postgis metadata error #56842

Open eleagula opened 8 months ago

eleagula commented 8 months ago

What is the bug or the crash?

In either QGIS 3.34.4 or QGIS 3.36.0, when I attempt to save metadata to my Postgis database for a newly uploaded vector layer, I receive this error:

forward transform of (inf, inf) Error: Fallback transform failed

This seems to happen for layers I've uploaded to Postgis using the GDAL "Export to PostgreSQL", as well as for some layers I've uploaded using the DB Manager. Previous versions of QGIS worked fine.

Steps to reproduce the issue

In either QGIS 3.34.4 or QGIS 3.36.0, upload a vector layer to Postgis using the GDAL "Export to PostgreSQL" function. After uploading, place layer in Layers panel and attempt to write and save metadata using the "Save to Default Location" option. The following error pops up and no metadata is saved in the database:

forward transform of (inf, inf) Error: Fallback transform failed

A similar error occurs with layers uploaded via DB Manager, although not as consistently.

Versions

QGIS version | 3.34.4-Prizren | QGIS code revision | decd43dc -- | -- | -- | -- Qt version | 5.15.3 Python version | 3.9.18 GDAL/OGR version | 3.8.4 PROJ version | 9.3.1 EPSG Registry database version | v10.098 (2023-11-24) GEOS version | 3.12.1-CAPI-1.18.1 SQLite version | 3.41.1 PDAL version | 2.6.0 PostgreSQL client version | 16.1 SpatiaLite version | 5.1.0 QWT version | 6.1.6 QScintilla2 version | 2.13.4 OS version | Windows 10 Version 2009   |   |   |   Active Python plugins project_report | 1.2 qgis_stac | 1.1.1 QuickOSM | 2.2.3 quick_map_services | 0.19.34 SentinelHub | 2.0.2 db_manager | 0.1.20 MetaSearch | 0.3.6 processing | 2.12.99 QGIS version 3.34.4-Prizren QGIS code revision [decd43dc](https://github.com/qgis/QGIS/commit/decd43dc) Qt version 5.15.3 Python version 3.9.18 GDAL/OGR version 3.8.4 PROJ version 9.3.1 EPSG Registry database version v10.098 (2023-11-24) GEOS version 3.12.1-CAPI-1.18.1 SQLite version 3.41.1 PDAL version 2.6.0 PostgreSQL client version 16.1 SpatiaLite version 5.1.0 QWT version 6.1.6 QScintilla2 version 2.13.4 OS version Windows 10 Version 2009 Active Python plugins project_report 1.2 qgis_stac 1.1.1 QuickOSM 2.2.3 quick_map_services 0.19.34 SentinelHub 2.0.2 db_manager 0.1.20 MetaSearch 0.3.6 processing 2.12.99 ------- ### Supported QGIS version - [X] I'm running a supported QGIS version according to [the roadmap](https://www.qgis.org/en/site/getinvolved/development/roadmap.html#release-schedule). ### New profile - [X] I tried with a new [QGIS profile](https://docs.qgis.org/latest/en/docs/user_manual/introduction/qgis_configuration.html#working-with-user-profiles) ### Additional context _No response_
eleagula commented 8 months ago

Adjusting the Extent in the Metadata menu seemed to have allowed me to save the metadata to the database. In the Extent tab, I chose my layer in question from the "Calculate from: Layer" option and it changed the extent values. After that, I was able to save the metadata. However, this may still represent an issue - In previous versions of QGIS, I did not have to bother with manually adjusting the extent after uploading a new layer in order to save metadata to Postgis.

kjetpett commented 4 months ago

Adjusting the Extent in the Metadata menu seemed to have allowed me to save the metadata to the database. In the Extent tab, I chose my layer in question from the "Calculate from: Layer" option and it changed the extent values. After that, I was able to save the metadata. However, this may still represent an issue - In previous versions of QGIS, I did not have to bother with manually adjusting the extent after uploading a new layer in order to save metadata to Postgis.

I can confirm that I have experienced the same issue that you describe both on QGIS 3.38 (MacOS) and 3.36 (Windows). I was able to save metadata to qgis_layer_metadata by manually recalculating the extent as you describe.