Giter Site home page Giter Site logo

orbit-gt-belgium / pbf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from missinglink/pbf

0.0 0.0 0.0 854 KB

utilities for parsing OpenStreetMap PBF files and extracting geographic data

License: MIT License

Go 96.85% Shell 2.92% Dockerfile 0.23%

pbf's Introduction

utilities for parsing OpenStreetMap PBF files and extracting geographic data

installation

tested on go version go1.9, recommended go1.10, cross-compilation possibly broken in recent versions of go

$ export GO111MODULE=on
$ go get github.com/missinglink/pbf

disclaimer

this repo contains a bunch of experiments including a monkey-patched parsing library, it should be considered as permanently in development.

please feel free to fork and contribute, at some stage it might reach a level of maturity and stability where it could be published as a more general-purpose tool.

running the cli

$ pbf --help

NAME:
   pbf - utilities for parsing OpenStreetMap PBF files and extracting geographic data

USAGE:
   pbf [global options] command [command options] [arguments...]

VERSION:
   0.0.0

COMMANDS:
     stats                    pbf statistics
     json                     convert to overpass json format, optionally using bitmask to filter elements
     json-flat                convert to a json format, compulsorily using bitmask to filter elements and leveldb to denormalize where possible
     xml                      convert to osm xml format, optionally using bitmask to filter elements
     opl                      convert to opl, optionally using bitmask to filter elements
     nquad                    convert to nquad, optionally using bitmask to filter elements
     cypher                   convert to cypher format used by the neo4j graph database, optionally using bitmask to filter elements
     sqlite3                  import elements in to sqlite3 database, optionally using bitmask to filter elements
     leveldb                  import elements in to leveldb database, optionally using bitmask to filter elements
     genmask                  generate a bitmask file by specifying feature tags to match
     genmask-boundaries       generate a bitmask file containing only elements referenced by a boundary:administrative relation
     genmask-super-relations  generate a bitmask file containing only relations which have at least one another relation as a member
     bitmask-stats            output statistics for a bitmask file
     store-noderefs           store all node refs in leveldb for records matching bitmask
     boundaries               write geojson osm boundary files using a leveldb database as source
     xroads                   compute street intersections
     streets                  export street segments as merged linestrings, encoded in various formats
     noderefs                 count the number of times a nodeid is referenced in file
     index                    index a pbf file and write index to disk
     index-info               display a visual representation of the index file
     find                     random access to pbf
     help, h                  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version

get more detailed information on a specific command

$ pbf help stats

NAME:
   pbf stats - pbf statistics

USAGE:
   pbf stats [command options] [arguments...]

OPTIONS:
   --interval value, -i value  write stats every i milliseconds (default: 0)

running the tests

$ go test $(go list ./... | grep -v /vendor/)

issues / bugs

please open a github issue / open a pull request.

if you are planning a non-trivial feature, please open an issue to discuss it first.

license

The MIT License (MIT)

Copyright (c) 2017, Peter Johnson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

pbf's People

Contributors

jaspervercnocke avatar joxit avatar missinglink avatar orangejulius avatar

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.