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

[BREAKING] X/Y input via geofabrik .json + only support processing maps via geofabrik .json, delete wahoomc/resources/json/ files, constants and related coding #183

Merged
merged 16 commits into from
Mar 9, 2023

Conversation

treee111
Copy link
Owner

@treee111 treee111 commented Feb 19, 2023

This PR…

Considerations and implementations

Geofabrik (.py) class is now refactored into a interface and two implementing classes. Furthermore, the coding is cut into smaller functions a little bit. find_needed_countries is still a kind of mystery ;-)

Branch geofabrik-xy-unittests brings in unittests for geofabrik tiles to compare static vs. geofabrik processing and can be used also in the future.

The size of generated maps for X/Y coordinates should remain exactly the same as before. The size of generated maps for countries should roughly be the same as before (germany 604MB vs 607MB).

How to test

  1. create maps as usuall

Pull Request Checklist

lines 156-167 + 370-382 in geofabrik might not be needed / to be discussed
@treee111 treee111 changed the base branch from develop to release-v4.0.0 February 19, 2023 20:53
@treee111 treee111 force-pushed the geofabrik-xy branch 3 times, most recently from 59abfac to ff4a8ff Compare February 19, 2023 22:48
- reduce methods in geofabrik.py by using GeofabrikJson Ckass
- add geometry to geofabrik_overview dict + getter
- calc. all x/y tiles in one run - identical to country
@treee111 treee111 changed the title [FEAT] Use geofabrik .json for X/Y input, delete wahoomc/resources/json and only use geofabrik .json for constants [BREAKING] Use geofabrik .json for X/Y input, only support processing maps via geofabrik .json, delete wahoomc/resources/json/ files, constans and related coding Feb 22, 2023
@treee111 treee111 marked this pull request as ready for review February 22, 2023 10:12
@treee111 treee111 changed the title [BREAKING] Use geofabrik .json for X/Y input, only support processing maps via geofabrik .json, delete wahoomc/resources/json/ files, constans and related coding [BREAKING] X/Y input via geofabrik .json + only support processing maps via geofabrik .json, delete wahoomc/resources/json/ files, constans and related coding Feb 22, 2023
@treee111 treee111 changed the title [BREAKING] X/Y input via geofabrik .json + only support processing maps via geofabrik .json, delete wahoomc/resources/json/ files, constans and related coding [BREAKING] X/Y input via geofabrik .json + only support processing maps via geofabrik .json, delete wahoomc/resources/json/ files, constants and related coding Mar 8, 2023
@treee111 treee111 added the enhancement New feature or request label Mar 8, 2023
@treee111 treee111 merged commit 0d62840 into release-v4.0.0 Mar 9, 2023
@treee111 treee111 deleted the geofabrik-xy branch March 9, 2023 05:14
treee111 added a commit that referenced this pull request May 5, 2023
…ps via geofabrik .json, delete `wahoomc/resources/json/` files, constants and related coding (#183)

* only read geofabrik file once + make "global" variable

* x/y coordinates working solution

lines 156-167 + 370-382 in geofabrik might not be needed / to be discussed

* unittest

* translate to and set geofabrik id_no if found

* reduce complexity

- reduce methods in geofabrik.py by using GeofabrikJson Ckass
- add geometry to geofabrik_overview dict + getter

* mode in Geofabrik class, get unittests to work again

- calc. all x/y tiles in one run - identical to country

* Geofabrik as interface and two classes

* cut geofabrik.py into functions, detailled unittests

* pylint and vulture findings + delete one dir more

* delete existing .json files implementation + unittests for retrieving tiles

some unittests did make sense to do them via geofabrik

* remove geofabrik_tiles input argument

for CLI and UI

* clean up launch configuration, comments

* PR review findings

* files of unittest run on macOS for malta 2. tile (geofabrik)

BREAKING CHANGE:
Processing is now only based on Geofabrik .json file which is downloaded both for country and X/Y input. The static country .json files and the whole implementation has been removed.
`-gt` input argument was also removed because there is only one processing method implemented.
Input should now be in Geofabrik style. The hardcoded translation to geofabrik countries has been removed.
The size of generated maps for X/Y coordinates should remain exactly the same as before. The size of generated maps for countries should roughly be the same as before.
alfh pushed a commit to alfh/wahooMapsCreator that referenced this pull request Nov 4, 2023
…ps via geofabrik .json, delete `wahoomc/resources/json/` files, constants and related coding (treee111#183)

* only read geofabrik file once + make "global" variable

* x/y coordinates working solution

lines 156-167 + 370-382 in geofabrik might not be needed / to be discussed

* unittest

* translate to and set geofabrik id_no if found

* reduce complexity

- reduce methods in geofabrik.py by using GeofabrikJson Ckass
- add geometry to geofabrik_overview dict + getter

* mode in Geofabrik class, get unittests to work again

- calc. all x/y tiles in one run - identical to country

* Geofabrik as interface and two classes

* cut geofabrik.py into functions, detailled unittests

* pylint and vulture findings + delete one dir more

* delete existing .json files implementation + unittests for retrieving tiles

some unittests did make sense to do them via geofabrik

* remove geofabrik_tiles input argument

for CLI and UI

* clean up launch configuration, comments

* PR review findings

* files of unittest run on macOS for malta 2. tile (geofabrik)

BREAKING CHANGE:
Processing is now only based on Geofabrik .json file which is downloaded both for country and X/Y input. The static country .json files and the whole implementation has been removed.
`-gt` input argument was also removed because there is only one processing method implemented.
Input should now be in Geofabrik style. The hardcoded translation to geofabrik countries has been removed.
The size of generated maps for X/Y coordinates should remain exactly the same as before. The size of generated maps for countries should roughly be the same as before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant