|
concurrent.futures.ThreadPoolExecutor for s3 COG reads fails - CPLReleaseMutex: Error
This could be similar to https://github.com/mapbox/rasterio/issues/1686
In an AWS-Lambda python 3.7 runtime, there is an error like:
CPLReleaseMutex: Error = 1 (Operation not permitted)
This could be similar to https://github.com/mapbox/rasterio/issues/1686
In an AWS-Lambda python 3.7 runtime, there is an error like:
CPLReleaseMutex: Error = 1 (Operation not permitted)
|
By
dweber.consulting@...
·
#771
·
|
|
Re: Handle to underlying GDAL dataset
Hi Søren,
It's not possible for a GDAL dataset handle to be shared between rasterio and GDAL's Python bindings. I discourage people from combining these modules. Unless one is extremely careful and
Hi Søren,
It's not possible for a GDAL dataset handle to be shared between rasterio and GDAL's Python bindings. I discourage people from combining these modules. Unless one is extremely careful and
|
By
Sean Gillies
·
#770
·
|
|
Handle to underlying GDAL dataset
Hi!
I would like to get a handle for the underlying GDAL dataset behind a RasterIO dataset.
Is this possible somehow?
The reason I want to do this is that, in some cases, GDAL operations are
Hi!
I would like to get a handle for the underlying GDAL dataset behind a RasterIO dataset.
Is this possible somehow?
The reason I want to do this is that, in some cases, GDAL operations are
|
By
soren.rasmussen@...
·
#769
·
|
|
Re: Need Help
Hello,
I don't know about MSAVI2, but once you have a numpy array of 0 and 1, you can mask another array using https://numpy.org/doc/stable/reference/generated/numpy.where.html. Rasterio only reads
Hello,
I don't know about MSAVI2, but once you have a numpy array of 0 and 1, you can mask another array using https://numpy.org/doc/stable/reference/generated/numpy.where.html. Rasterio only reads
|
By
Sean Gillies
·
#768
·
|
|
Need Help
First : I want to know how could i change the name of raster images’s band? Because i have a multispectral image with 8 band and the name is none when i do image.descrptions.
Second : On this
First : I want to know how could i change the name of raster images’s band? Because i have a multispectral image with 8 band and the name is none when i do image.descrptions.
Second : On this
|
By
Serigne Mansour DIENE
·
#767
·
|
|
snippet for minimum bounding snapped window?
Hi all,
Often I'm given unsnapped coordinates and want to find the minimum bounding snapped box based on a rasterio Dataset. I'm guessing someone here has a better way of doing it or I'm missing a
Hi all,
Often I'm given unsnapped coordinates and want to find the minimum bounding snapped box based on a rasterio Dataset. I'm guessing someone here has a better way of doing it or I'm missing a
|
By
Gregory, Matthew
·
#766
·
|
|
Rasterio 1.2.2
Hi all,
Rasterio 1.2.2 source distribution and wheels for selected platforms are on PyPI now. The wheels include GDAL 3.2.2 and PROJ 7.2.1. See
Hi all,
Rasterio 1.2.2 source distribution and wheels for selected platforms are on PyPI now. The wheels include GDAL 3.2.2 and PROJ 7.2.1. See
|
By
Sean Gillies
·
#765
·
|
|
Re: Help Saving .Tif File after Mask
Hi Luke, thanks for the reply. Your code has helped me move past my previous error.
I had to delete the indexes argument when calling `write' but apart from that, it works like a charm.
Thank you for
Hi Luke, thanks for the reply. Your code has helped me move past my previous error.
I had to delete the indexes argument when calling `write' but apart from that, it works like a charm.
Thank you for
|
By
Simon Tarr <si.tarr@...>
·
#764
·
Edited
|
|
Re: Using rasterio to mask/crop a raster results in AttributeError
You can also use json:
import json
poly = json.loads(obj.job_loc.geojson)
You can also use json:
import json
poly = json.loads(obj.job_loc.geojson)
|
By
Luke
·
#763
·
|
|
Re: Help Saving .Tif File after Mask
rasterio.mask.mask returns a two element tuple - element 0 is the array, element 1 is the transform. Try something like (untested):
# Mask Raster
masked_raster, transform = rasterio.mask.mask(file,
rasterio.mask.mask returns a two element tuple - element 0 is the array, element 1 is the transform. Try something like (untested):
# Mask Raster
masked_raster, transform = rasterio.mask.mask(file,
|
By
Luke
·
#762
·
Edited
|
|
Help Saving .Tif File after Mask
I have just used rasterio.mask.mask() to crop a larger raster using a Django PolygonField() polygon:
# Open large raster file
file = rasterio.open('/data/corine2018_100m/test.tif')print(file)<open
I have just used rasterio.mask.mask() to crop a larger raster using a Django PolygonField() polygon:
# Open large raster file
file = rasterio.open('/data/corine2018_100m/test.tif')print(file)<open
|
By
Simon Tarr <si.tarr@...>
·
#761
·
|
|
Re: Using rasterio to mask/crop a raster results in AttributeError
Thank you. I used the below to remove the quotes:
import ast
poly = ast.literal_eval(obj.job_loc.geojson)
Thank you. I used the below to remove the quotes:
import ast
poly = ast.literal_eval(obj.job_loc.geojson)
|
By
Simon Tarr <si.tarr@...>
·
#759
·
|
|
Re: Using rasterio to mask/crop a raster results in AttributeError
Hi,
You have a len = 1 list the only element of which is a string. That's what the error message tells you, essentially. Get rid of the quotes and you'l have a one-item list
Hi,
You have a len = 1 list the only element of which is a string. That's what the error message tells you, essentially. Get rid of the quotes and you'l have a one-item list
|
By
Yves Moisan
·
#758
·
|
|
Using rasterio to mask/crop a raster results in AttributeError
I'm trying to use rasterio tomask a raster. According to the mask documentation, I need to load a raster file in 'r' mode, which I have done like so:file =
I'm trying to use rasterio tomask a raster. According to the mask documentation, I need to load a raster file in 'r' mode, which I have done like so:file =
|
By
si.tarr@...
·
#757
·
|
|
Is it possible to build a .vrt file from multiple files with Rasterio?
I would like to build a vrt file from multiple dataset. I know the gdalbuildvrt but i don't find how I'm supposed to do the same using rasterio vrt object.
Does anyone have a simple example ?
Is it
I would like to build a vrt file from multiple dataset. I know the gdalbuildvrt but i don't find how I'm supposed to do the same using rasterio vrt object.
Does anyone have a simple example ?
Is it
|
By
Pierrick Rambaud
·
#756
·
|
|
Re: Clarification on usage with QGIS
That's good to hear, Christina -- thanks!
Ari
That's good to hear, Christina -- thanks!
Ari
|
By
Ari Meyer
·
#755
·
|
|
Re: Clarification on usage with QGIS
Hi Ari,
Yes, I've also confirmed my plugin & rasterio runs in QGIS 3.18 without any problems.
I have similar GDAL & GDAL backwards compatibility packages installed and haven't experienced issues
Hi Ari,
Yes, I've also confirmed my plugin & rasterio runs in QGIS 3.18 without any problems.
I have similar GDAL & GDAL backwards compatibility packages installed and haven't experienced issues
|
By
Ratcliff, Christina (A&F, Waite Campus)
·
#754
·
|
|
Re: Clarification on usage with QGIS
Hi Christina,
FYI, I just installed QGIS 3.18.1 and added rasterio. Here's the relevant snippet of the installer output:
gdal (3.1.4-3)
The GDAL/OGR library and commandline tools
Required by:
Hi Christina,
FYI, I just installed QGIS 3.18.1 and added rasterio. Here's the relevant snippet of the installer output:
gdal (3.1.4-3)
The GDAL/OGR library and commandline tools
Required by:
|
By
Ari Meyer
·
#753
·
|
|
Re: Rasterio read outshape resample does not give correct array
With count data, like population, it only makes sense to aggregate using a sum resampling function (like you did with block_reduce).
Using rasterio you can perform a decimated read (setting out_shape)
With count data, like population, it only makes sense to aggregate using a sum resampling function (like you did with block_reduce).
Using rasterio you can perform a decimated read (setting out_shape)
|
By
Loïc Dutrieux
·
#752
·
|
|
Re: Rasterio read outshape resample does not give correct array
Thank you very much, I found scikit block_reduce which did the trick, but I was wondering if there are any gdal or rasterio functions who could
do the same. I found from (here) and ( here) that
GDAL
Thank you very much, I found scikit block_reduce which did the trick, but I was wondering if there are any gdal or rasterio functions who could
do the same. I found from (here) and ( here) that
GDAL
|
By
tinak.contact@...
·
#751
·
Edited
|