Why not ask your question on the new OpenStreetMap Community Forum?

Hello Guys

I'm Newcomer Here. Recently I Have A Project Want To Use OSM With Overpass API. My Requirements Are:

  1. Retrieve All Streets (Highway) In A Specified Area. I Know This Is Possible By Kinds Of Ways. For Example Set Query Type As Boundary And Boundary Type = Admin Then Admin Level = N Or By Area With Area ID (Relation ID).

  2. I Need To Get A Lists Of All Highways With Way Type (For Example Motorway / Trunk / Primary / Secondary / Tertiar) And Availability Of Driving And Direction (For Example Is That Way A West-Eastward Way <horizontal> Or North-Southward Way <vertical>. My Question Is That Possible To List All Roads With All Required Values?

  3. I Also Need All Corresponding Nodes (Longitude / Latitude) In A Road (Highway). Does Overpass API Support To Get Nodes Relation Of A Highway? If I Need Only A Few Nodes In A Way Can I Set Parameter (Meter) As Wanted Distance Between Nodes (For Example Every N Meter For A Node)?

asked 12 Oct '20, 05:29

Bright's gravatar image

accept rate: 0%

It sounds like you have half of it. Have you written any code a a basis?

(12 Oct '20, 16:25) DaveF

Amended VIPINDAS K's answer so it runs. Pivot converts an area into an element. ^ and $ are part of regular expressions, defining the begining & ending of a string. In this example it searches for highways the are either 'trunk' or 'primary'. 'trunk_link' would not be returned,

out geom; 
.District out geom;

color: green;
fill-color: green;
text: name:en;
color: green;
fill-color: green;
text: name:en;
permanent link

answered 19 Oct '20, 13:27

DaveF's gravatar image

accept rate: 16%

Sample code:
// fetch area “Malappuram" to search in
// gather results
//query part for: “boundary=Malappuram”;
//we can add more tags
color: green;
fill-color: green;
text: name:en;
color: green;
fill-color: green;
text: name:en;
// print results
out body;
out skel qt;

wizard helps to create codes.
Qgis helps to make customized map.

permanent link

answered 19 Oct '20, 08:49

VIPINDAS%20K's gravatar image

accept rate: 0%

edited 19 Oct '20, 08:59

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 12 Oct '20, 05:29

question was seen: 1,643 times

last updated: 19 Oct '20, 13:27

powered by OSQA