|
Georeference and warp a drone image based on sensor orientation and location using transform.from_gcps()
From what Sean referenced earlier (https://rasterio.readthedocs.io/en/latest/topics/reproject.html#reprojecting-with-other-georeferencing-metadata): Don't use "from_gcps" and instead pass in "gcps" di
From what Sean referenced earlier (https://rasterio.readthedocs.io/en/latest/topics/reproject.html#reprojecting-with-other-georeferencing-metadata): Don't use "from_gcps" and instead pass in "gcps" di
|
By
Alan Snow
· #962
·
|
|
a_scale parameter for writing GTiff file
The scales and offsets properties on the DatasetWriter object should allow you to update the raster. I recommend masking your data before scaling your data as the mask value is for the raw data. Refer
The scales and offsets properties on the DatasetWriter object should allow you to update the raster. I recommend masking your data before scaling your data as the mask value is for the raw data. Refer
|
By
Alan Snow
· #945
·
|
|
Creating 12GB Create very large empty geotif with Rasterio without using large amounts of memory
Reading & writing with windows can be done with rioxarray (rasterio + xarray): import rioxarray rds = rioxarray.open_rasterio("input.tif", lock=False) rds.rio.to_raster("output.tif", windowed=True) Yo
Reading & writing with windows can be done with rioxarray (rasterio + xarray): import rioxarray rds = rioxarray.open_rasterio("input.tif", lock=False) rds.rio.to_raster("output.tif", windowed=True) Yo
|
By
Alan Snow
· #794
·
Edited
|
|
HDF4 format support
HDF4 files are currently not supported out of the box with rasterio wheels (https://github.com/rasterio/rasterio-wheels/issues/36). To support HDF4 files, you will need to build GDAL yourself with HDF
HDF4 files are currently not supported out of the box with rasterio wheels (https://github.com/rasterio/rasterio-wheels/issues/36). To support HDF4 files, you will need to build GDAL yourself with HDF
|
By
Alan Snow
· #716
·
|
|
TypeError: open() takes at most 8 arguments (14 given) when writing
I think the issue is that you need to use `rasterio.open`.
I think the issue is that you need to use `rasterio.open`.
|
By
Alan Snow
· #709
·
|
|
Merge bug?
One thing to check would be if the nodata values are properly set on the rasters. If they are not, then merging could cause the nodata values to fill in those areas instead of the correct values.
One thing to check would be if the nodata values are properly set on the rasters. If they are not, then merging could cause the nodata values to fill in those areas instead of the correct values.
|
By
Alan Snow
· #705
·
|
|
Get PROJ.4 representation of CRS object
pyproj.CRS has a to_proj4 method that should be able to do that: https://pyproj4.github.io/pyproj/stable/examples.html
pyproj.CRS has a to_proj4 method that should be able to do that: https://pyproj4.github.io/pyproj/stable/examples.html
|
By
Alan Snow
· #680
·
|
|
Rasterio 1.2b1
I think this is the problem: https://pyproj4.github.io/pyproj/stable/gotchas.html#internal-proj-error-sqlite-error-on-select
I think this is the problem: https://pyproj4.github.io/pyproj/stable/gotchas.html#internal-proj-error-sqlite-error-on-select
|
By
Alan Snow
· #674
·
|
|
Rasterio 1.2b1
The new wheel now includes the proj.db, which is close to the size of grids that were removed. Also, PROJ requires more dependencies, so that is also a likely factor. It might work, but I wouldn't rec
The new wheel now includes the proj.db, which is close to the size of grids that were removed. Also, PROJ requires more dependencies, so that is also a likely factor. It might work, but I wouldn't rec
|
By
Alan Snow
· #669
·
|
|
Rasterio 1.2b1
Thanks for working on this Sean! I verified that PROJ_NETWORK=ON works with a basic test: rio_geom.py: from rasterio.warp import transform_geom geometry = [ { "type": "Polygon", "coordinates": [ [ [-9
Thanks for working on this Sean! I verified that PROJ_NETWORK=ON works with a basic test: rio_geom.py: from rasterio.warp import transform_geom geometry = [ { "type": "Polygon", "coordinates": [ [ [-9
|
By
Alan Snow
· #665
·
|
|
opening file with forced CRS
This should be fixed in 1.1.5 IIRC: #1248
This should be fixed in 1.1.5 IIRC: #1248
|
By
Alan Snow
· #628
·
|
|
Best way to sample all data in a raster
I believe that this is what you are looking for: https://rasterio.readthedocs.io/en/latest/topics/resampling.html
I believe that this is what you are looking for: https://rasterio.readthedocs.io/en/latest/topics/resampling.html
|
By
Alan Snow
· #623
·
|
|
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
·
|
|
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
·
|
|
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
·
|
|
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
·
|
|
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
·
|
|
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
·
|
|
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
·
|
|
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
·
|