rio-tiler 7.8.1__tar.gz → 7.9.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/PKG-INFO +1 -1
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/pyproject.toml +1 -1
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/__init__.py +1 -1
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/io/xarray.py +159 -81
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/reader.py +1 -22
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/utils.py +22 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/.gitignore +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/AUTHORS.txt +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/LICENSE +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/README.md +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/__init__.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/accent.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/accent_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/afmhot.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/afmhot_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/algae.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/algae_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/amp.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/amp_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/autumn.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/autumn_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/balance.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/balance_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/binary.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/binary_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/blues.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/blues_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/bone.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/bone_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/brbg.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/brbg_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/brg.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/brg_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/bugn.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/bugn_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/bupu.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/bupu_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/bwr.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/bwr_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/cfastie.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/cividis.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/cividis_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/cmrmap.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/cmrmap_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/cool.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/cool_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/coolwarm.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/coolwarm_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/copper.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/copper_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/cubehelix.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/cubehelix_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/curl.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/curl_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/dark2.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/dark2_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/deep.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/deep_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/delta.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/delta_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/dense.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/dense_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/diff.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/diff_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/flag.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/flag_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gist_earth.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gist_earth_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gist_gray.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gist_gray_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gist_heat.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gist_heat_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gist_ncar.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gist_ncar_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gist_rainbow.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gist_rainbow_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gist_stern.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gist_stern_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gist_yarg.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gist_yarg_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gnbu.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gnbu_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gnuplot.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gnuplot2.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gnuplot2_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gnuplot_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gray.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/gray_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/greens.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/greens_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/greys.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/greys_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/haline.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/haline_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/hot.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/hot_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/hsv.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/hsv_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/ice.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/ice_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/inferno.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/inferno_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/jet.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/jet_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/magma.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/magma_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/matter.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/matter_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/nipy_spectral.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/nipy_spectral_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/ocean.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/ocean_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/oranges.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/oranges_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/orrd.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/orrd_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/oxy.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/oxy_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/paired.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/paired_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/pastel1.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/pastel1_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/pastel2.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/pastel2_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/phase.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/phase_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/pink.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/pink_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/piyg.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/piyg_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/plasma.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/plasma_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/prgn.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/prgn_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/prism.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/prism_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/pubu.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/pubu_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/pubugn.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/pubugn_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/puor.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/puor_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/purd.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/purd_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/purples.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/purples_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/rain.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/rain_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/rainbow.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/rainbow_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/rdbu.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/rdbu_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/rdgy.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/rdgy_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/rdpu.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/rdpu_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/rdylbu.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/rdylbu_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/rdylgn.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/rdylgn_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/reds.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/reds_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/rplumbo.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/schwarzwald.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/seismic.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/seismic_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/set1.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/set1_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/set2.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/set2_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/set3.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/set3_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/solar.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/solar_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/spectral.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/spectral_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/speed.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/speed_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/spring.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/spring_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/summer.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/summer_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/tab10.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/tab10_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/tab20.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/tab20_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/tab20b.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/tab20b_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/tab20c.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/tab20c_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/tarn.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/tarn_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/tempo.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/tempo_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/terrain.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/terrain_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/thermal.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/thermal_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/topo.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/topo_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/turbid.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/turbid_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/turbo.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/turbo_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/twilight.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/twilight_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/twilight_shifted.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/twilight_shifted_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/viridis.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/viridis_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/winter.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/winter_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/wistia.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/wistia_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/ylgn.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/ylgn_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/ylgnbu.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/ylgnbu_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/ylorbr.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/ylorbr_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/ylorrd.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/cmap_data/ylorrd_r.npy +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/colormap.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/constants.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/errors.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/experimental/__init__.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/experimental/vsifile.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/expression.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/io/__init__.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/io/base.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/io/rasterio.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/io/stac.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/logger.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/models.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/mosaic/__init__.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/mosaic/methods/__init__.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/mosaic/methods/base.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/mosaic/methods/defaults.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/mosaic/reader.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/profiles.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/py.typed +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/tasks.py +0 -0
- {rio_tiler-7.8.1 → rio_tiler-7.9.1}/rio_tiler/types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rio-tiler
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.9.1
|
|
4
4
|
Summary: User friendly Rasterio plugin to read raster datasets.
|
|
5
5
|
Project-URL: Homepage, https://cogeotiff.github.io/rio-tiler/
|
|
6
6
|
Project-URL: Documentation, https://cogeotiff.github.io/rio-tiler/
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import math
|
|
5
6
|
import warnings
|
|
6
7
|
from typing import Any, Dict, List, Optional, Tuple
|
|
7
8
|
|
|
8
9
|
import attr
|
|
9
10
|
import numpy
|
|
10
11
|
from morecantile import Tile, TileMatrixSet
|
|
12
|
+
from rasterio import windows
|
|
11
13
|
from rasterio.crs import CRS
|
|
12
14
|
from rasterio.enums import Resampling
|
|
13
15
|
from rasterio.errors import NotGeoreferencedWarning
|
|
@@ -16,9 +18,9 @@ from rasterio.features import rasterize
|
|
|
16
18
|
from rasterio.transform import from_bounds, rowcol
|
|
17
19
|
from rasterio.warp import calculate_default_transform
|
|
18
20
|
from rasterio.warp import transform as transform_coords
|
|
19
|
-
from rasterio.warp import transform_geom
|
|
21
|
+
from rasterio.warp import transform_bounds, transform_geom
|
|
20
22
|
|
|
21
|
-
from rio_tiler.constants import WEB_MERCATOR_TMS, WGS84_CRS
|
|
23
|
+
from rio_tiler.constants import WEB_MERCATOR_CRS, WEB_MERCATOR_TMS, WGS84_CRS
|
|
22
24
|
from rio_tiler.errors import (
|
|
23
25
|
InvalidGeographicBounds,
|
|
24
26
|
MissingCRS,
|
|
@@ -27,10 +29,11 @@ from rio_tiler.errors import (
|
|
|
27
29
|
)
|
|
28
30
|
from rio_tiler.io.base import BaseReader
|
|
29
31
|
from rio_tiler.models import BandStatistics, ImageData, Info, PointData
|
|
30
|
-
from rio_tiler.reader import _get_width_height
|
|
31
32
|
from rio_tiler.types import BBox, Indexes, NoData, RIOResampling, WarpResampling
|
|
32
33
|
from rio_tiler.utils import (
|
|
33
34
|
CRS_to_uri,
|
|
35
|
+
_get_width_height,
|
|
36
|
+
_missing_size,
|
|
34
37
|
_validate_shape_input,
|
|
35
38
|
cast_to_sequence,
|
|
36
39
|
get_array_statistics,
|
|
@@ -268,53 +271,24 @@ class XarrayReader(BaseReader):
|
|
|
268
271
|
f"Tile(x={tile_x}, y={tile_y}, z={tile_z}) is outside bounds"
|
|
269
272
|
)
|
|
270
273
|
|
|
271
|
-
da, band_names = self._sel_indexes(indexes)
|
|
272
|
-
|
|
273
|
-
if nodata is not None:
|
|
274
|
-
da = da.rio.write_nodata(nodata)
|
|
275
|
-
|
|
276
274
|
tile_bounds = tuple(self.tms.xy_bounds(Tile(x=tile_x, y=tile_y, z=tile_z)))
|
|
277
275
|
dst_crs = self.tms.rasterio_crs
|
|
278
276
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
277
|
+
return self.part(
|
|
278
|
+
tile_bounds,
|
|
279
|
+
dst_crs=dst_crs,
|
|
280
|
+
bounds_crs=dst_crs,
|
|
281
|
+
reproject_method=reproject_method,
|
|
283
282
|
auto_expand=auto_expand,
|
|
284
|
-
)
|
|
285
|
-
da = da.rio.reproject(
|
|
286
|
-
dst_crs,
|
|
287
|
-
shape=(tilesize, tilesize),
|
|
288
|
-
transform=from_bounds(*tile_bounds, height=tilesize, width=tilesize),
|
|
289
|
-
resampling=Resampling[reproject_method],
|
|
290
283
|
nodata=nodata,
|
|
284
|
+
indexes=indexes,
|
|
285
|
+
height=tilesize,
|
|
286
|
+
width=tilesize,
|
|
287
|
+
out_dtype=out_dtype,
|
|
288
|
+
**kwargs,
|
|
291
289
|
)
|
|
292
290
|
|
|
293
|
-
|
|
294
|
-
minv, maxv = da.attrs.get("valid_min"), da.attrs.get("valid_max")
|
|
295
|
-
stats = None
|
|
296
|
-
if minv is not None and maxv is not None and nodata not in [minv, maxv]:
|
|
297
|
-
stats = ((minv, maxv),) * da.rio.count
|
|
298
|
-
|
|
299
|
-
arr = da.to_masked_array()
|
|
300
|
-
if out_dtype:
|
|
301
|
-
arr = arr.astype(out_dtype)
|
|
302
|
-
arr.mask |= arr.data == da.rio.nodata
|
|
303
|
-
|
|
304
|
-
output_bounds = da.rio._unordered_bounds()
|
|
305
|
-
if output_bounds[1] > output_bounds[3] and da.rio.transform().e > 0:
|
|
306
|
-
yaxis = self.input.dims.index(self.input.rio.y_dim)
|
|
307
|
-
arr = numpy.flip(arr, axis=yaxis)
|
|
308
|
-
|
|
309
|
-
return ImageData(
|
|
310
|
-
arr,
|
|
311
|
-
bounds=tile_bounds,
|
|
312
|
-
crs=dst_crs,
|
|
313
|
-
dataset_statistics=stats,
|
|
314
|
-
band_names=band_names,
|
|
315
|
-
)
|
|
316
|
-
|
|
317
|
-
def part(
|
|
291
|
+
def part( # noqa: C901
|
|
318
292
|
self,
|
|
319
293
|
bbox: BBox,
|
|
320
294
|
dst_crs: Optional[CRS] = None,
|
|
@@ -348,11 +322,12 @@ class XarrayReader(BaseReader):
|
|
|
348
322
|
rio_tiler.models.ImageData: ImageData instance with data, mask and input spatial info.
|
|
349
323
|
|
|
350
324
|
"""
|
|
351
|
-
if max_size and width
|
|
325
|
+
if max_size and (width or height):
|
|
352
326
|
warnings.warn(
|
|
353
|
-
"'max_size' will be ignored with with 'height'
|
|
327
|
+
"'max_size' will be ignored with with 'height' or 'width' set.",
|
|
354
328
|
UserWarning,
|
|
355
329
|
)
|
|
330
|
+
max_size = None
|
|
356
331
|
|
|
357
332
|
dst_crs = dst_crs or bounds_crs
|
|
358
333
|
|
|
@@ -361,33 +336,89 @@ class XarrayReader(BaseReader):
|
|
|
361
336
|
if nodata is not None:
|
|
362
337
|
da = da.rio.write_nodata(nodata)
|
|
363
338
|
|
|
339
|
+
# Forward valid_min/valid_max to the ImageData object
|
|
340
|
+
minv, maxv = da.attrs.get("valid_min"), da.attrs.get("valid_max")
|
|
341
|
+
stats = None
|
|
342
|
+
if minv is not None and maxv is not None:
|
|
343
|
+
stats = ((minv, maxv),) * da.rio.count
|
|
344
|
+
|
|
364
345
|
da = da.rio.clip_box(
|
|
365
346
|
*bbox,
|
|
366
347
|
crs=bounds_crs,
|
|
367
348
|
auto_expand=auto_expand,
|
|
368
349
|
)
|
|
369
350
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
351
|
+
src_width = da.rio.width
|
|
352
|
+
src_height = da.rio.height
|
|
353
|
+
src_bounds = list(da.rio.bounds())
|
|
354
|
+
src_transform = da.rio.transform()
|
|
355
|
+
|
|
356
|
+
# Fix for https://github.com/cogeotiff/rio-tiler/issues/654
|
|
357
|
+
#
|
|
358
|
+
# When using `calculate_default_transform` with dataset
|
|
359
|
+
# which span at high/low latitude outside the area_of_use
|
|
360
|
+
# of the WebMercator projection, we `crop` the dataset
|
|
361
|
+
# to get the transform (resolution).
|
|
362
|
+
#
|
|
363
|
+
# Note: Should be handled in gdal 3.8 directly
|
|
364
|
+
# https://github.com/OSGeo/gdal/pull/8775
|
|
365
|
+
if (
|
|
366
|
+
self.crs == WGS84_CRS
|
|
367
|
+
and dst_crs == WEB_MERCATOR_CRS
|
|
368
|
+
and (src_bounds[1] < -85.06 or src_bounds[3] > 85.06)
|
|
369
|
+
):
|
|
370
|
+
warnings.warn(
|
|
371
|
+
"Adjusting dataset latitudes to avoid re-projection overflow",
|
|
372
|
+
UserWarning,
|
|
377
373
|
)
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
374
|
+
src_bounds[1] = max(src_bounds[1], -85.06)
|
|
375
|
+
src_bounds[3] = min(src_bounds[3], 85.06)
|
|
376
|
+
w = windows.from_bounds(*src_bounds, transform=src_transform)
|
|
377
|
+
src_height = round(w.height)
|
|
378
|
+
src_width = round(w.width)
|
|
379
|
+
|
|
380
|
+
# South->North
|
|
381
|
+
if src_transform.e > 0:
|
|
382
|
+
src_bounds = [src_bounds[0], src_bounds[3], src_bounds[2], src_bounds[1]]
|
|
383
|
+
# West->East
|
|
384
|
+
if src_transform.a < 0:
|
|
385
|
+
src_bounds = [src_bounds[2], src_bounds[1], src_bounds[1], src_bounds[3]]
|
|
386
|
+
|
|
387
|
+
if dst_crs != self.crs:
|
|
388
|
+
# transform of the reprojected dataset
|
|
389
|
+
dst_transform, _, _ = calculate_default_transform(
|
|
390
|
+
self.crs, dst_crs, src_width, src_height, *src_bounds
|
|
384
391
|
)
|
|
392
|
+
else:
|
|
393
|
+
dst_transform = from_bounds(*src_bounds, src_width, src_height)
|
|
385
394
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
395
|
+
if bounds_crs and bounds_crs != dst_crs:
|
|
396
|
+
bbox = transform_bounds(bounds_crs, dst_crs, *bbox, densify_pts=21)
|
|
397
|
+
|
|
398
|
+
w, s, e, n = bbox
|
|
399
|
+
# max size of the output dataset for the bbox
|
|
400
|
+
dst_width = max(1, round((e - w) / dst_transform.a))
|
|
401
|
+
dst_height = max(1, round((s - n) / dst_transform.e))
|
|
402
|
+
|
|
403
|
+
if max_size:
|
|
404
|
+
height, width = _get_width_height(max_size, dst_height, dst_width)
|
|
405
|
+
|
|
406
|
+
elif _missing_size(height, width):
|
|
407
|
+
ratio = dst_height / dst_width
|
|
408
|
+
if width:
|
|
409
|
+
height = math.ceil(width * ratio)
|
|
410
|
+
else:
|
|
411
|
+
width = math.ceil(height / ratio)
|
|
412
|
+
|
|
413
|
+
height = height or dst_height
|
|
414
|
+
width = width or dst_width
|
|
415
|
+
da = da.rio.reproject(
|
|
416
|
+
dst_crs,
|
|
417
|
+
shape=(height, width),
|
|
418
|
+
transform=from_bounds(w, s, e, n, width, height),
|
|
419
|
+
resampling=Resampling[reproject_method],
|
|
420
|
+
nodata=nodata,
|
|
421
|
+
)
|
|
391
422
|
|
|
392
423
|
arr = da.to_masked_array()
|
|
393
424
|
if out_dtype:
|
|
@@ -401,7 +432,7 @@ class XarrayReader(BaseReader):
|
|
|
401
432
|
|
|
402
433
|
img = ImageData(
|
|
403
434
|
arr,
|
|
404
|
-
bounds=
|
|
435
|
+
bounds=bbox,
|
|
405
436
|
crs=da.rio.crs,
|
|
406
437
|
dataset_statistics=stats,
|
|
407
438
|
band_names=band_names,
|
|
@@ -449,11 +480,12 @@ class XarrayReader(BaseReader):
|
|
|
449
480
|
rio_tiler.models.ImageData: ImageData instance with data, mask and input spatial info.
|
|
450
481
|
|
|
451
482
|
"""
|
|
452
|
-
if max_size and width
|
|
483
|
+
if max_size and (width or height):
|
|
453
484
|
warnings.warn(
|
|
454
|
-
"'max_size' will be ignored with with 'height'
|
|
485
|
+
"'max_size' will be ignored with with 'height' or 'width' set.",
|
|
455
486
|
UserWarning,
|
|
456
487
|
)
|
|
488
|
+
max_size = None
|
|
457
489
|
|
|
458
490
|
da, band_names = self._sel_indexes(indexes)
|
|
459
491
|
|
|
@@ -461,12 +493,55 @@ class XarrayReader(BaseReader):
|
|
|
461
493
|
da = da.rio.write_nodata(nodata)
|
|
462
494
|
|
|
463
495
|
if dst_crs and dst_crs != self.crs:
|
|
496
|
+
src_width = da.rio.width
|
|
497
|
+
src_height = da.rio.height
|
|
498
|
+
src_bounds = list(da.rio.bounds())
|
|
499
|
+
src_transform = da.rio.transform()
|
|
500
|
+
|
|
501
|
+
# Fix for https://github.com/cogeotiff/rio-tiler/issues/654
|
|
502
|
+
#
|
|
503
|
+
# When using `calculate_default_transform` with dataset
|
|
504
|
+
# which span at high/low latitude outside the area_of_use
|
|
505
|
+
# of the WebMercator projection, we `crop` the dataset
|
|
506
|
+
# to get the transform (resolution).
|
|
507
|
+
#
|
|
508
|
+
# Note: Should be handled in gdal 3.8 directly
|
|
509
|
+
# https://github.com/OSGeo/gdal/pull/8775
|
|
510
|
+
if (
|
|
511
|
+
self.crs == WGS84_CRS
|
|
512
|
+
and dst_crs == WEB_MERCATOR_CRS
|
|
513
|
+
and (src_bounds[1] < -85.06 or src_bounds[3] > 85.06)
|
|
514
|
+
):
|
|
515
|
+
warnings.warn(
|
|
516
|
+
"Adjusting dataset latitudes to avoid re-projection overflow",
|
|
517
|
+
UserWarning,
|
|
518
|
+
)
|
|
519
|
+
src_bounds[1] = max(src_bounds[1], -85.06)
|
|
520
|
+
src_bounds[3] = min(src_bounds[3], 85.06)
|
|
521
|
+
|
|
522
|
+
# North->South
|
|
523
|
+
if src_transform.e > 0:
|
|
524
|
+
src_bounds = [
|
|
525
|
+
src_bounds[0],
|
|
526
|
+
src_bounds[3],
|
|
527
|
+
src_bounds[2],
|
|
528
|
+
src_bounds[1],
|
|
529
|
+
]
|
|
530
|
+
# West->East
|
|
531
|
+
if src_transform.a < 0:
|
|
532
|
+
src_bounds = [
|
|
533
|
+
src_bounds[2],
|
|
534
|
+
src_bounds[1],
|
|
535
|
+
src_bounds[1],
|
|
536
|
+
src_bounds[3],
|
|
537
|
+
]
|
|
538
|
+
|
|
539
|
+
w = windows.from_bounds(*src_bounds, transform=src_transform)
|
|
540
|
+
src_height = round(w.height)
|
|
541
|
+
src_width = round(w.width)
|
|
542
|
+
|
|
464
543
|
dst_transform, w, h = calculate_default_transform(
|
|
465
|
-
self.crs,
|
|
466
|
-
dst_crs,
|
|
467
|
-
da.rio.width,
|
|
468
|
-
da.rio.height,
|
|
469
|
-
*da.rio.bounds(),
|
|
544
|
+
self.crs, dst_crs, src_width, src_height, *src_bounds
|
|
470
545
|
)
|
|
471
546
|
da = da.rio.reproject(
|
|
472
547
|
dst_crs,
|
|
@@ -500,17 +575,18 @@ class XarrayReader(BaseReader):
|
|
|
500
575
|
band_names=band_names,
|
|
501
576
|
)
|
|
502
577
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
if max_size and not (width and height):
|
|
506
|
-
output_height, output_width = _get_width_height(
|
|
507
|
-
max_size, img.height, img.width
|
|
508
|
-
)
|
|
578
|
+
if max_size:
|
|
579
|
+
height, width = _get_width_height(max_size, img.height, img.width)
|
|
509
580
|
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
581
|
+
elif _missing_size(height, width):
|
|
582
|
+
ratio = img.height / img.width
|
|
583
|
+
if width:
|
|
584
|
+
height = math.ceil(width * ratio)
|
|
585
|
+
else:
|
|
586
|
+
width = math.ceil(height / ratio)
|
|
587
|
+
|
|
588
|
+
if (height and width) and (height != da.rio.height or width != da.rio.width):
|
|
589
|
+
img = img.resize(height, width, resampling_method=resampling_method)
|
|
514
590
|
|
|
515
591
|
return img
|
|
516
592
|
|
|
@@ -622,6 +698,8 @@ class XarrayReader(BaseReader):
|
|
|
622
698
|
reproject_method=reproject_method,
|
|
623
699
|
resampling_method=resampling_method,
|
|
624
700
|
out_dtype=out_dtype,
|
|
701
|
+
auto_expand=auto_expand,
|
|
702
|
+
**kwargs,
|
|
625
703
|
)
|
|
626
704
|
|
|
627
705
|
if dst_crs != shape_crs:
|
|
@@ -20,6 +20,7 @@ from rio_tiler.constants import WGS84_CRS
|
|
|
20
20
|
from rio_tiler.errors import InvalidBufferSize, PointOutsideBounds, TileOutsideBounds
|
|
21
21
|
from rio_tiler.models import ImageData, PointData
|
|
22
22
|
from rio_tiler.types import BBox, Indexes, NoData, RIOResampling, WarpResampling
|
|
23
|
+
from rio_tiler.utils import _get_width_height, _missing_size
|
|
23
24
|
from rio_tiler.utils import _requested_tile_aligned_with_internal_tile as is_aligned
|
|
24
25
|
from rio_tiler.utils import (
|
|
25
26
|
_round_window,
|
|
@@ -42,28 +43,6 @@ class Options(TypedDict, total=False):
|
|
|
42
43
|
post_process: Optional[Callable[[numpy.ma.MaskedArray], numpy.ma.MaskedArray]]
|
|
43
44
|
|
|
44
45
|
|
|
45
|
-
def _get_width_height(max_size, dataset_height, dataset_width) -> Tuple[int, int]:
|
|
46
|
-
"""Get Output Width/Height based on a max_size and dataset shape."""
|
|
47
|
-
if max(dataset_height, dataset_width) < max_size:
|
|
48
|
-
return dataset_height, dataset_width
|
|
49
|
-
|
|
50
|
-
ratio = dataset_height / dataset_width
|
|
51
|
-
if ratio > 1:
|
|
52
|
-
height = max_size
|
|
53
|
-
width = math.ceil(height / ratio)
|
|
54
|
-
else:
|
|
55
|
-
width = max_size
|
|
56
|
-
height = math.ceil(width * ratio)
|
|
57
|
-
|
|
58
|
-
return height, width
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
def _missing_size(w: Optional[int] = None, h: Optional[int] = None):
|
|
62
|
-
"""Check if one and only one size (width, height) is valid."""
|
|
63
|
-
iterator = iter([w, h])
|
|
64
|
-
return any(iterator) and not any(iterator)
|
|
65
|
-
|
|
66
|
-
|
|
67
46
|
def _apply_buffer(
|
|
68
47
|
buffer: float,
|
|
69
48
|
bounds: BBox,
|
|
@@ -43,6 +43,28 @@ def _chunks(my_list: Sequence, chuck_size: int) -> Generator[Sequence, None, Non
|
|
|
43
43
|
yield my_list[i : i + chuck_size]
|
|
44
44
|
|
|
45
45
|
|
|
46
|
+
def _get_width_height(max_size, dataset_height, dataset_width) -> Tuple[int, int]:
|
|
47
|
+
"""Get Output Width/Height based on a max_size and dataset shape."""
|
|
48
|
+
if max(dataset_height, dataset_width) < max_size:
|
|
49
|
+
return dataset_height, dataset_width
|
|
50
|
+
|
|
51
|
+
ratio = dataset_height / dataset_width
|
|
52
|
+
if ratio > 1:
|
|
53
|
+
height = max_size
|
|
54
|
+
width = math.ceil(height / ratio)
|
|
55
|
+
else:
|
|
56
|
+
width = max_size
|
|
57
|
+
height = math.ceil(width * ratio)
|
|
58
|
+
|
|
59
|
+
return height, width
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _missing_size(w: Optional[int] = None, h: Optional[int] = None):
|
|
63
|
+
"""Check if one and only one size (width, height) is valid."""
|
|
64
|
+
iterator = iter([w, h])
|
|
65
|
+
return any(iterator) and not any(iterator)
|
|
66
|
+
|
|
67
|
+
|
|
46
68
|
# Ref: https://stackoverflow.com/posts/73905572
|
|
47
69
|
def _weighted_quantiles(
|
|
48
70
|
values: NDArray[numpy.floating],
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|