This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

[closed] overpass api

0

Yes, I am using python. I wrote use this code below and it is working fine for me.

import overpy
import json
from copy import deepcopy
import haversine as hs
import math


api = overpy.Overpass()
#generate an intended map boundary for a given coordinates

result = api.query (f'way(around:100,49.8974309,-97.2033944 )["highway"="footway"];(._;>;);out geom;')

where,
radius=100m
latitude =49.8974309
longitude=-97.2033944

But now, i do not want to use radius again, rather i want to use four coordinates like a rectangular bounding box to query osm for highway (e.g. footway in particular, in the specified area) using python.

asked 17 Feb '22, 16:08

Segunlakata's gravatar image

Segunlakata
16131316
accept rate: 0%

closed 17 Feb '22, 17:38

TZorn's gravatar image

TZorn
12.3k764225

The question has been closed for the following reason “Duplicate Question of https://help.openstreetmap.org/questions/83509/overpass-query" by TZorn 17 Feb ‘22, 17:38

Source code available on GitHub .