GithubHelp home page GithubHelp logo

osm-obj-counter's Introduction

OpenStreetMap objects counter

This is a tool for counting the number of objects in a PBF or OSM file according to the configuration file.

Install

git clone https://github.com/developmentseed/osm-obj-counter.git
cd osm-obj-counter/
npm link

Usage

osmcounter <PBF file or OSM FILE> --config <Config file> --format <Format output> --users=<List of users>
  • <PBF file or OSM FILE> Required parameter

  • --config : Required parameter, The app will count the objects according to this configuration file.

Example of config.json file:

{
    "landuse":"farmland",
    "highway":"*"
}
  • If you want to count by a specific object, you should set the value, "landuse":"farmland"

  • If you want to count all the values, set the values to *, "highway":"*"

  • --format: By default, the output format is in json, is you want a CSV ouput, you can set it as: --format csv

  • --users : If you set this argument, you can set to count for the specific users like --users 'piligab,karitotp,Rub21' or if you want to count all user you can set it as: --users '*',

E.g: Getting the base map

osmcounter peru.pbf --config config.json > output.json

E.g: Getting the base map by user

osmcounter peru.pbf --config config.json --users 'piligab,karitotp,Rub21' > output.json

E.g: Getting the base map in csv format

osmcounter peru.pbf --config config.json --format csv > output.csv

osm-obj-counter's People

Contributors

piligab avatar rub21 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.