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

option to keep .hgt files #26

Open
scottstanie opened this issue May 20, 2018 · 2 comments
Open

option to keep .hgt files #26

scottstanie opened this issue May 20, 2018 · 2 comments

Comments

@scottstanie
Copy link

Hi I really like this project and how usable it is.
I have a use case right now where I want to keep the .hgt files from a polygon rather than turn them into the geotiff files. I see in the makefile that it cleans them up the files in spool with a rm after converting and storing in the cache directory.
Is there already an to stop this removal, or would I need to just edit the makefile?

@alexamici
Copy link
Member

@scottstanie looks like this is make removing intermediate files and I didn't find a simple way to tell it not to do it without changing the code.

Your best bet is to identify the cache folder with eio info and modifying the Makefile there to add:

.SECONDARY:

See: https://stackoverflow.com/questions/9638275/how-to-undo-intermediate-file-deletion

@svenKautlenbach
Copy link

svenKautlenbach commented Dec 4, 2020

I'd suggest one of the ways to do so as I did in my fork for keeping .ftw files - https://github.com/svenKautlenbach/elevation/blob/master/elevation/datasource.mk
One should modify spool target

spool/%$(TILE_EXT): spool/%$(COMPRESSED_PRE_EXT).zip
	unzip -qq -d spool $< $*$(TILE_EXT) $*$(FTW_EXT) $(STDERR_SWITCH) || touch $@
	mv spool/$*$(FTW_EXT) cache/

Optionally there could be also additional $*$(HGT_EXT)
Please be mind that one should add those types of files to be deleted too in clean target

Would @alexamici accept these modifications if I'd make a proper pull request?

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

No branches or pull requests

3 participants