Efficient Choice of Download
Is your feature request related to a problem? Please describe.
When generating maps for a specific tile or range of tiles, the download size should be somewhat optimized. For example, when running python -m wahoomc cli -xy 75/96 it will identify the following involved countries:
INFO:# Determine involved/border countries
INFO:+ Involved country: us
INFO:+ Involved country: us_connecticut
INFO:+ Involved country: us_new-jersey
INFO:+ Involved country: us_new-york
This will result in a much larger download than ideal.
Describe the solution you'd like
Either only download the subregions: us_connecticut, us_new-jersey, us_new-york or allow a specified country when selecting an -xy location. For example python -m wahoomc cli -xy 75/96 -co us_connecticut,us_new-jersey,us_new-york
Hi @hdevine825, thanks for your ehancement-request!
I thought about this as well during implementation of the -xy and -nbc arguments.
I came up with the conclusions that when running -xy mode:
- most of the time only one country is relevant (unless your hometown is at the border to another country)
- it is straight-forward to generate the whole tile instead of only parts of it
- one would have a non-equal result of the map creation when not using raw country-map files of all countries because on the rest of the tile, land/water as well as elevation, POIs etc. would be rendered independent of the raw map-files
From your post I understand that the three subregions are correct and us not needed in your opinion.
To clarify your request more:
- Are some of the the downloaded files identical? I.e. filesize?
- Are the involved countries - in general - correct for the tile you are using wahooMapsCreator for?
Thanks!
To clarify the issue I am concerned with is only around download size. I saw what it was attempting to download and didn't finish running. I can test later on a machine with more HDD space available and see what ultimately is downloaded.
- most of the time only one country is relevant (unless your hometown is at the border to another country)
It appears that it will try to download the full country and a subregion (the us_... countries in this case) that duplicates some of the country level data.
- Are some of the the downloaded files identical? I.e. filesize?
As noted above some will be duplicated.
The two normal options (and one special case) for downloading that would give the data needed:
- Downloading the full United States is 9.9 GB or
- Downloading New York at 433 MB plus New Jersey at 140 MB plus Connecticut at 195 MB for a total of 768 MB or
- There is a "special sub-region" of US Northeast (1.5 GB) that also covers the needed tile, but I don't think that is a very common case.
- Are the involved countries - in general - correct for the tile you are using wahooMapsCreator for?
Yes. They are all relevant to the tile requested. However, the subregions duplicate the full United States data.
@treee111 have a look here: https://github.com/Ebe66/Windows-Wahoo-Map-Creator-Osmosis/blob/ff8f7f2b4df93d2ce5401b4598ac519740ff8fa5/wahoo-map-creator-osmosis.py#L173 I switched a long time ago from looking for the largest region first to smaller regions (hence us -> us_connecticut) to looking for smaller regions to bigger ones which does NOT download the whole us.
The code should almost be a drop in replacement.
@hdevine825 don't know if you are still interested, but my pull request https://github.com/treee111/wahooMapsCreator/pull/275 fixes this issue and does exactly what you want, just download and use the needed states instead of the whole containing country (US in this case).
thanks for your input @hdevine825 and coding @Ebe66, it's merged now and will be included with the next release!