|
Window from bounds is shifted by 1 Pixel
Hi Thomas, I think Denis found the root of the problem and we have a fix at https://github.com/mapbox/rasterio/pull/1938 that will be a part of the 1.1.5 release. Thank you for the test cases and for
Hi Thomas, I think Denis found the root of the problem and we have a fix at https://github.com/mapbox/rasterio/pull/1938 that will be a part of the 1.1.5 release. Thank you for the test cases and for
|
By
Sean Gillies
· #550
·
|
|
rasterio 1.1.4
Hi all, Rasterio 1.1.4 has been released. Here are the changes: https://github.com/mapbox/rasterio/blob/master/CHANGES.txt#L4 Here are the distributions on PyPI https://pypi.org/project/rasterio/1.1.4
Hi all, Rasterio 1.1.4 has been released. Here are the changes: https://github.com/mapbox/rasterio/blob/master/CHANGES.txt#L4 Here are the distributions on PyPI https://pypi.org/project/rasterio/1.1.4
|
By
Sean Gillies
· #524
·
|
|
MemoryFile loses Profile information
Hi, I've only now remembered (not being a regular jp2 user) that JPEG2000 is a create-copy format (see https://gdal.org/drivers/raster/index.html) and as such is not suited for uses cases like with ra
Hi, I've only now remembered (not being a regular jp2 user) that JPEG2000 is a create-copy format (see https://gdal.org/drivers/raster/index.html) and as such is not suited for uses cases like with ra
|
By
Sean Gillies
· #519
·
|
|
Read using multithreading
Hi, Dataset files can be accessed from multiple threads, but the dataset objects returned by rasterio.open can only be used by a single thread at a time. This is a constraint that we get from GDAL. Yo
Hi, Dataset files can be accessed from multiple threads, but the dataset objects returned by rasterio.open can only be used by a single thread at a time. This is a constraint that we get from GDAL. Yo
|
By
Sean Gillies
· #513
·
|
|
MemoryFile loses Profile information
Since there's no JP2 specific code in MemoryFile and things work with the GeoTIFF driver, I suspect there's a subtle bug involving the vsimem system and one of the JP2 drivers. It would be useful to t
Since there's no JP2 specific code in MemoryFile and things work with the GeoTIFF driver, I suspect there's a subtle bug involving the vsimem system and one of the JP2 drivers. It would be useful to t
|
By
Sean Gillies
· #512
·
|
|
Speed up reading rasters
Hi, I can't say for sure about the time differences because I don't know much about your data files or your computer. However, know this: GDAL's I/O system caches blocks of raster data in memory, the
Hi, I can't say for sure about the time differences because I don't know much about your data files or your computer. However, know this: GDAL's I/O system caches blocks of raster data in memory, the
|
By
Sean Gillies
· #500
·
|
|
Why does shape not return the number of channels
Correct, the dataset's shape is not the same as the shape of dataset.read().
Correct, the dataset's shape is not the same as the shape of dataset.read().
|
By
Sean Gillies
· #494
·
|
|
Asyncio + Rasterio for slow network requests?
Hi Kyle, Dion: Thank you for the details. Dion, can you say a little more about reads not being thread-safe? It's intended that we can call GDAL's RasterIO functions in different threads concurrently
Hi Kyle, Dion: Thank you for the details. Dion, can you say a little more about reads not being thread-safe? It's intended that we can call GDAL's RasterIO functions in different threads concurrently
|
By
Sean Gillies
· #482
·
|
|
Asyncio + Rasterio for slow network requests?
Hi Vincent, Thanks for the update. This situation points out a downside of using the warped VRT: it abstracts everything (network, reprojection, caching) and makes diagnosing problems difficult.
Hi Vincent, Thanks for the update. This situation points out a downside of using the warped VRT: it abstracts everything (network, reprojection, caching) and makes diagnosing problems difficult.
|
By
Sean Gillies
· #480
·
|
|
Asyncio + Rasterio for slow network requests?
Hi, First of all, I'm not very familiar with rio-tiler. Hopefully, Vincent will help us out. A constant time regardless of the amount of overlap suggests to me that your source files may lack the prop
Hi, First of all, I'm not very familiar with rio-tiler. Hopefully, Vincent will help us out. A constant time regardless of the amount of overlap suggests to me that your source files may lack the prop
|
By
Sean Gillies
· #477
·
|
|
Silencing PROJ errors/warnings
Hi Greg, Do you see a bare "proj_create_from_database: datum not found" or do you see ERROR 1: PROJ: proj_create_from_database: datum not found as in https://github.com/OSGeo/gdal/issues/2321? Which s
Hi Greg, Do you see a bare "proj_create_from_database: datum not found" or do you see ERROR 1: PROJ: proj_create_from_database: datum not found as in https://github.com/OSGeo/gdal/issues/2321? Which s
|
By
Sean Gillies
· #475
·
|
|
Applying Color Ramp to Single-Band Grayscale Images
Hi, Have you seen https://rasterio.readthedocs.io/en/latest/topics/color.html#writing-colormaps ? It shows how to write a colormap (or color "ramp") to a new file. You can also open an existing file i
Hi, Have you seen https://rasterio.readthedocs.io/en/latest/topics/color.html#writing-colormaps ? It shows how to write a colormap (or color "ramp") to a new file. You can also open an existing file i
|
By
Sean Gillies
· #473
·
|
|
Overwrite raster in place
It's not possible to change the shape of a raster dataset, the number of bands, or the data type in place.
It's not possible to change the shape of a raster dataset, the number of bands, or the data type in place.
|
By
Sean Gillies
· #467
·
|
|
Rasterio Python Library Merging R, G, B Bands to Create a GeoReferenced GeoTiff
Hi, I have a couple comments on the code. You need to pass `tiled=True` to rasterio.open(), "tiled", and you should pass blockxsize and blockysize parameters as well. These must be multiples of 16. Al
Hi, I have a couple comments on the code. You need to pass `tiled=True` to rasterio.open(), "tiled", and you should pass blockxsize and blockysize parameters as well. These must be multiples of 16. Al
|
By
Sean Gillies
· #465
·
|
|
Decimated and windowed read in rasterio
Hi, the out_shape and window parameters of a Rasterio dataset's read method are very similar to the nBufXSize, nBufYSize, nXOff, nYOff, nXSize, and nYSize parameters of GDAL's RasterIO function. The w
Hi, the out_shape and window parameters of a Rasterio dataset's read method are very similar to the nBufXSize, nBufYSize, nXOff, nYOff, nXSize, and nYSize parameters of GDAL's RasterIO function. The w
|
By
Sean Gillies
· #459
·
|
|
Do I need to warp jp2 satellite images for rasterio to manipulate them?
Hi, I recommend warping. GCPs are not seamlessly supported throughout rasterio 1.1.3. For example, a dataset's window_bounds and window_transform methods are ignorant of the dataset's GCPs and their C
Hi, I recommend warping. GCPs are not seamlessly supported throughout rasterio 1.1.3. For example, a dataset's window_bounds and window_transform methods are ignorant of the dataset's GCPs and their C
|
By
Sean Gillies
· #450
·
|
|
Same file doesn't work on non-s3 host
Hi Olivier, The exception message doesn't give you much of a lead, it's true. To debug network issues, the places to look are your server logs and GDAL's curl client logs. You can enable the latter by
Hi Olivier, The exception message doesn't give you much of a lead, it's true. To debug network issues, the places to look are your server logs and GDAL's curl client logs. You can enable the latter by
|
By
Sean Gillies
· #448
·
|
|
Using Python rasterio package to read gif file and world file, re-project to another picture
Hi Guodong, If you save the .gif and the .gfw file to the same directory, so that they are siblings, rasterio will find the .gfw automatically when the .gif file is opened. This behavior is inherited
Hi Guodong, If you save the .gif and the .gfw file to the same directory, so that they are siblings, rasterio will find the .gfw automatically when the .gif file is opened. This behavior is inherited
|
By
Sean Gillies
· #439
·
|
|
Convert gray band from dataset to RGB with rasterio for population density
Hi, Sorry for the slow response. I downloaded a small portion of the data, GHS_POP_E2015_GLOBE_R2019A_4326_9ss_V1_0_18_4.tif, a block that covers some of the South of France and North Africa. It's the
Hi, Sorry for the slow response. I downloaded a small portion of the data, GHS_POP_E2015_GLOBE_R2019A_4326_9ss_V1_0_18_4.tif, a block that covers some of the South of France and North Africa. It's the
|
By
Sean Gillies
· #433
·
|
|
Translating/shifting a raster in memory
Hi, If you open a rasterio dataset in "r+" mode, you can modify its transform attribute. Here's a code example: from affine import Affine import rasterio with rasterio.open("example.tif", "r+") as dat
Hi, If you open a rasterio dataset in "r+" mode, you can modify its transform attribute. Here's a code example: from affine import Affine import rasterio with rasterio.open("example.tif", "r+") as dat
|
By
Sean Gillies
· #429
·
|