Hello Everyone, I am really new to OSM and I am trying to extract all public transportation Data. I am currently using a JOSM Filter that basically gives me what I want.

(child(type:relation (route= bus or route=trolleybus or route=ferry or route=detour or route=train or route=tram or route=railway or route=subway or route=light_rail or route=tracks)))

I use this filter by inverting the results.

By copying my filtered content into a new layer and then saving it to *.osm.pbf I can even use the filtered content somewhere else. Their are three problems with that approach because of the Rendering Aspect of JOSM this approach is really slow, consumes a lot of resources and I can’t really automate it.
I tried to “translate” my JOSM Filter to use it in Osmosis are Osmfilter, but I couldn’t get it right. Does anyone have a solution for my Problem with a better performance and a way to automate it with a script?I am also flexibel with the tools, I used Osmfilter and Osmosis because it seemed that they were the go to Tools for the task at hand.

Thanks in advance.

asked 15 Oct, 09:11

ale_fhw's gravatar image

ale_fhw
262
accept rate: 0%


If anyone is curious how i solved my problem. I just queried the data already "filtered" from Overpass-API.

The Query I used was:

  http://overpass-api.de/api/interpreter?data=[out:xml];
  (rel(55.78,10.58,51.89,12.73) 
  ["route"~"bus|light_rail|trolleybus|ferry|detour|train|tram|railway|subway|tracks"];); 
  out meta;
  >; 
  out skel meta;

If anyone is looking at a similar Problem I strongly recommend the Overpass API since the QL is really powerful in contrast to the rather elementary possibilities of osmfilter.

permanent link

answered 22 Oct, 08:20

ale_fhw's gravatar image

ale_fhw
262
accept rate: 0%

edited 22 Oct, 08:26

Your answer
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:

×556
×233
×74
×50
×47

question asked: 15 Oct, 09:11

question was seen: 74 times

last updated: 22 Oct, 08:26

powered by OSQA