Add Geocode Places tool (bulk place geocoding)#936
Draft
brianmcaudill wants to merge 1 commit into
Draft
Conversation
Geocode Places is a batch Tool that fills missing place coordinates by looking up each place name with OpenStreetMap Nominatim and writing the results in one undoable transaction. By default it keeps only town-level or finer matches, so vague names that resolve to a state or country centroid are skipped. It complements the existing interactive coordinate addons (Place Coordinate Gramplet, Place Cleanup) by doing the whole tree in one pass. Rate-limited to one request per second per Nominatim's usage policy; a dry-run option reports results without writing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft for review.
What it is
A batch Tool (Tools → Family Tree Processing → Geocode Places) that fills in missing place coordinates by looking each place name up with OpenStreetMap Nominatim, writing the results in one undoable transaction.
This complements the existing interactive coordinate addons (Place Coordinate Gramplet; Place Cleanup's GeoNames lookup) — it is the batch counterpart that does the whole tree in one pass. By default it keeps only town-level or finer matches, so vague names that resolve to a state/country centroid are skipped rather than dropping a misleading pin. A dry-run option reports results without writing.
Usage / policy
Rate-limited to one request/second per Nominatim's usage policy; intended for occasional personal use. An optional contact-email field is added to the request User-Agent.
Testing done
Verified on a real 478-place tree: the geocoding + town-or-better filter (
place_rank/addresstype) — e.g. Orlando, FL and Mobile, AL kept as cities; Florida (state) and United States (country) correctly skipped — and plugin registration as a Tool. Across the full tree: 271 town-or-better kept, 148 skipped as too coarse, 54 no-match, 5 errors of 478. Follows the standardToolManagedWindowBatch+MenuToolOptionspattern (modeled on AttachSourceTool); reviewer GUI run welcomed before merge.Notes
Targets
gramps_target_version="6.0"/maintenance/gramps60; can port to 6.1.