Giter Site home page Giter Site logo

bmispelon / building2osm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nkamapper/building2osm

0.0 1.0 0.0 400 KB

Generates import files for OpenStreetMap with buliding footprints from Kartverket

License: Creative Commons Zero v1.0 Universal

Python 100.00%

building2osm's Introduction

building2osm

Generates import files for OpenStreetMap with buliding footprints from Kartverket.

building2osm

Generates geojson import file with building footprints.

Note: The WFS service used is currently not delivering building polygons.

Usage: python3 building2osm.py <municipality> [-split] [-original] [-verify] [-debug]

Parameters:

  • municipality - Name of the municipality to generate. Output for several municipalities is generated if county name or "Norway" is given.
  • -split - Also split output file into smaller subdivisions ("bydel" or post districts).
  • -original - Produce file without any modifications.
  • -verify - Include extra tags for verification of topology modificatons.
  • -debug - Include extra tags for debugging.

building_merge

Conflates the geojson import file with existing buildings in OSM and produces an OSM file for manual verification and uploading.

Usage: python3 building_merge.py <municipality> [<max distance>] [<filename.geojson>] [-debug]

Parameters:

  • municipality - Name of the municipality to conflate.
  • max distance - Optional maximum Hausdorff distance between matched buildings. Default value is 10 metres (5 metres is the building is tagged).
  • filename.geojson - Optional input file in geojson format. If not specified, the import file for the municipality will be loaded (it must be present in the default folder).
  • -debug - Include extra tags for debugging.

municipality_split

Splits the geojson import file into smaller subdivisions such as post districts or "bydel".

Usage: python3 municipality_split.py <municipality> [ --subdivision [ bydel | postnummer ]

Parameter:

  • municipality - Name of the municipality to split.
  • --subdivision bydel - Split municipality according to boroughs.
  • --subdivision bydel - Split municipality according to post districts (please check for leftover buildings if post districts do not correspond exactly to municipality boundaries).

Notes

  • Source data is from the Cadastral registry of Kartverket
    • "INSPIRE Buildings Core2d" - Contains polygons of the building footprints.
    • "Matrikkelen Building point" - Contains information about the building type/usage.
    • "Matrikkelen Address apartment level" - Contains information about levels of the building.
  • The building=* tag is given a value corresponding to the building_type translation table in this respository. Please provide feedback if you observe that the tagging should be modified.
  • Certain modifications of the footprint polygons are made to avoid clutter in OSM:
    • Polygons which are almost square are rectified (orthogonalized) to get exact 90 degrees corners. Groups of connected buildings are rectified as a group. Multipolygons are supported. A polygon is not rectified if it would relocate one of its nodes by more than 20 centimeters.
    • Redundant nodes are removed if they are located on an (almost) straight line.
    • Curved walls are only simplified lightly.
  • Output is stored in a geosjon file which may be loaded into JOSM when the OpenData plugin has been installed. Please read the import plan for guiding on how to do the import.
  • The building_merge program conflates the import buildings with existing buildings in OSM.
    • New buildings are loaded from the geojson import file.
    • Existing buildings are loaded from OSM.
    • New and existing buildings which are each other's best match within the given maximum Hausdorff distance (default 10 metres) are automatically conflated. They also need to have similar size (default 50% difference).
    • The OSM_BUILDING tag will show which building tag was used by the existing building, unless they are in similar residential/commercial/farm categories.
    • Use the To-do plugin in JOSM to:
      1. Resolve Overlapping buildings.
      2. Resolve Building within buildings.
      3. Check OSM_BUILDING for manual retagging of building types.
      4. Check untouched existing OSM buildings.
      5. Check if entrances or other tagged nodes needs to be reconnected to the new buildings (search for type:node ways:0 -untagged).

References

building2osm's People

Contributors

nkamapper avatar noenandre avatar

Watchers

 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.