Reputation: 143
I have a query for Overpass API.
mybbox = '8.9281,48.4379,9.1794,48.5827'
overpass_url = "http://overpass-api.de/api/interpreter"
overpass_query = """
[out:json];
// gather results
(
// query part for: "highway=*"
node["highway"]("""+mybbox+""");
way["highway"]("""+mybbox+""");
relation["highway"]("""+mybbox+""");
);
// print results
out center;
>;
out skel qt;
"""
I save result to a .json file. And the type is way. But I want to define a road width and export road data as polygon. For example if highway == motorway the road must be a polygon type and its width must be 4 meters. Is it possible?
Upvotes: 2
Views: 1598
Reputation: 564
As the others say, it is not possible to get the road width via Overpass API; you have to calculate it yourself. The API only serves to look up various objects of interest and to download them. You may filter the results using a tag, e.g. [width]
or similar: there are alternatives like est_width
or width_street
. To find out how frequently each tag is used and which variant fits your needs, see this page with stats on usage (use the search box on right).
Upvotes: 3