I download .shp
and .dbf
files for roads, extract it and save to database. I display points with the same name as the street on my own Google Map.
This is how it looks like:
I found that not each point across the road have the same "osmId"
, so how to get all coordinates across all road. This is how it looks like when I put osmId on markers, there are different (the first row is "osmId"
):
When I extract this data i had field called "name"
- it means name of road. But this name is not unique, there are several roads with the same name. This is an example of data extracted from .shp and .dbf file:
{
"geometry" : {
"coordinates" : [
[
20.0343585,
50.0806794
],
[
20.0345215,
50.0807741
],
[
20.0346159,
50.0808264
]
],
"type" : "LineString"
},
"type" : "Feature",
"properties" : {
"osm_id" : "2954554",
"code" : "5122",
"fclass" : "residential",
"name" : "Ignacego MoĊcickiego",
"ref" : null,
"oneway" : "B",
"maxspeed" : 40,
"layer" : 0,
"bridge" : "F",
"tunnel" : "F"
}
}
There is no some kind of unique id field that can tell me that this data is connected with also other parts of data and together they created a unique road.
So how to get all points across the specific road? Is it possible? I extract data from .shp
and .dbf
files.
.shp
,.shx
, and.dbf
suffix files and should always include a.prj
. If you don't get all the files available with the same prefix, you are corrupting the dataset. – Vince Sep 19 '20 at 12:45