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

Hello I try to filter the power line out of openstreetmap. The problem is i can't open the whole data and filter them later because the data are to big. So I'm looking for a programm what filters the data I need. I already tried a programm from the University of Stuttgard. With that programm you filter your data out of the osmosis database via the URL: http://www.faveve.uni-stuttgart.de/~troll/OSM/osm-poll.cgi?format=gpx&filename=baenke&query=[amenity=bench][bbox=11.28,49.57,11.4,49.68] This is an example for all bench there are in a small area around the city semmelsdorf. The example worked perfectly, but when I tried to filter the powerline it did'nt work anymore. Is there any other chance to filter the data of all power lines of a whole country? Thanks for the help. Gesa

asked 21 Nov '12, 14:18

member100's gravatar image

member100
31113
accept rate: 0%


Yes, that is possible. Try

(way[power=line](50.6,7.0,50.8,7.3);rel[power=line](50.6,7.0,50.8,7.3););(._;>;);out;

on http://overpass-api.de/query_form.html

Please note that "50.6,7.0,50.8,7.3" is the bounding box in order "min_lat,min_lon,max_lat,max_lon" (instead of "lon, lat") and that the bounding bix is repeated twice. If you want such a big bounding box that the query takes more than 3 minutes, you need to preceed "[timeout:900]", where 900 is the number of seconds maximum runtime:

[timeout:900];(way[power=line](50.6,7.0,50.8,7.3);rel[power=line](50.6,7.0,50.8,7.3););(._;>;);out;

Longer times are also possible. If the program you want to process the data with afterwards complains about missing version information, please change "out" to "out meta" (this adds the needed extra data but is significantly slower):

(way[power=line](50.6,7.0,50.8,7.3);rel[power=line](50.6,7.0,50.8,7.3););(._;>;);out meta;

To finally convert to GPX, please have a look a this forum thread.

permanent link

answered 21 Nov '12, 14:53

Roland%20Olbricht's gravatar image

Roland Olbricht
6.7k36489
accept rate: 36%

edited 21 Nov '12, 15:02

Hello Roland, thanks for the fast answer. But I tried your programm and when I tried (waypower=line;relpower=line;);(.;>;);out meta; to get the whole data of germany. But my data file is just 341 Bytes big and doesn't have the information ein need. When I use a smaller area like: (waypower=line;relpower=line;);(.;>;);out meta; the programm worked fine. Is there a limit, thats why it doesn't work with the first coordinates? Thanks for your help

(26 Nov '12, 12:44) member100
1

Yes, there is a limit. If a query comes without speical mark, it is terminated after 3 minutes. Please read http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#timeout

You can start your query with "[timeout:900];" or a higher value to let the query longer running.

(26 Nov '12, 17:37) Roland Olbricht

Have a look at the program called Osmfilter.

You can download an OSM raw data country extract e.g. from geofabrik.de and (if neccesary) convert it with osmconvert.

permanent link

answered 21 Nov '12, 17:51

stephan75's gravatar image

stephan75
12.6k556210
accept rate: 6%

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:

×66

question asked: 21 Nov '12, 14:18

question was seen: 11,862 times

last updated: 26 Nov '12, 17:37

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