-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Category does not get mapped as defined in category_map.js #572
Comments
Can you please confirm this is a bug in the code rather than an issue with how your environment is configured? There are unit tests which you can edit and run using the command https://github.com/pelias/openstreetmap/blob/master/test/stream/category_mapper.js
What is your understanding? It needs to be configured prior to running the import and should work as illustrated in the tests |
Hi @missinglink , thank you so much for your quick reply and for helping with this. I installed Pelias using Docker and did not modify any of its settings -- do you think I need to make changes to the defaults to make category mapping work? I ran the unit tests by attaching to the pelias/openstreetmap docker container and running When you say "it needs to be configured prior to running the import", do you mean I need to change any of the configurations or should they work as defined in https://github.com/pelias/openstreetmap/blob/master/test/stream/category_mapper.js (which they don't seem to do in an integrated system / outside of the unit tests) For reference, here are the OSM settings Pelias shipped with for the north-america region:
and here is the relevant entry from the docker-compose file:
|
ohh I had no idea. Sorry for filing this as a bug -- it now works. Is this in the docs somewhere? I thought I had read it all... |
@missinglink do you know whether I can make categories also show up in the results of the |
The categories feature was never officially released despite being in the codebase for like 5+ years. The categories param can be used as a filter such as What I was referring to earlier was that it's possible to customize the category map by telling docker to use a local copy of the mapping script through what's called a bind mapping in docker. That allows advanced users to create their own custom categories, but like I said it's more advanced. |
related pelias/api#1405 |
I don't think it's enabled for reverse and I don't recall why, maybe it should be, I might have mentioned it in the issue above |
Got it, thank you very much. It would be very useful to have this in reverse (in order to determine what category of places is close to a lat/lng). Closing this now, and might comment on the related issue. Thanks for all your help! |
Describe the bug
Categories sometimes do not get assigned as defined in category_map.js
Here are two examples:
amenity:restaurant
should be mapped to'food','retail','nightlife'
; however, for at least one example this does not appear to happen: no category is assigned to https://www.openstreetmap.org/way/840223953shop:bakery
should be mapped to'food'
. This does not happen for node https://www.openstreetmap.org/node/7851477778Steps to Reproduce
'food','retail','nightlife'
categories for this way. The Pelias implementation at https://pelias.github.io/compare/#/v1/search?size=1&text=SmokeHouse+Tailgate+Grill%2C+Mamaroneck+%2C+NY does not contain these categories either.'food'
category for this nodeExpected behavior
The correct categories should be mapped to these addresses.
Environment (please complete the following information):
Additional context
Is there something that I am fundamentally misunderstanding of how category mapping should work?
Thank you very much for your help!
The text was updated successfully, but these errors were encountered: