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

Question: is there an API to query the filters used by and instance of addok ? #638

Open
pyrog opened this issue Aug 14, 2020 · 4 comments
Assignees

Comments

@pyrog
Copy link

pyrog commented Aug 14, 2020

The query https://demo.addok.xyz/search/?q=gare à annecy return features with properties poi=bus_stop, poi=station or poi=platform.

https://demo.addok.xyz/search/?q=défibrillateur à marseille return features with property poi=defibrillator.

I guess that poi is a filter of the demo.addok.xyz instance.

Questions

  • How to get the list of all filters ?
  • How to get the list of all values for this filter ?
  • How to filter the search to get only poi=station ?
@pyrog
Copy link
Author

pyrog commented Aug 14, 2020

How to filter the search to get only poi=station ?

According #608 (comment) we could search for poi only: https://demo.addok.xyz/search/?q=annecy&type=poi
Or filter the search to return city only: https://demo.addok.xyz/search/?q=annecy&type=city

{
  "attribution": "BANO+OSM POI", 
  "features": [
    {
      "geometry": {
        "coordinates": [
          6.128885, 
          45.899235
        ], 
        "type": "Point"
      }, 
      "properties": {
        "adm_weight": 4, 
        "city": "Annecy", 
        "departement": "Haute-Savoie", 
        "id": "74010", 
        "importance": 0.756, 
        "label": "Annecy", 
        "name": "Annecy", 
        "population": 126924, 
        "postcode": "74000", 
        "region": "Auvergne-Rh\u00f4ne-Alpes", 
        "score": 0.9778181818, 
        "type": "city"
      }, 
      "type": "Feature"
    }
  ], 
  "filters": {
    "type": "city"
  }, 
  "licence": "ODbL 1.0", 
  "limit": 5, 
  "query": "annecy", 
  "type": "FeatureCollection", 
  "version": "draft"
}

Note: the query return the list of filters used (here type=city)

But https://demo.addok.xyz/search/?q=annecy&type=poi&poi=bus_stop don't work
poi is not a filter for this instance.

@cquest
Copy link
Member

cquest commented Aug 14, 2020

POI data is generated by https://github.com/osm-fr/osmpoi4addok

It is then fed to addok in the standard way.

The types of POI taken into account are in the CVS file: https://github.com/osm-fr/osmpoi4addok/blob/master/def.csv

A filter exists on the type field, but none on the poi field itself. It could be added easily.

@cquest
Copy link
Member

cquest commented Aug 14, 2020

I've just added a filter on the poi field on demo.addok.xyz, but you still have to provide some text in the query q field...

@pyrog
Copy link
Author

pyrog commented Aug 14, 2020

@cquest cquest self-assigned this Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants