Giter VIP home page Giter VIP logo

hdb3d-code's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hdb3d-code's Issues

smaller area with multipolygons accounted for

Should you wish to do a smaller area, say a suburb or campus: overpass and osm2geojson might be useful.

query = """
[out:json][timeout:30];
// area-of-interest here
area[name='Cape Peninsula University of Technology (Bellville Campus)']->.a;

// --when areas have duplicate names given the world has a limited amount of uniquely named places
// --main area
//area[name="Western Cape"]->.b;
// -- target area ~ can be way or relation
//relation(area.b)[name="Woodstock"];
//map_to_area -> .a;

(
  (
    // I want all buildings
    way[building](area.a);

    // plus every building:part
    way["building:part"](area.a);
    // and relation type=multipolygon ~ to removed courtyards from buildings
    relation["building"]["type"="multipolygon"](area.a);
  );
-
  // excluding buildings with relation type=building role=outline
  // to remove outlines that surround building:part
  (
    // for every way in the input set select the relations of which it is an "outline" member
    rel(bw:"outline")["type"="building"];
    // back to the ways with role "outline"
    way(r:"outline");
  );
);
out body;
>;
out skel qt;
"""

url = "http://overpass-api.de/api/interpreter"
r = requests.get(url, params={'data': query})
#rr = r.read()
gj = osm2geojson.json2geojson(r.json())

will you give you what you need. Hereafter you can continue with a slightly modified hdb2d.py. The image below as an example of the result.

github_issue

Courtyards are correct with features in courtyards retained (bottom left) and buildings with correct height when building:part have a different height to the outline (above half-way up on the right). notebook here.

Thank you for this wonderful resource.

How to show CityJson (3d model) on Mapbox?

Hi, ath the moment I'm using mapbox for a personal project. In the readme you show that it's possible to visualise cityjson data in Mapbox. I can't find any tutorials for how to do this. Hopefully you can help me and explain how to use Mapbox with cityJson :).

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.