Opening raster file ordered bottom-up with non-square pixels produces wrong output #56288
Closed
1 of 2 tasks
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Data Provider
Related to specific vector, raster or mesh data providers
Rasters
Related to general raster layer handling (not specific data formats)
Upstream
Needs changes in an upstream library (like Qt, Proj, GDAL, ...)
What is the bug or the crash?
Opening a raster file with lines ordered bottom-up, with a non-squre pixel size produces something wrong. The pixel sizes shown in the properties is something in between the two, and the image displayed in the screen is wrong.
The same data ordered top-down is correctly managed.
This kind of non square pixel rasters can be normal on geographic coordinates. That way, they represent something "more square" in the field.
Steps to reproduce the issue
I created this XYZ file manually (bottom-up.xyz)
with 0.1 step in Y (latitude) and 0.2 in X (longitude)
The pixel size displayed in the properties in QGIS is
0.1581138830084189706,-0.1581138830084189706
.I can easily reorder the values to get a top-down file with the command
producing this file
The pixel size displayed in the properties in QGIS is
0.2000000000000001776,-0.09999999999999964473
This file top-down.xyz is displayed properly in QGIS.
I tried ordering the columns as lon-lat-z, with the same results.
With same spacing in both directions no problem is detected in the display.
Versions
(I tested also with conda version 3.34.1-Prizren, with GDAL 3.8.0)
<style type="text/css"> p, li { white-space: pre-wrap; } </style>Active Python plugins
FreehandRasterGeoreferencer
0.8.3
db_manager
0.1.20
processing
2.12.99
grassprovider
2.12.99
MetaSearch
0.3.6
Supported QGIS version
New profile
Additional context
Based on the difference between
gdalinfo
and the properties, I think the problem could be in QGIS. In case you think it is a problem in GDAL, I can open a ticket there.The text was updated successfully, but these errors were encountered: