telluric
telluric copied to clipboard
Merge of rasters that don't share projection fails
it fails becasue of this line https://github.com/satellogic/telluric/blob/master/telluric/georaster.py#L223
the _prepare_other_raster returns None
Can't reproduce this with some sample data:
from rasterio.enums import Resampling
import telluric as tl
from telluric.constants import *
rs1 = tl.GeoRaster2.open("../tests/data/raster/overlap1.tif", lazy_load=False)
rs2 = tl.GeoRaster2.open("../tests/data/raster/overlap2.tif", lazy_load=False)
rs2_alt = (
rs2
.reproject(dst_crs=WGS84_CRS, resampling=Resampling.nearest)
.reproject(dst_crs=WEB_MERCATOR_CRS, resampling=Resampling.nearest)
)
rs2_4326 = (
rs2
.reproject(dst_crs=WGS84_CRS, resampling=Resampling.nearest)
)
from telluric.georaster import merge_all, merge_two
# Same result, no errors
merge_two(rs1, rs2)
merge_two(rs1, rs2_alt)
merge_two(rs1, rs2_4326)
@guydou can you please provide some more information?