-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mosaic bounds #302
Labels
bug
Something isn't working
Comments
from geowombat.backends.rasterio_ import get_file_bounds
files = ['./B12/B12_S2_SR_2020_Q01_south-0000000000-0000000000.tif', './B12/B12_S2_SR_2020_Q01_south-0000032768-0000000000.tif']
print(get_file_bounds(files,return_bounds=True,bounds_by='union'))
with gw.open(files, mosaic=True,overlap='max' ) as src:
print(src.gw.bounds)
|
Is this using |
Hi @mmann1123 I think is expected, no? The default is to use the intersection of the bounding boxes. Intersectionimport geowombat as gw
from geowombat.backends.rasterio_ import get_file_bounds
files = ['B11_S2_SR_2020_Q01_south-0000000000-0000000000.tif', 'B11_S2_SR_2020_Q01_south-0000032768-0000000000.tif']
print(get_file_bounds(files,return_bounds=True,bounds_by='union'))
with gw.open(files, mosaic=True, overlap='max') as src:
print(src.gw.bounds)
(34.24844987011358, -17.126380891738677, 35.91850781482018, -13.480837805724835)
(34.24844987011358, -16.424437328727684, 35.918417983291775, -13.480837805724835) Unionprint(get_file_bounds(files,return_bounds=True,bounds_by='union'))
with gw.open(files, mosaic=True, overlap='max', bounds_by='union') as src:
print(src.gw.bounds)
(34.24844987011358, -17.126380891738677, 35.91850781482018, -13.480837805724835)
(34.24844987011358, -17.126291060210267, 35.918417983291775, -13.480837805724835) |
hmm... for me bounds_by union would seems like a logical choice, but I guess I am typically using it to mosaic tiles for a a larger scene. Maybe we just need to note this in the tutorial? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I noticed that when making a mosaic of multiple images the bounds seems only to update to the total bounds of the first two images (i think):
only returned the mosaic of the first two images. This can be resolved by using
config.update
The text was updated successfully, but these errors were encountered: