|
Calculate transformation using output dimensions
Looks like you are most of the way there. If you have a dataset open with `rasterio.open`, then you should be able to get the information you need for the input: with rasterio.open('/path/do/dataset.t
Looks like you are most of the way there. If you have a dataset open with `rasterio.open`, then you should be able to get the information you need for the input: with rasterio.open('/path/do/dataset.t
|
By
Alan Snow
· #13
·
|
|
Calculate transformation using output dimensions
This may be what you are looking for as well: rasterio.transform.from_bounds
This may be what you are looking for as well: rasterio.transform.from_bounds
|
By
Alan Snow
· #14
·
|
|
Click 7.0 breaks Rasterio
I bet the subcommand remame from underscore to dash will break a lot.
I bet the subcommand remame from underscore to dash will break a lot.
|
By
Alan Snow
· #55
·
|
|
reproject on numpy array
Hi Guy, The dest array will be overwritten by the reprojected data based on your source array. So, to get ones in the destination, you would need to modify the source array to have ones in it. Hope th
Hi Guy, The dest array will be overwritten by the reprojected data based on your source array. So, to get ones in the destination, you would need to modify the source array to have ones in it. Hope th
|
By
Alan Snow
· #110
·
|
|
Is it possible to create a rasterio object without exporting a file?
Hi Leah, Here is an example of what you want to do: https://github.com/corteva/geocube/blob/582ea0c2f3f0ba91326de098b75412e5033bee21/geocube/xarray_extensions/rioxarray.py#L617 It uses xarray, but the
Hi Leah, Here is an example of what you want to do: https://github.com/corteva/geocube/blob/582ea0c2f3f0ba91326de098b75412e5033bee21/geocube/xarray_extensions/rioxarray.py#L617 It uses xarray, but the
|
By
Alan Snow
· #194
·
|
|
Is it possible to create a rasterio object without exporting a file?
Hi Leah, So, this project uses xarray which has many similar operations to numpy, but with slight differences. In the case of the example, the `drop=True` is an option they provide that is described h
Hi Leah, So, this project uses xarray which has many similar operations to numpy, but with slight differences. In the case of the example, the `drop=True` is an option they provide that is described h
|
By
Alan Snow
· #196
·
|
|
Is it possible to create a rasterio object without exporting a file?
Hi Leah, If you would like to try the rioxarray as an xarray extension, it is now available on pypi. An example of what you would like to do is here: https://corteva.github.io/rioxarray/html/examples/
Hi Leah, If you would like to try the rioxarray as an xarray extension, it is now available on pypi. An example of what you would like to do is here: https://corteva.github.io/rioxarray/html/examples/
|
By
Alan Snow
· #198
·
|
|
problem with window sizes when parallelizing a funciton
Hi Javier, The blocksize is not a dynamic attribute. It represents the blocksize of the file on disk. So, if you want to change the blocksize, you will need to write it to a new file with a new blocks
Hi Javier, The blocksize is not a dynamic attribute. It represents the blocksize of the file on disk. So, if you want to change the blocksize, you will need to write it to a new file with a new blocks
|
By
Alan Snow
· #220
·
|
|
problem with window sizes when parallelizing a funciton
You are indeed correct Sean. Thanks for catching that and providing the correct answer! It seems I skimmed through the original message too fast.
You are indeed correct Sean. Thanks for catching that and providing the correct answer! It seems I skimmed through the original message too fast.
|
By
Alan Snow
· #222
·
|
|
Geotiff max/min coordinates question
I am not entirely sure what you are referring to, but I am assuming you want the bounds of the raster in lat/lon? If so, then `EPSG:4326` is a pretty standard projection for lat/lon coordinates. So, y
I am not entirely sure what you are referring to, but I am assuming you want the bounds of the raster in lat/lon? If so, then `EPSG:4326` is a pretty standard projection for lat/lon coordinates. So, y
|
By
Alan Snow
· #285
·
|
|
multi-dimensional support
I think this would be quite useful. i made a start at it using subdatasets in rioxarray here: https://github.com/corteva/rioxarray/pull/33 But, it is missing 1 dimensional variables such as time at th
I think this would be quite useful. i made a start at it using subdatasets in rioxarray here: https://github.com/corteva/rioxarray/pull/33 But, it is missing 1 dimensional variables such as time at th
|
By
Alan Snow
· #289
·
|
|
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: https:
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: https:
|
By
Alan Snow
· #310
·
|
|
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: https://rasterio.readthedocs.io/en/stable/api/rasterio.mask.html#rasterio.m
After looking at the docs, I think you need to remove `.read(1)` as that returns a numpy array and `mask` expects a dataset: https://rasterio.readthedocs.io/en/stable/api/rasterio.mask.html#rasterio.m
|
By
Alan Snow
· #311
·
|
|
Flaw in rasterio design?
Hi Amine, rasterio is definitely a great tool. But, if you are looking for an interface to it similar to pandas, you may be interested in rioxarray. It wraps the rasterio code and gives you an xarray
Hi Amine, rasterio is definitely a great tool. But, if you are looking for an interface to it similar to pandas, you may be interested in rioxarray. It wraps the rasterio code and gives you an xarray
|
By
Alan Snow
· #335
·
|
|
Geodatabase, FileGeodatabase, and Esri Geodatabase
Hello, It appears the GeoPackage format can support vector and raster data in GDAL similar to the FIleGDB format. https://gdal.org/drivers/raster/gpkg.html https://gdal.org/drivers/vector/gpkg.html No
Hello, It appears the GeoPackage format can support vector and raster data in GDAL similar to the FIleGDB format. https://gdal.org/drivers/raster/gpkg.html https://gdal.org/drivers/vector/gpkg.html No
|
By
Alan Snow
· #363
·
|
|
Creating rasterio dataset without IO
Hi Nic, I think you are looking for rioxarray. An example of what you want to do is here: https://corteva.github.io/rioxarray/stable/examples/clip_geom.html Best, Alan
Hi Nic, I think you are looking for rioxarray. An example of what you want to do is here: https://corteva.github.io/rioxarray/stable/examples/clip_geom.html Best, Alan
|
By
Alan Snow
· #435
·
|
|
Interconverting between pyproj and rasterio CRS objects
Here are instructions for rasterio to geopandas: https://gis.stackexchange.com/a/350231/144357 For geopandas to rasterio, you will need something like: if LooseVersion(rasterio.__gdal_version__) > Loo
Here are instructions for rasterio to geopandas: https://gis.stackexchange.com/a/350231/144357 For geopandas to rasterio, you will need something like: if LooseVersion(rasterio.__gdal_version__) > Loo
|
By
Alan Snow
· #441
·
|
|
Interconverting between pyproj and rasterio CRS objects
Add some history for reference: https://rasterio.groups.io/g/dev/topic/switch_from_proj_4_format_to/28991934
Add some history for reference: https://rasterio.groups.io/g/dev/topic/switch_from_proj_4_format_to/28991934
|
By
Alan Snow
· #445
·
|
|
can resampling not populate cell if source has nodata?
Here is an example using rioxarray: https://corteva.github.io/rioxarray/stable/examples/interpolate_na.html It uses scipy griddata.
Here is an example using rioxarray: https://corteva.github.io/rioxarray/stable/examples/interpolate_na.html It uses scipy griddata.
|
By
Alan Snow
· #547
·
|
|
Request for comment: rasterio wheels on PyPI and GDAL 3.1
My first thought is that if you do make the switch, I think it would make sense to do it in the 1.2 release. > I have heard from those who would rather stick with 2.4.4 for a while yet due to increase
My first thought is that if you do make the switch, I think it would make sense to do it in the 1.2 release. > I have heard from those who would rather stick with 2.4.4 for a while yet due to increase
|
By
Alan Snow
· #606
·
|