Giter Club home page Giter Club logo

osmpoispbf's Introduction

Scans an OpenStreetMap file for nodes and areas whose tags indicate them as POIs (Points of interest) and extracts those into a comma seperated file.

The parsing of tags is based on a collocation using the OSM Wiki Map Features list. The poi_types.csv contains the POI-type-numbers used by this program and their associated names. For areas the positions of their geometrical centre is used. When there is a node above a same tagged area you get duplicates. So make sure you remove the duplicates if you have to (e.g. by running a radius check on same names and types).

Flattr me

Simple Usage

  • Download the lastest osmpois.jar file from the releases page
  • Get the planet file or any other .osm.pbf
  • Put the OpenStreetMap binary file (.pbf) in same directory as the jar file
  • Run java in a terminal (make sure you have at least 4GB of free RAM for the whole planet):
    java -Xmx4g -jar osmpois.jar planet
    • The last parameter must be the .osm.pbf file name without file ending (e.g. "planet" for planet.osm.pbf)
    • If you add the -cities (or -c) parameter after the file name, an additional cities.csv is created that contains all cities.

Output

A CSV output file called pois.csv is created. Actually it's a pipe-seperated-file "|" as these are rarely used in location names (pipes are removed from names).

pois.csv

Sample (spaces added for better readability):

28 | N2272819038 | 52.46276 | 13.37742 | Bose-Eck
28 | N2272820300 | 52.46667 | 13.35347 | Zum Bunker
40 | W4377786 | 52.50574 | 13.32238 | Savignyplatz
145 | W4381164 | 52.50517 | 13.32113 | Else-Ury-Bogen
40 | W4392438 | 52.52438 | 13.29288 | Schlossgarten
145 | W4395344 | 52.51857 | 13.37463 | Platz der Republik
18 | W4401982 | 52.48562 | 13.31099 | Friedhof Wilmersdorf

Fields:

  • 1.) POI-type, see poi_types.csv for the list of poi type names
  • 2.) OSM-ID of the element, first character indicates the element type (Way or Node)
  • 3.) Latitude
  • 4.) Longitude
  • 5.) Name of the POI

Memory Usage / Performance

The program loads only necessary geographical positions into the memory. The tags of nodes and areas are then parsed without beeing fully loaded into memory. For the whole planet this takes about 3.5GB of RAM (make sure you fit the -Xmx parameter and if you can give about 5-6GB RAM, as it is faster). Parsing of the whole planet takes about 1.5 hours on an AMD Athlon 64 6000+ X2 (one core used).

Symbols

There is a sample high-resolution symbol set for each type of POI. Please refer to the symbol licenses (mostly CC0) before using this. The single symbols of the grid are arranged based on their POI-type-id starting with ID 1 from upper left, then second from left and so on.

POI Symbol Grid

License

Copyright 2012-2014, Merten Peetz

OsmPoisPbf is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

OsmPoisPbf is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with OsmPoisPbj. If not, see http://www.gnu.org/licenses/.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.