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

Complete overhaul of country grid generation algorithm #1

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

lonvia
Copy link
Member

@lonvia lonvia commented Aug 2, 2024

Extended the SQL, so that most of the simplification necessary to get to a country table of a managable size can be done with some simple SQL. This makes use of the new ST_CoverageSimplify function from PostGIS. IT allows to simplify boundaries between countries without loosing coverage. Needs PostGIS 3.4, which is available in Ubuntu 24.04.

The data file on nominatim.org already has a new country grid generated with this algorithm. With the simplification the file size has shrunk from 41MB to 15MB, and the table size from 49MB to 27MB. All this despite the fact that accuracy of boundaries has improved quite a lot in the last 5 years in OSM.

For more information see also the README.

See README for new algorithm.
@lonvia lonvia merged commit c094b59 into master Aug 2, 2024
@lonvia lonvia deleted the overhaul-country-grid-computation branch August 2, 2024 12:29
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

Successfully merging this pull request may close these issues.

1 participant