Skip to content

Add Geocode Places tool (bulk place geocoding)#936

Draft
brianmcaudill wants to merge 1 commit into
gramps-project:maintenance/gramps60from
brianmcaudill:placegeocoder60
Draft

Add Geocode Places tool (bulk place geocoding)#936
brianmcaudill wants to merge 1 commit into
gramps-project:maintenance/gramps60from
brianmcaudill:placegeocoder60

Conversation

@brianmcaudill

Copy link
Copy Markdown
Contributor

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 standard ToolManagedWindowBatch + MenuToolOptions pattern (modeled on AttachSourceTool); reviewer GUI run welcomed before merge.

Notes

Targets gramps_target_version="6.0" / maintenance/gramps60; can port to 6.1.

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.
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