Closed zxdawn closed 1 year ago
import rioxarray import xarray as xr ds_dem_test = xr.open_dataset("dem_test.tif", engine="rasterio") data_reproj = ds_dem_test['band_data'].rio.reproject("EPSG:32645")
Original data (link) ds_dem_test['band_data']:
ds_dem_test['band_data']
array([[[ 579., 582., ..., 2029., 2040.], [ 595., 603., ..., 1995., 2010.], ..., [ 530., 532., ..., 446., 437.], [ 520., 519., ..., 450., 447.]]], dtype=float32)
Reprojected data data_reproj:
data_reproj
array([[[3.4028235e+38, 3.4028235e+38, 3.4028235e+38, ..., 3.4028235e+38, 3.4028235e+38, 3.4028235e+38], [3.4028235e+38, 3.4028235e+38, 3.4028235e+38, ..., 3.4028235e+38, 3.4028235e+38, 3.4028235e+38], [3.4028235e+38, 3.4028235e+38, 3.4028235e+38, ..., 3.4028235e+38, 3.4028235e+38, 3.4028235e+38], ..., [3.4028235e+38, 3.4028235e+38, 3.4028235e+38, ..., 3.4028235e+38, 3.4028235e+38, 3.4028235e+38], [3.4028235e+38, 3.4028235e+38, 3.4028235e+38, ..., 3.4028235e+38, 3.4028235e+38, 3.4028235e+38], [3.4028235e+38, 3.4028235e+38, 3.4028235e+38, ..., 3.4028235e+38, 3.4028235e+38, 3.4028235e+38]]], dtype=float32)
Tha values should be similar
python -c "import rioxarray; rioxarray.show_versions()"
Environment (conda list):
conda list
Ha, these large values are fill_value: data_reproj.where(data_reproj!=data_reproj.rio.nodata).plot():
data_reproj.where(data_reproj!=data_reproj.rio.nodata).plot()
Problem description
Original data (link)
ds_dem_test['band_data']
:Reprojected data
data_reproj
:Expected Output
Tha values should be similar
Environment Information
python -c "import rioxarray; rioxarray.show_versions()"
Installation method
Conda environment information (if you installed with conda):
Environment (
conda list
):