Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres raster: sparse values of rasters are not displayed correctly #55784

Closed
2 tasks done
Joonalai opened this issue Jan 8, 2024 · 0 comments · Fixed by #56363
Closed
2 tasks done

Postgres raster: sparse values of rasters are not displayed correctly #55784

Joonalai opened this issue Jan 8, 2024 · 0 comments · Fixed by #56363
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! PostGIS data provider

Comments

@Joonalai
Copy link
Contributor

Joonalai commented Jan 8, 2024

What is the bug or the crash?

When adding sparse postgis rasters (rasters that omit some of the blocks/tiles), sparse values are not displayed correctly as no-data values (black area around the rectangular raster in GIF below).

raster_disappears
The disappearing problem in GIF is already fixed

If black areas around the actual raster are identified, following lines appear in the log:

WARNING    NOTICE: row number 0 is out of range 0..-1

Steps to reproduce the issue

To reproduce the issue I provided test_data.zip containing docker-compose.yml and sql file containing lines to add postgres raster with larger extent than the data actually is. Making it thus sparse.

  1. Download and extract test_data.zip
  2. docker-compose up -d
  3. Start QGIS and set project CRS to EPSG:3035
  4. Add following PostGIS server connection: dbname=rasterdb host=localhost port=5455 username=postgres password=postgres
  5. Add raster_sparse_3035 to the project and observe black areas around raster

Versions

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS version 3.34.1-Prizren QGIS code branch Release 3.34
Qt version 5.15.11
Python version 3.11.6
Compiled against GDAL/OGR 3.8.0 Running against GDAL/OGR 3.8.2
Compiled against PROJ 9.3.0 Running against PROJ 9.3.1
EPSG Registry database version v10.098 (2023-11-24)
GEOS version 3.12.0-CAPI-1.18.0
SQLite version 3.44.2
Compiled against PDAL 2.6.1 Running against PDAL 2.6.2
PostgreSQL client version 16.1
SpatiaLite version 5.1.0
QWT version 6.2.0
QScintilla2 version 2.14.1
OS version EndeavourOS
       
Active Python plugins
db_manager 0.1.20
processing 2.12.99
grassprovider 2.12.99
QGIS version 3.34.1-Prizren QGIS code branch [Release 3.34](https://github.com/qgis/QGIS/tree/release-3_34) Qt version 5.15.11 Python version 3.11.6 Compiled against GDAL/OGR 3.8.0 Running against GDAL/OGR 3.8.2 Compiled against PROJ 9.3.0 Running against PROJ 9.3.1 EPSG Registry database version v10.098 (2023-11-24) GEOS version 3.12.0-CAPI-1.18.0 SQLite version 3.44.2 Compiled against PDAL 2.6.1 Running against PDAL 2.6.2 PostgreSQL client version 16.1 SpatiaLite version 5.1.0 QWT version 6.2.0 QScintilla2 version 2.14.1 OS version EndeavourOS

Active Python plugins
db_manager
0.1.20
processing
2.12.99
grassprovider
2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

This issue is split from #55753.

@Joonalai Joonalai added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jan 8, 2024
@elpaso elpaso self-assigned this Feb 13, 2024
elpaso added a commit to elpaso/QGIS that referenced this issue Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! PostGIS data provider
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants