NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I would like to get the way information for https://www.openstreetmap.org/way/300589944 and another way with the python osmapi library.

This is my source code so far (3600148838 is the area id for "United States"):

import overpy
import osmapi
api = osmapi.OsmApi(api="https://api.openstreetmap.org/api", username = "me", password = "*")

api = overpy.Overpass()
result = api.query("""
    area(3600148838)->.searchArea;
    (
      way["addr"](area.searchArea);
    );
    out body;
    """)

for way in result.ways:
    print(api.WayGet(way))

I'm getting (overpy.Way id=300589944 nodes=[3046663136, 3046663138, 3046663129, 3046663123, 3046663136]) in Python. How can I extract just the way from the overpy.Way class?

asked 12 Feb '19, 03:31

norcross's gravatar image

norcross
26335
accept rate: 0%

No responses so far?

(13 Feb '19, 17:19) norcross

Impatient much?

(13 Feb '19, 17:34) SomeoneElse ♦
1

You might get more responses if you provide more detail about what you're trying to do. Exactly what "way information" are you looking to get and what will you be doing with the result? How does an address search of the entire US relate to your first sentence about retrieving information about a specific way? Why are you connecting to the OSM editing API and then querying the Overpass API?

(13 Feb '19, 17:41) alester
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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:

×290
×78
×9
×4

question asked: 12 Feb '19, 03:31

question was seen: 1,358 times

last updated: 13 Feb '19, 17:41

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum