Git Product home page Git Product logo

geojson-indoor-tools's Introduction

GeoJSON Indoor Tools

Quick GeoJSON tools for editing and modifying geojson data, focusing on indoor features.

Available Scripts

Features inside area

Removes any feature that is outside of a polygon. Great for grabbing an area indoor data generated by other services.

before

after

python3 features-inside-area.py

Add polygons heights

Adds multiple properties to polygons: level, height, base_height and a random color.

python3 add-polygon-heights.py

Rooms to walls

Create walls for any polygon room. You can adjust the wall thickness with zeta. It also sets height so walls are differentiable from the original room polygon.

before

after

python3 rooms-to-walls.py

Add doors to rooms

Cut out rooms doors from their polygons. Doors are geometrically points near their walls.

before

after

Important notes:

  • For assigning a door to a room, the door should have door: yes tag and room_id:
      {
        "type": "Feature",
        "properties": {
          "room_id": "main",
          "tags": {
            "door": "yes"
          }
        },
        "geometry": {
          "coordinates": [~],
          "type": "Point"
        }
      }
    The room must have an id and a room indoor tag:
      {
        "type": "Feature",
        "properties": {
          "id": "main",
          "tags": {
            "indoor": "room"
          }
        },
        "geometry": {
          "coordinates": [
            [~]
          ],
          "type": "Polygon"
         }
      }
  • Door points must be near their wall but not necessarily on the wall line. The algorithm will find the nearest wall.
  • Multiple doors for a single wall is NOT supported.
  • Set include_lintel to True if you want the lintels to be included in the final feature collection. You can adjust their properties with lintel_properties.
  • circle_radius_cm indirectly defines the width of the doors. Setting it to a big number will cause problems in finding the correct wall for a door.
python3 add-doors-to-rooms.py

Contributing

Pull requests are welcome.

geojson-indoor-tools's People

Contributors

armanjr avatar

Stargazers

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