|
Re: Serializing and deserializing rasterio object
There's no protocol for making classes JSON-serializable (though there may be some day, see https://bugs.python.org/issue27362), so we have to coerce two of those values to built-in Python types (str
There's no protocol for making classes JSON-serializable (though there may be some day, see https://bugs.python.org/issue27362), so we have to coerce two of those values to built-in Python types (str
|
By
Sean Gillies
·
#320
·
|
|
Re: Serializing and deserializing rasterio object
Yes Sean, I mean the object returned by rasterio.open().
I'm doing a remote function that crops a small polygon from a large image, and returns only that cropped region.
The function is not able to
Yes Sean, I mean the object returned by rasterio.open().
I'm doing a remote function that crops a small polygon from a large image, and returns only that cropped region.
The function is not able to
|
By
Juliano <juliano.ecc@...>
·
#319
·
|
|
Re: Serializing and deserializing rasterio object
Hi,
Do you mean a dataset object returned by rasterio.open()? We have left them not pickleable for the same reason Python file objects aren't pickleable: in the implementation there is an OS file
Hi,
Do you mean a dataset object returned by rasterio.open()? We have left them not pickleable for the same reason Python file objects aren't pickleable: in the implementation there is an OS file
|
By
Sean Gillies
·
#318
·
|
|
Serializing and deserializing rasterio object
Hi all
Is there an easy way to serialize and deserialize rasterio object?
Thanks!
Hi all
Is there an easy way to serialize and deserialize rasterio object?
Thanks!
|
By
Juliano <juliano.ecc@...>
·
#317
·
|
|
Re: Transform Conversion to Lat/Long
Guillaume, thanks for the swift reply, this sounds exactly like what I'm looking for. I will work on implementing it into my code now, thank again :)
Guillaume, thanks for the swift reply, this sounds exactly like what I'm looking for. I will work on implementing it into my code now, thank again :)
|
By
j.carnes2553@...
·
#316
·
|
|
Re: Transform Conversion to Lat/Long
Hi,
From the screenshot you have provided, we can see that the CRS of your image (EPSG:32617) is a UTM zone, so its unit is indeed in meters. That means that if you take a point with coordinates
Hi,
From the screenshot you have provided, we can see that the CRS of your image (EPSG:32617) is a UTM zone, so its unit is indeed in meters. That means that if you take a point with coordinates
|
By
Guillaume Lostis <g.lostis@...>
·
#315
·
|
|
Re: Geotiff max/min coordinates question
Alan thanks for your reply, that did the job!! Really appreciate your help
Alan thanks for your reply, that did the job!! Really appreciate your help
|
By
j.carnes2553@...
·
#314
·
|
|
Transform Conversion to Lat/Long
Hello everyone,
In the picture below I am using rasterio to open a .tif file and then transform the those bounds to get the upper left and lower right points of the dataset. My question is around how
Hello everyone,
In the picture below I am using rasterio to open a .tif file and then transform the those bounds to get the upper left and lower right points of the dataset. My question is around how
|
By
j.carnes2553@...
·
#313
·
|
|
Re: Numpy error when masking a Landsat image with a polygon [Rasterio 1.0.28]
Thank you Alan!
I remove '.read(1)' and it works.
Thank you Alan!
I remove '.read(1)' and it works.
|
By
Juliano <juliano.ecc@...>
·
#312
·
|
|
Re: Numpy error when masking a Landsat image with a polygon [Rasterio 1.0.28]
After looking at the docs, I think you need to remove `.read(1)` as that returns a numpy array and `mask` expects a dataset:
After looking at the docs, I think you need to remove `.read(1)` as that returns a numpy array and `mask` expects a dataset:
|
By
Alan Snow
·
#311
·
|
|
Re: Numpy error when masking a Landsat image with a polygon [Rasterio 1.0.28]
I wonder if you are looking for `from rasterio.features import geometry_mask`?
https://rasterio.readthedocs.io/en/stable/api/rasterio.features.html#rasterio.features.geometry_mask
Example code:
I wonder if you are looking for `from rasterio.features import geometry_mask`?
https://rasterio.readthedocs.io/en/stable/api/rasterio.features.html#rasterio.features.geometry_mask
Example code:
|
By
Alan Snow
·
#310
·
|
|
Numpy error when masking a Landsat image with a polygon [Rasterio 1.0.28]
Hi folks
I'm having the following errors when I'm trying to mask a landsat image with a kml polygon.
The metadata for scene LC08_L1TP_221077_20190815_20190820_01_T1 is
My code
Hi folks
I'm having the following errors when I'm trying to mask a landsat image with a kml polygon.
The metadata for scene LC08_L1TP_221077_20190815_20190820_01_T1 is
My code
|
By
juliano.ecc@...
·
#309
·
|
|
Rasterio 1.0.28
Hi all,
Rasterio 1.0.27 broke a CLI plugin that my team uses at worker and may have broken any of yours that also pass creation options like `BLOCKXSIZE=1024` directly to dataset constructors without
Hi all,
Rasterio 1.0.27 broke a CLI plugin that my team uses at worker and may have broken any of yours that also pass creation options like `BLOCKXSIZE=1024` directly to dataset constructors without
|
By
Sean Gillies
·
#308
·
|
|
Re: Reading from S3
Hughes, would you be willing to run
CPL_CURL_VERBOSE=1 rio info "s3://s1-image-dataset/test.tif"
on your computer after unsetting AWS_S3_ENDPOINT and show us the output after sanitizing it (replace
Hughes, would you be willing to run
CPL_CURL_VERBOSE=1 rio info "s3://s1-image-dataset/test.tif"
on your computer after unsetting AWS_S3_ENDPOINT and show us the output after sanitizing it (replace
|
By
Sean Gillies
·
#307
·
|
|
Re: Reading from S3
Hughes,
The AWS_S3_ENDPOINT config option is intended to allow GDAL users to work with S3-compatible systems like https://min.io/index.html. It shouldn't be needed for the Gov Cloud, specification of
Hughes,
The AWS_S3_ENDPOINT config option is intended to allow GDAL users to work with S3-compatible systems like https://min.io/index.html. It shouldn't be needed for the Gov Cloud, specification of
|
By
Sean Gillies
·
#306
·
|
|
Re: Reading from S3
Hughes,
Have you tried setting `os.environ['AWS_S3_ENDPOINT']='s3.us-gov-west-1.amazonaws.com'` before opening the file?
This reminds me of a previous (but resolved) issue with requester pays
Hughes,
Have you tried setting `os.environ['AWS_S3_ENDPOINT']='s3.us-gov-west-1.amazonaws.com'` before opening the file?
This reminds me of a previous (but resolved) issue with requester pays
|
By
scott
·
#305
·
|
|
Re: Reading from S3
Hi Sean,
env: AWS_S3_ENDPOINT="us-west-1"This was indeed an error, although changing it did not fix the problem. I have included "fresh" logs below to show the problem still persists. Furthermore, as
Hi Sean,
env: AWS_S3_ENDPOINT="us-west-1"This was indeed an error, although changing it did not fix the problem. I have included "fresh" logs below to show the problem still persists. Furthermore, as
|
By
hughes.lloyd@...
·
#304
·
|
|
Re: Reading from S3
Hi Hughes,
Yes, I've been able to read raster data from S3 in a Jupyter notebook.
What do you make of the observation I made earlier today about the
env: AWS_S3_ENDPOINT="us-west-1"
log message from
Hi Hughes,
Yes, I've been able to read raster data from S3 in a Jupyter notebook.
What do you make of the observation I made earlier today about the
env: AWS_S3_ENDPOINT="us-west-1"
log message from
|
By
Sean Gillies
·
#303
·
|
|
Rasterio 1.0.27
Hi all,
Rasterio 1.0.27 is on PyPI now and here is the list of the changes.
Resolve #1744 by adding a `dtype` keyword argument to the WarpedVRT constructor. It allows a user to specify the working
Hi all,
Rasterio 1.0.27 is on PyPI now and here is the list of the changes.
Resolve #1744 by adding a `dtype` keyword argument to the WarpedVRT constructor. It allows a user to specify the working
|
By
Sean Gillies
·
#302
·
|
|
Re: Reading from S3
The issue doesn't exist outside of Jupyter notebooks. It seems once I am inside a notebook that rasterio does not function in the same manner even when the environment variables are identical.
Would
The issue doesn't exist outside of Jupyter notebooks. It seems once I am inside a notebook that rasterio does not function in the same manner even when the environment variables are identical.
Would
|
By
hughes.lloyd@...
·
#301
·
|