Skip to content
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

force-mosaic only supports tif #222

Open
maxfreu opened this issue Sep 15, 2022 · 4 comments
Open

force-mosaic only supports tif #222

maxfreu opened this issue Sep 15, 2022 · 4 comments

Comments

@maxfreu
Copy link

maxfreu commented Sep 15, 2022

Hi! The .tif file extensions is hardcoded in force-mosaic. Therefore it fails for my cog files. I think the easiest fix would be to give another argument for the extension.

@davidfrantz
Copy link
Owner

or just use tif extension for your COG, because essentially, it is a tif.

@maxfreu
Copy link
Author

maxfreu commented Sep 15, 2022

True. But then it would be cool to have some hint that prints with -h :)

@maxfreu
Copy link
Author

maxfreu commented Sep 15, 2022

Oh by the way, there is a way to speed up the process significally, especially for cubes with lots of small files:
Use
find -L "$ROUT" \( -name '*.dat' -o -name '*.tif' \) | xargs basename -a | sort | uniq > $PRODUCTS
instead of
find -L "$ROUT" \( -name '*.dat' -o -name '*.tif' \) -exec basename {} \; | sort | uniq > $PRODUCTS
The problem is that -exec invokes basename for each file, which is slow. xargs comes pre-packaged with Ubuntu, so should work for all users.

@davidfrantz
Copy link
Owner

Thanks, that makes a lot of sense. Can you pull request this?

Best,
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants