Grasshopper

algorithmic modeling for Rhino

Importing building height data from a seperate source to extrude shapefile

I have been following the tutorial from Columbia's GSAPP, but the difference here is I have a separate spreadsheet with height data, along with corresponding building id tag. Some building heights are missing, so merging a check with the building id is needed to ensure the correct height is used.

Changing the order of the building.xls data will result in the data not corresponding with the shapefile, I think, but I'm not sure.

So my question is, how can I merge data from both buildings.xls and heights.xls within grasshopper to have the buildings extruded to the correct height?

Views: 2124

Attachments:

Replies to This Discussion

hello Stirling

i am not familiar with meerkat. i have been using @it

which when you load a shape file you have access to attributes like height etc in a list which makes things easier (not to mix heights and shapes)

it might be worth a try

cheers

alex

Well (if I got it correctly) that's very easy with code: I don't have the plug-in required but that's not important at all (I've made some quick "simulation" of the whole "combine this with that" situation).

I'll post tomorrow the def captured (that checks both trees in case where an ID exists here  but not there (puts null))

Here we are: working on my "simulation" of your data, so to speak (I did some "minor" changes and separated things in order to use the 2nd C# against your data trees).

Note: Not sure that I've got the issue 100% correctly ... but if not notify (for instance: are you sure that the build_ID tree is the "master"? etc etc). Anyway I've added a "make unequal" trees option (and therefor the "Not found" thingy appears - toggle the bool (red group) and see what happens).

PS: unequal means that the build_H tree is the "slave" (may contain fewer ID's, that is)

best, Peter

Attachments:

Hi Peter,

Thanks for taking a look at this!

As I understand your file, the C# Update module should be able to plug-in straight data coming in from the xls files, or perhaps I've missed something? When attempting this, an error message occurs; see below for the error message produced highlighting line 85 of C# Update.

The error below is also replicated when using your original file and plugging in the corresponding purple panels into the C# Update as opposed to your C# Buildings component.

Alex,

Thanks for the tip, I hadn't seen this plug-in. I'll take a look!

Attachments:

Er...hm...that's elementary my dear Watson: your stuff starts from main dim 1 (instead of 0).

Get this V2 and have faith

Attachments:

I've switched to working on your file, for clarity. Thanks again.

As before, I linked the panels showing the data directly to C# Update and it errors out... Any idea what I've missed?

Sweet Jesus:

1. Using my stuff as delivered: one C# feeds the other  (works perfectly OK: there's a 10 years guarantee on that or your money back):

2. Feeding my stuff via panel(s) (NEVER DO THAT: guarantee would expire instantly, he he):

Moral: NEVER ... etc etc

best, Peter

Sorry for the confusion, I think I wasn't clear in my first message. I'll take a look and see what I can do...

Thanks again!

OK, here's what can we do (that @$@ TT it doesn't work for some reason).

1. Get your 2 datatrees in 2 data components

2. Internalize data (and cross fingers because ... but that's another story, he he) and send them over there in a definition that has ONLY 2 data components: any imaginable issue could be resolved in nanoseconds (with an extended 123.45 years guarantee).

Meanwhile with @it and bumblebee

(bumbplebee for the excel but you can use the one you have) if meerkat outputs the shapes ids you can just replace the @it part and still be working

cheers

alex

Attachments:

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service