Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Nominatim Geocoder Locator filter - add countryCodes configuration option #60719

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

uprel
Copy link
Contributor

@uprel uprel commented Feb 21, 2025

This PR adds Configuration option to Nominatim Geocoder Locator filter for filtering results to one or more countries. (Two letter country codes, comma separated). Configuration value is optional, if left blank it will work as now.

Nominatim Geocoder already supports countryCodes parameter so only GUI part and linking setting to request was missing.
Test also supports this parameter so no new tests are created for this.
This change does not effect Batch Nominatim Geocoder processing tool.

Please backport to 3.40
Needs documentation

image
image

@github-actions github-actions bot added this to the 3.44.0 milestone Feb 21, 2025
@uprel
Copy link
Contributor Author

uprel commented Feb 21, 2025

Backport also to 3.42

Copy link

github-actions bot commented Feb 21, 2025

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 138546e)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 138546e)


// Load existing settings
QgsSettings settings;
countryCodesEdit->setText( settings.value( "locator_filters/nominatim_geocoder/country_codes", "", QgsSettings::App ).toString() );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use new settings tree API here and in other places?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know, I used the code from other Locator filters as example. Like this


I can check this, but not sure what will be better. Is approach I used deprecated?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants