Skip to main content

Questions tagged [rioxarray]

geospatial xarray extension powered by rasterio. https://github.com/corteva/rioxarray

1 vote
0 answers
49 views

Changes in resolution after saving with rasterio.to_raster

This is my code: reach_ds = xr.open_dataset(reach) reach_ds.rio.write_crs('EPSG:32632', inplace=True) reach_ds = reach_ds.fillna(0) reach_ds = reach_ds.isel(time=0) reach_ds.rio.to_raster(...
Elisa's user avatar
  • 11
1 vote
1 answer
104 views

Set spatial dims in xarray rio using `coords` from the dataset

This is partially just a curiosity question, but I think it would also help me understand xarray a bit better. I've loaded a NetCDF file into an xarray Dataset. it has coords I would expect. ipdb> ...
Vincent Buscarello's user avatar
0 votes
1 answer
111 views

How to get meta data from rioxarray similar to rasterio's meta attribute

I want to find out all the metadata associated with the raster similar to rasterio's meta attribute, with rasterio.open(file_path) as src: metadata = src.meta But with rioxarray. Currently there ...
Aman Bagrecha's user avatar
2 votes
0 answers
65 views

Cropping and resampling distorts raster

I've been struggling to find out why my raster cropping isn't working. I've included the raw raster files here so it should be a fully reproducible example. I'm trying to implement the following ...
Samuel T's user avatar
0 votes
1 answer
353 views

Custom average merge multiple GeoTIFFs using Rioxarray, Rasterio and Numpy

I'm trying to merge multiple GeoTIFFs using rioxarray merge_arrays with a custom method that averages overlapping values. I've pieced together the following code which produces a GeoTIFF but it looks ...
Kevin's user avatar
  • 121
0 votes
1 answer
295 views

how does rioxarray reproject match resample the data?

What method is used to resample within rioxarray reproject match? Looking into resampling in rioxarray it seems to use rasterio which defaults to nearest resampling. Should I assume this is what is ...
Jennifer's user avatar
1 vote
0 answers
295 views

Using dask.distributed with rioxarray rio.to_raster results in `ValueError: Lock is not yet acquired` [closed]

I am trying to write some code using dask.distributed.Client and rioxarray to_raster that: Concatenates two rasters (dask arrays) Applies a function across all blocks in the concatenated array Writes ...
katieb1's user avatar
  • 31
0 votes
0 answers
54 views

Merging arrays creates gaps betwen, the rasters

I merge many hundred rasters all in the same projection, same orientation, same resolution. The next raster should start where there last ended (no overly, zero gap). I merge DataArrays with rioxarray'...
tetje's user avatar
  • 99
1 vote
1 answer
235 views

rio.to_raster returns ValueError: cannot convert float NaN to integer

Maybe this is more like a Pandas question but when I try to write an xarray to a raster using rio.to_raster() I get a ValueError in Python. If I don't convert the type of xarray to int16 (this is a ...
Andrei Niță's user avatar
2 votes
1 answer
253 views

User-defined reprojection using rioxarray

I'm trying to reproject a raster dataset using a user-defined projection in Python. I was able to achieve the desired reprojection setting ArcGIS's arcpy.CreateCustomGeoTransformation_management tool ...
Liyuneh's user avatar
  • 21
1 vote
0 answers
92 views

Merge Arrays (Mosaic) larger than RAM

I have a bunch of GeoTIFF files. These are about 100 GB on drive, when using compression with zstd (speed level). Hence, when loading, they are still much larger. I can load them in rioxarray with ...
tetje's user avatar
  • 99
1 vote
1 answer
705 views

Reproject large raster using Python

I have some large rasters that I want to reproject in a memory-safe way, using a second raster as a template . This code works nicely for smaller ones, but when they are large the Python kernel ...
TheRealJimShady's user avatar
0 votes
0 answers
372 views

rioxarray.open_rasterio() won't close a file when using it with a context manager

I am writing some unit tests to test reading in raster data into an xr.Dataset data structure via the rioxarray.open_rasterio() method. The code creates a test raster to read into rioxarray....
Adriano Matos's user avatar
0 votes
0 answers
415 views

Low performance when writing a large xarray.DataArray with dask

I'm preprocessing HMASR data, the data contains multiple data files with format of netcdf, and each tile (1X1 degree) is a nc file. So I read it through xarray open_mfdataset() to mosaic it spatially ...
孟泽楷's user avatar
1 vote
2 answers
131 views

How to pass GDAL CLI arguments when exporting a GeoTIFF with rioxarray

I have a routine that create a mosaic from COPDEM 30M and I need to export it passing an argument to it. The argument: -mo AREA_OR_POINT=AREA --config GTIFF_POINT_GEO_IGNORE True The behavior I expect ...
Rik Ferreira's user avatar

15 30 50 per page
1
2 3 4 5
11