You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
drStacky opened this issue
Sep 29, 2021
· 5 comments
Labels
BugEither a bug report, or a bug fix. Let's hope for the latter!FeedbackWaiting on the submitter for answersRastersRelated to general raster layer handling (not specific data formats)staleUh oh! Seems this work is abandoned, and the PR is about to close.
When I create a geotiff using rasterio with the identity geotransform, the pixels do not render in QGIS. The identify features cursor acts like there are no pixels, however the histogram confirms there are non-zero pixels to display.
Steps to reproduce the issue
Create a geotiff using rasterio v1.2.8 in python 3.7:
from affine import Affine
import numpy as np
import rasterio as rio
img = np.random.randint(0, 255, size=(3,100,100), dtype='uint8')
profile = {
'count': img.shape[0],
'height': img.shape[1],
'width': img.shape[2],
'dtype': img.dtype,
'transform': Affine.identity(),
}
with rio.open('invisible.tif', 'w', **profile) as dst:
dst.write(img)
Results from gdalinfo on invisible.tif:
Driver: GTiff/GeoTIFF
Files: invisible.tif
Size is 100, 100
Coordinate System is `'
Origin = (0.000000000000000,0.000000000000000)
Pixel Size = (1.000000000000000,1.000000000000000)
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 0.0000000, 0.0000000)
Lower Left ( 0.000, 100.000)
Upper Right ( 100.0000000, 0.0000000)
Lower Right ( 100.000, 100.000)
Center ( 50.0000000, 50.0000000)
Band 1 Block=100x27 Type=Byte, ColorInterp=Red
Band 2 Block=100x27 Type=Byte, ColorInterp=Green
Band 3 Block=100x27 Type=Byte, ColorInterp=Blue
On the other hand, changing the 'transform' to None above results in a geotiff that renders properly (albeit without a CRS) and the following gdalinfo print out:
Driver: GTiff/GeoTIFF
Files: visible.tif
Size is 100, 100
Coordinate System is `'
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 100.0)
Upper Right ( 100.0, 0.0)
Lower Right ( 100.0, 100.0)
Center ( 50.0, 50.0)
Band 1 Block=100x27 Type=Byte, ColorInterp=Red
Band 2 Block=100x27 Type=Byte, ColorInterp=Green
Band 3 Block=100x27 Type=Byte, ColorInterp=Blue
Versions
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
QGIS version
3.4.4-Madeira
QGIS code branch
Release 3.4
Compiled against Qt
5.11.2
Running against Qt
5.11.2
Compiled against GDAL/OGR
2.3.3
Running against GDAL/OGR
2.3.3
Compiled against GEOS
3.7.1-CAPI-1.11.0
Running against GEOS
3.7.2-CAPI-1.11.2 b55d2125
PostgreSQL Client Version
9.6.10
SpatiaLite Version
4.4.0-RC1
QWT Version
6.1.3
QScintilla2 Version
2.10.8
PROJ.4 Version
493
Supported QGIS version
I'm running a supported QGIS version according to the roadmap.
New profile
I tried with a new QGIS profile
Additional context
No response
The text was updated successfully, but these errors were encountered:
drStacky
added
the
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
label
Sep 29, 2021
gioman
added
Feedback
Waiting on the submitter for answers
Rasters
Related to general raster layer handling (not specific data formats)
labels
Sep 29, 2021
Here's my output from the code snippet I posted: invisible.tif.zip
I'll be the first to admit this may be a rasterio issue, too, but the image renders with Affine(1, 0, 0, 0, -1, 0), Affine(5, 0, 0, 0, 5, 0), and None.
gioman
changed the title
Not rendering with identity transform
Not rendering with identity transform raster created with rasterio
Sep 29, 2021
The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale".
If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.
While we hate to see this happen, this issue has been automatically closed because it has not had any activity in the last 42 days despite being marked as feedback. If this issue should be reconsidered, please follow the guidelines in the previous comment and reopen this issue.
Or, if you have any further questions, there are also further support channels that can help you.
BugEither a bug report, or a bug fix. Let's hope for the latter!FeedbackWaiting on the submitter for answersRastersRelated to general raster layer handling (not specific data formats)staleUh oh! Seems this work is abandoned, and the PR is about to close.
What is the bug or the crash?
When I create a geotiff using
rasterio
with the identity geotransform, the pixels do not render in QGIS. The identify features cursor acts like there are no pixels, however the histogram confirms there are non-zero pixels to display.Steps to reproduce the issue
Create a geotiff using
rasterio
v1.2.8 in python 3.7:Results from
gdalinfo
oninvisible.tif
:On the other hand, changing the
'transform'
toNone
above results in a geotiff that renders properly (albeit without a CRS) and the followinggdalinfo
print out:Versions
<style type="text/css"> p, li { white-space: pre-wrap; } </style>Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: