interpolation icon indicating copy to clipboard operation
interpolation copied to clipboard

pbf2json to Pelias Interpolation. JSON invalid

Open jvelazquez90 opened this issue 5 years ago • 6 comments

Hello, Implement Pelias geocoder in a personal project where also with the help of ogr2osm transform an address shape file into an OSM layer. My doubt arises when creating address.db in Pelias Interpolation. I convert the osm.pbf file into a json format with pbf2json but when creating the base of addresses in sqlite I get json errors invalid. Some addresses can be searched with pelias and throws the results very well but I lose information. My question is what information does Pelias Inteporlation accept? pbf2json?

jvelazquez90 avatar Feb 27 '19 18:02 jvelazquez90

Yes, it is designed to take the output of pbf2json for the openstreetmap importer.

The documentation can be found here: https://github.com/pelias/interpolation/blob/master/readme.md#osm

Can you please paste some of the errors?

missinglink avatar Feb 27 '19 19:02 missinglink

Obviously I was doing wrong the execution command in the tags entered keys that did not exist.

jvelazquez90 avatar Mar 01 '19 15:03 jvelazquez90

Hello, now my problem is when I create the street.db file I get the following error: street has no valid names, check your 0sv file: this file does not exist in my directory only the polylines file.

jvelazquez90 avatar Mar 01 '19 19:03 jvelazquez90

The file extension .0sv is the one we've given to denote a polylines file. It's just a confusing error message.

I believe it's just a warning and not a fatal error? What it's warning you about is that one or more of the polylines in the file do not also have a street name (it requires BOTH a shape and a name) I wouldn't worry about it, it's possibly due to errors in the openstreetmap data, it's only a problem if you are getting thousands of them.

missinglink avatar Mar 05 '19 10:03 missinglink

Obviously it is a warning but the problem is that I am getting many of them. Transform a shape file to osm and generate the polyline, I do the same with the heights I transform a shape file to json of directions. When using Pelias Interpolation I generate the file street.db and when I want to generate the file addresses.db it is where I get the warning. If I start the Interpolation service and use it with Pelias I can search for addresses but I lose the vast majority of loaded addresses.

jvelazquez90 avatar Mar 11 '19 13:03 jvelazquez90

osm osm1

These are my 2 osm files generated for use with Pelias Interpolation: microcentro_street and microcentro_addresses. The 2 files were generated from the same shape.

jvelazquez90 avatar Mar 11 '19 13:03 jvelazquez90