You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2013-06-02 14:16:18

mmr
Member
Registered: 2010-07-30
Posts: 73
Website

Overpass API - Search for Relations

hello,

I am using the Overpass API to search for relations. See my XML code:

<osm-script>
  <query type="relation">
    <has-kv k="name" regv="Uckerm"/>
  </query>
  <print/>
</osm-script>

I am executing this script at http://www.overpass-api.de/query_form.html for testing. The result delivers a lot of informations I do not need at the first step e.g. I receive all the ways

...
<member role="outer" ref="195916561" type="way"/>
<member role="outer" ref="195738108" type="way"/>
<member role="outer" ref="90844182" type="way"/>
...

I am just interested to receive all the tag elements e.g.

<tag v="county" k="de:place"/>
<tag v="12073" k="de:regionalschluessel"/>
<tag v="Uckermark" k="name"/>

Can I pass some parameter to my query to reduce the amount of data which I can receive?

Regards

Michael

Offline

#2 2013-06-03 20:47:49

drolbr
Member
Registered: 2013-05-12
Posts: 59

Re: Overpass API - Search for Relations

Can I pass some parameter to my query to reduce the amount of data which I can receive?

You can omit the tags and print only the members, but unfortunately not vice versa.

You can try to use areas instead: Geographical relations alwas also exist as areas, and areas only carry tags, no member information.

Offline

#3 2013-06-04 16:17:38

stephan75
Member
Registered: 2008-05-28
Posts: 2,918

Re: Overpass API - Search for Relations

drolbr wrote:

Can I pass some parameter to my query to reduce the amount of data which I can receive?

You can omit the tags and print only the members, but unfortunately not vice versa.

You can try to use areas instead: Geographical relations alwas also exist as areas, and areas only carry tags, no member information.


If this is correct, we need a hint about this in the OSM wiki about http://wiki.openstreetmap.org/wiki/Overpass_API or any suitable sub page ... and on help.osm.org !

Offline

#4 2016-04-06 15:49:40

PhL38Fr
New Member
Registered: 2016-04-06
Posts: 1

Re: Overpass API - Search for Relations

Hi!
On same overpass-api subject (don't know if this is the right place for this question, I got there searching for "overpass-api"): it looks like the openstreemap.org website "?" function (object query) is regularly showing up an error message during my mouse-directed queries. The message looks like (sorry, part of it in french!)

Objets à proximité
Erreur en contactant https://overpass-api.de/api/interpreter : No Transport


Objets englobants
Erreur en contactant https://overpass-api.de/api/interpreter : No Transport

Do you have any idea why this could be?
Best regards,
PhL

Offline

Board footer

Powered by FluxBB