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

feat: 933 - added osm location fields (countryCode, osmKey, osmValue) #934

Merged
merged 3 commits into from
May 22, 2024

Conversation

monsieurtanuki
Copy link
Contributor

What

  • Added osm location fields countryCode, osmKey and osmValue
  • Typical use cases for Smoothie:
    • displaying the flag of the country for prices
    • displaying an icon related to a location type (like, if it's a shop)

Fixes bug(s)

Impacted files

  • api_get_product_test.dart: unrelated minor test fix
  • api_get_robotoff_test.dart: unrelated minor test fix
  • api_matched_product_v1_test.dart: unrelated minor test fix
  • location.dart: added fields countryCode, osmKey and osmValue
  • location.g.dart: generated

Impacted files:
* `api_get_product_test.dart`: unrelated minor test fix
* `api_get_robotoff_test.dart`: unrelated minor test fix
* `api_matched_product_v1_test.dart`: unrelated minor test fix
* `location.dart`: added fields `countryCode`, `osmKey` and `osmValue`
* `location.g.dart`: generated
@monsieurtanuki monsieurtanuki requested a review from a team as a code owner May 22, 2024 07:04
Copy link
Member

@teolemon teolemon left a comment

Choose a reason for hiding this comment

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

Unrelated: have you spotted the blocklist of osm keys (to return supermarkets, and not streets ?)

@monsieurtanuki monsieurtanuki merged commit f653f6a into openfoodfacts:master May 22, 2024
2 of 3 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon for your review!

Unrelated: have you spotted the blocklist of osm keys (to return supermarkets, and not streets ?)

You mean, as a filter? It looks like it's not supported by https://photon.komoot.io/, but we may filter the results returned by photon.
That said, eventually we may merge the results of several providers like photon and Nominatim. And then in Nominatim I think we can filter by key/value.

@monsieurtanuki
Copy link
Contributor Author

@teolemon Actually it's possible to filter by osm key: something like osm_tag=shop that I'm going to introduce in Smoothie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Prices/Location: add countrycode field.
2 participants