Comments (9)
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 npm test
, I'd be happy to have a look at any failing tests.
https://github.com/pelias/openstreetmap/blob/master/test/stream/category_mapper.js
Is there something that I am fundamentally misunderstanding of how category mapping should work?
What is your understanding? It needs to be configured prior to running the import and should work as illustrated in the tests
from openstreetmap.
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 npm test
-- they all passed, so whatever is happening here is not caught by them.
Is there any integration test we could run to determine whether a specific node is imported with correct category mapping?
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:
"openstreetmap": {
"download": [
{ "sourceURL": "http://download.geofabrik.de/north-america-latest.osm.pbf" }
],
"leveldbpath": "/tmp",
"datapath": "/data/openstreetmap",
"import": [{
"filename": "north-america-latest.osm.pbf"
}]
},
and here is the relevant entry from the docker-compose file:
openstreetmap:
image: pelias/openstreetmap:master
container_name: pelias_openstreetmap
user: "${DOCKER_USER}"
volumes:
- "./pelias.json:/code/pelias.json"
- "${DATA_DIR}:/data"
- "./blacklist/:/data/blacklist"
from openstreetmap.
Categories are not shown by default in the geojson response, are you specifying the categories
querystring param?
from openstreetmap.
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...
from openstreetmap.
@missinglink do you know whether I can make categories also show up in the results of the reverse
endpoint?
from openstreetmap.
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 categories=nightlife
or without the value such as above to just enable them in the output.
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.
from openstreetmap.
related pelias/api#1405
from openstreetmap.
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
from openstreetmap.
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!
from openstreetmap.
Related Issues (20)
- Cannot import filtered dataset HOT 2
- duplicate terms in name affecting scoring HOT 3
- An in-range update of pelias-config is breaking the build 🚨 HOT 2
- An in-range update of pelias-config is breaking the build 🚨 HOT 1
- importVenues option do not work HOT 6
- An in-range update of pelias-wof-admin-lookup is breaking the build 🚨 HOT 3
- An in-range update of pelias-wof-admin-lookup is breaking the build 🚨 HOT 2
- Remove broadcast antennas and other TV towers? HOT 2
- New venue_tags + additional names HOT 3
- "PeliasModelError: invalid regex test" during OSM extract import HOT 2
- Allow configuring whether disused/abandoned venues are removed HOT 1
- unable to locate sqlite folder HOT 2
- Support elasticsearch username / password HOT 5
- NPM install failing with Error: Missing required argument #1 HOT 2
- OSM records with 'constructor' tag result in invalid Pelias documents HOT 2
- Consider importing Brand alt names
- "Invalid regex" error about source=https://... tag HOT 2
- issue while executing npm start cmd HOT 1
- I run npm start in the import folder but it doesn't recognize my pelias.json file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openstreetmap.