0

I'm trying to extract various landmarks from the osm planet-latest pbf.

For testing purposes I'm currently trying to extract schools, but the command is taking way to long its already been 20 minutes. The following is my osmosis command on my Linux machine.

osmosis/bin/osmosis --rbf planet-latest.osm.pbf --nkv keyValueList="amenity.college" --wx ssxschools.osm

Can some one please tell me if I'm doing anything wrong or does it usually take this long. If so what can I do to optimize the speed of extracting the data.

BTW I'm using an aws r4xl2 machine running on linux with 8 vcpu and 61 gib of memory. I thought renting a machine with a good amount of memory would help.

Logical Nonsense
  • 393
  • 4
  • 17
  • 2
    Ok so I let the command ride out osmosis read and extracted all the data for a particular amenity in 46 minutes for one instance and then for another instance it took 48 minutes which is not bad. Hopefully someone finds this helpful. – Logical Nonsense Aug 04 '17 at 08:59

1 Answers1

1

The planet file is huge and compressed. I wouldn't expect this command to finish within 20 minutes. However you can give osmium a try, it is said to be faster than osmosis.

scai
  • 20,297
  • 4
  • 56
  • 72
  • Thanks Scai any idea how long it takes on average to parse amenities from the complete file? – Logical Nonsense Aug 04 '17 at 07:16
  • Unfortunately no, I've never done that. If you intend to do this on a regular basis or for multiple amenities you should rethink your approach. To speed up the process you can either import the planet into a database (this takes more time than a single osmosis/osmium query, though) and query this database instead. Alternatively you can install a local Overpass API instance. If you just need to query a smaller area you can try one of the public Overpass API instances instead. – scai Aug 04 '17 at 07:39
  • Thanks regarding my command keyValueList="amenity.college" is there any way I can get all amenities in one call for example keyValueList="amenity.* " with a wild card? or lets say a group of amenities. Example keyValueList="amenity.college,amenity.bar,amenity.restaurant" – Logical Nonsense Aug 04 '17 at 08:32
  • Probably yes. However I'm not an osmosis user and don't know how to do this. Please ask a new question. – scai Aug 04 '17 at 08:56