Coder Social home page Coder Social logo

osmbuilding's Introduction

Badge

OSM Building Viewer

Visualize an OSM Building in 3D

Visualize an OSM Building from the live OSM data. To visualize a building tagged with a way, use the URL: https://beakerboy.github.io/OSMBuilding/index.html?id=[id]

If the building is a multipolygon, or a relation, use: https://beakerboy.github.io/OSMBuilding/index.html?type=relation&id=[id]

...replacing [id] with the actual id of the way or relation.

Additional details will be displayed if "&info" is appended to the URL.

Console debug messages can be printed to the screen if "&errorBox" is appended to the url. Helpful since mobile browsers often lack any inspection capability.

Supports:

  • Ways with a building tag
  • Ways with building parts inside.
  • Building relations with way and/or multipolygon parts
  • Mulipolygon buildings

Roof Types:

  • Flat
  • Skillion
  • Dome
  • Pyramidal
  • Gabled

Examples:

osmbuilding's People

Contributors

beakerboy avatar beakerboy1 avatar codezigineer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

osmbuilding's Issues

Use ShapeGeometry for flat roofs

Currently flat roofs are not rendered because the building will have a flat top. However, if the building type is a roof the building is not rendered, and we still need a roof.

subtract roof height from height

Height is defined as the total height. if roof height is specified, it must be subtracted to calculated the extruded depth of the main building.

Use a rotation instead of a translation to "center" the structure

Currently, the first node of the way is moved to 0,0 by subtracting it's values from the lat/lon of every other point.
It is perfectly cromulent to change the longitude this way, but the latitude should be modified with a true rotation.

this is because at higher latitude, the arclength of each degree longitude is smaller.

First "rotate" the data to move the home point into the prime meridian.
Then use trig to move each point towards the equator.

Black screen

I'm not sure how to use this. When I click on the Example links using Safari on Mac or iPhone all I see is a black screen.

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.