Coder Social home page Coder Social logo

Comments (12)

philipbelesky avatar philipbelesky commented on June 18, 2024 1

Hey, thanks for the follow up. I thought I had mentioned this in my original reply, but you are definitely right about the lack of multipolygon description precluding import of many of the buildings. That feature is definitely planned and involves parsing and grouping those geometry types as described here: #4. I might try and do a quick solution sometime soon, but the delay in getting to this was that I wanted to add it in without slowing down the parsing speed overall. I'll keep you posted when I get to it and when there's anything to test.

from caribou.

Lenivedz avatar Lenivedz commented on June 18, 2024

I heard that OSM don't extract buildings with mark "building=yes" maybe that an issue

Screenshot 2022-02-16 at 16 51 33

?

from caribou.

Lenivedz avatar Lenivedz commented on June 18, 2024

Screenshot 2022-02-16 at 16 20 31

same place in QGIS (apartments are missing in gh)

from caribou.

philipbelesky avatar philipbelesky commented on June 18, 2024

Hi Lenivedz, thanks for posting this issue. I'll need to take a look at the raw data to see if this is an issue with OSM or an issue with Caribou. Could you post the the .osm file you downloaded? If it wont fit as an attachment, maybe link me to the area you are looking at. And, just to confirm, the buildings that didn't come through with height data are the white-colored ones in your first render?

from caribou.

Lenivedz avatar Lenivedz commented on June 18, 2024

Hi, I can't attach osm.xlm file, so here is approximately area https://www.openstreetmap.org/#map=17/59.95610/30.30597

Yes, white ones are made manually (I made them by exporting vectors from same file in QGIS)

I didn't use height data actually, i extruded buildings by extracting levels data and multiply it by 3.2 m.

from caribou.

philipbelesky avatar philipbelesky commented on June 18, 2024

Hey, thanks for posting the site location, that makes it much easier for me to look into. I've been able to confirm a couple of things:

  1. Some of the shapes in this site aren't properly closed curves which caused an error in Caribou when it tried to make them into BREPs. This then prevented other geometry from being processed — probably some buildings. I've added some code to handle this more gracefully so that the other geometry is not affected. If you update Caribou in the Package Manger it should contain this fix - let me know if it doesn't address the problem.

  2. I'm not sure exactly which buildings you manually added heights for, but there definitely isn't height data in OSM for all buildings on the site. If you look at the definition in the zip file below (and plug in your OSM file) you can see the metadata for each building. If it has a height or levels Caribou will use that to make a 3D shape, the presence or absence of building=yes shouldn't matter. Do let me know if QGIS is able to add heights for buildings that don't have a height/level/floor value in Caribou/Grasshopper as I'd be interested to look into how they do this.

Caribou OSM info.ghx.zip
.

from caribou.

gspahr avatar gspahr commented on June 18, 2024

Hi, I've been using your Caribou library since yesterday and encountered this building import error... a superficial analysis of buildings that weren't imported revealed that their base geometry was a little more complex than just closed polygons, but in fact had one or more holes through them (example, interior courtyards).

OSM

GH

Malaga MAP.zip

from caribou.

philipbelesky avatar philipbelesky commented on June 18, 2024

Hey, thanks for bringing this to my attention and for posting a clear test case. I should have some time to look at this over the next week. I think it should be either:

  • Some part of the building-generator-from-outlines code is choking on the more complex shapes
  • The OSM data for those buildings stores each polyline as separate pieces of data and then uses special metadata to define particular interrelationships like 'interior courtyard'. If so, a fix might required #4 to be tackled and take a little longer.

If there is another Grasshopper OSM importer that handles these types of geometries, let me know as it could help to narrow down the issue.

from caribou.

gspahr avatar gspahr commented on June 18, 2024

Sure, I've been trying other importers, I will enumerate what I've tried so far:

  • Elk has given me very reliable geometry, but it is not as practical to filter out stuff as in Caribou.
  • I also tried a component from Decoding Spaces called 'Decompose Extrusion' that extracts and converts geometry from OBJ meshes (obtained through OSM2World) to Breps.
  • Dragonfly from Ladybug Tools also was able to extract correctly the buildings' geometry, but does so from a GeoJSON file that I had to create elsewhere (http://geojson.io/) but somehow managed to lose the building height metadata.

I hope this helps you towards reaching the easier solution possible!

from caribou.

philipbelesky avatar philipbelesky commented on June 18, 2024

Hey, thanks for bearing with me. It turns out this seems to be an issue with the metadata rather than anything too Caribou specific.

In the file you've provided, the missing buildings don't actually have any height data specified for them in Open Street Map. You can verify this using the "Query Features" option in the OSM web viewer. In many cases, they also aren't tagged as "buildings", but it looks like the OSM web viewer has some smarts to interpret other metadata like amenity=hospital or landuse=residential as equivalent to a building tag.

I can see in Elk that it provides building outlines (not heights) in a similar fashion - presumably it has a special list of metadata that aren't building=something but can be assumed to be buildings. I'm not sure I like this behaviour as part of Caribou's workflow involves being very explicit about the kinds of metadata you are looking for. I wonder if this could be solved by either:

  • Perhaps making "Extract Buildings" into the more generic "Extract Volumes"
  • Either adding a new button to the Specify Features window that would pre-select all 'tags very likely to be buildings' or add a new Specify Buildings component, that will automatically generate this list of all building-like metadata.

What were your thoughts? I realise that making 3D volumes from buildings is like 80% of the job for this kind of plugin in an architectural setting, but I'd like to not compromise the more GIS/meta-data stuff that I think is the most interesting part about Caribou.

from caribou.

gspahr avatar gspahr commented on June 18, 2024

Hi, sorry for the delay.

I've been looking at the query function on OSM and the unimported buildings I identified are indeed tagged as buildings building=hospital, building=public, building=apartments and so on, but what I can appreciate is that they have an extra type=multipolygon tag that is in fact related to the presence of inner courtyards geometries.
As an example I'm pasting here the metadata for one of the buildings highlighted on my previous posts.

hospital

You are very right that being able to quickly import the geometries is one the most important aspects of my workflow where I'm trying to simulate urban weather. I hope this issue can be circumvented since Caribou makes it really easy to filter by metadata and in no way would I want it to compromise this aspect.

from caribou.

gspahr avatar gspahr commented on June 18, 2024

Absolutely! My pleasure to bring up the issue and definitely will be looking forward to the next update.

from caribou.

Related Issues (13)

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.