Code Monkey home page Code Monkey logo

openhousepopulator's Introduction

Logo

OpenHousePopulator

This tool can be used to estimate the inhabitant count per house in an area with a known population using OpenStreetMap data. The result is based on a very simple heuristic, so low accuracy should be expected.

Setup

Step 1: Install Rust:

Arch based:

$ sudo pacman -S rust

Debian based:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install rust

For use under Windows / MacOS install rust using the default installer from the official website: www.rust-lang.org

Step 2: Setup OpenHousePopulator

$ chmod 755 setup.sh
$ ./setup.sh

Execution

To execute the CLI run:

cd bin

// Show help
./OpenHousePopulator --help

// Populate example area
./OpenHousePopulator populate -f "./res/Gmunden.osm.pbf" -i 7602 --centroid

Where -i (mandatory) describes the number of inhabitants in the area of the .osm.pbf file. The --centroid (optional) parameter puts the data in a GeoJSON Point geometry instead into the buildings geometry.

Output: A GeoJson with all buildings including the additional fields 'pop' (population), 'flats' (household estimation)

Configuration

You can configure the following parameters in the config.json file:

  • reroll_threshold: The minimum population count to start rerolling (populate next building).
  • reroll_probability: The probability to reroll a building (over threshold).
  • level_factor: The factor to multiply the level count with (if multi-storey).
  • housenumber_factor: The factor to multiply the house number count with.
  • exclude_landuse: Areas to exclude buildings in. (e.g. ["industrial", "commercial"]).
  • exclude_tags: Areas to exclude by tag (e.g. ["amenity", "leisure"]).
  • single_home_list: List of building values to be considered single home houses (e.g. ["house", "detached"]).
  • apartment_list: List of buildings values to be considered apartments (e.g. ["apartments", "residential"]).
  • unspecified_list: List of buildings values to be considered unspecified (e.g. ["terrace", "semidetached_house"]).

openhousepopulator's People

Contributors

thenewcivilian avatar zandemax avatar ohrie 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.