Closed stefanocudini closed 5 years ago
or it would more sense to create a new importer for the shp format?
here a prototype that convert SHP/CSV file in one .polyline: https://github.com/DigitalCommonsLab/pelias-docker-trentino-data/blob/master/strade_trento/csv2polyline/index.js
I think it works but I can't understand how I can import my .polyline file into pelias .. without using openstreetmap data road network
Hi @stefanocudini, I think it would be easiest if you imported directly from shapefile
to elasticsearch
, you can probably bypass the polylines format entirely.
have a look at: https://github.com/geopipes/shapefile-stream
The process each of the importers follow is the same:
Thank you Peter for your support,
I'm spending a lot of time studying Pelias and doing tests on custom data, some things are not clear to me about the processes of importing different data sources.
I need to interpolate my custom civic address data(point) with some custom shapefiles not osm data. What I understood was that interpolation occur before importing data into the elastichserach database. For this reason I am trying to fill the /data directory with data in the correct file formats and then execute the pelias import commands:
pelias prepare all
pelias import all
We import the street centroids into Pelias using the polylines importer, so you can search for them like any other place and they are returned from the street
layer.
The interpolation database is completely separate from the elasticsearch database and runs completely independently. One thing which might be confusing is that the interpolation engine imports a lot of the same data as we have in elasticsearch.
The interpolation engine needs a lat/lon as well as a house number and a street name to find the correct result (4 inputs).
The house number
and street name
are simple, because the user typed them in, but the lat/lon is also required in order to disambiguate which street with that name the user is asking for (because there are many Main Streets
in the world.
So what we do is perform a normal search in elasticsearch, and we detect the following condition:
housenumber
+ street
street
layer (not the address
layer like they asked for)In this case we generate requests for the interpolation engine which use the lat/lon value of the streets returned by elasticsearch.
This doc might be useful: https://github.com/pelias/pelias/wiki/Interpolation:-design-doc
I'm trying to import my forad network that I have only in shp(Ersi shapefile) format
unfortunately I realized that converting the shp format is quite complex because not exists a tools that do this conversion directly but you need intermediate steps (which can cause errors)
.shp -> .osm -> .pbf
the shp is very widespread format and it would be interesting to have the support in pelias, maybe there is already some script that I didn't find?
otherwise I thought I would fork this repo and add the necessary to do this.
many thanks, Stefano