building shape tools for dynamo

image by archi-lab

This is part two, of the so far two part series, on Heron tools for Grasshopper and their adaptation to generate topography and buildings from IMG/SHP files. The idea is to automate the process of creating those two objects so that we can spend more time improving our designs and less time tracing over Google Maps to get building shapes.

topoShapes

The process of obtaining shape files and making them usable with the Heron tools is a little less straight forward than what you saw previously with the topo tools. We can obtain shape files through the same means as IMG files, using USGS Map Viewer. Problem with this method is that you have to hope that different local municipalities made them available there. Most likely you will have to search the website of the municipality that you are interested in and look there for shape files.

One of the problems that I had when I was prepping this tutorial was that for some reason shape files downloaded from the NYC Open Data website were saved corrupted. I turned to Brian – Heron creator – and was told this: “It seems there is a conflict with the way the projection file was written for that shape file and the “standard” held by the GDAL libraries: http://gis.stackexchange.com/questions/61823/ogr-projection-transformation-error What we need to do is re-project the shape file to the correct projection, which is beyond the scope of what Heron can (or should?) do. In this case we need to set the projection to:

EPSG:3785 – Popular Visualisation CRS / Mercator

If you are familiar with QGIS, you can just open it there, set the Coordinate Reference System to the correct projection (see below) under the layer properties and re-save the shape file (with a new name would probably be best).”

Now for someone that has ever used QGIS I guess that’s a pretty simple task, but for me, well it took a little bit of time but I was able to get it to work and now I am sharing that with you all.

  1. Download QGIS. It’s free. Download it here: http://qgis.org/downloads/QGIS-OSGeo4W-2.8.1-1-Setup-x86_64.exe
  2. Start the QGIS Desktop version and go to Layer>AddLayer>Add Vector Layer
  3. Browse to your *shp file and when prompted for projection settings pick: EPSG:3785 – Popular Visualisation CRS / Mercator
  4. Hit OK and then on the left hand side under Layers right click the newly created layer and Save As:
  5. Save that new shape file under a different name and now you can load it up into Grasshopper.

image01

Now, this is just one of the possible issues that you will face, considering that you can get that far, because getting the shape file is a challenge in itself. Anyways, if you manage to get the file and if needed re-project it, then you should be good to go.

The Grasshopper side:

The Grasshopper set up is a little bit more elaborate this time. The idea is to extract shapes of all buildings and their heights. Then filter out all shapes that have height of zer0 (0), and unify the two data structures. Then I am using Mantis Shrimp to export both shapes and heights to Dynamo.

image02

 

The Dynamo side:

Now this was only tested, and not very extensively as I hope that someone will pick this up and make something good with this, with Revit 2014. Yes, I know this sucks, but it will not work on Revit 2015 and even though it will take exactly two lines of code to make it work, I am too lazy to do it tonight. :-P

image03

Anyways here’s the magical code for it:

Support archi-lab on Patreon!

6 Comments

  1. Chris Baze says:

    Would it be possible to bring a parcel map of an entire city into Dynamo? I’m envisioning that you could create a property line and zoning envelope in Revit by just typing in the TMK or parcel number.

    • Chris,

      Oh wow, that is ambitious. Yes, of course it’s possible but I am not sure that required data is readily available in a consistent form as to allow for that level of automation. What I am trying to say, is that this type of GIS data is hard to come by. If you somehow manage to get your hands on it, there is no guarantees that the next city will have it available. Even if they do, it might be in a different standard. This list of problems only gets longer. What I presented in this workflow is not easily deploy able in every setting. I know that first hand as I struggled to get my hands on proper shape files for smaller cities like Charlotte or Durham. It’s a great idea, but not possible at the moment.

      • Chris Baze says:

        Hah, I was inspired by https://metro.flux.io/metro/. We have pretty good availability of GIS data here in Honolulu at ftp://gisftp.hicentral.com/… the regulatory_parcel file was just updated yesterday. I’m not enough of a Dynamo expert yet to take this on, but I’ll get there!

        • Yeah Chris, that was a nice teaser, with roughly 15 people in the office, all former Google employees with Computer Science background, and unlimited resources they were able to pull that together for one small town. It was really impressive but I think since then they have move on to more attainable goals in life – interoperability workflows. That is still an impressive work, but ultimately I am not sure if one person can dream about pulling that together for a city the size of Hong Kong. I am not saying it’s impossible but highly unlikely. :-) Remember that impossible is nothing. :-) LOL Good luck with your work. Thanks for sharing.

  2. Thomaz Yuji says:

    Hello Konrad,

    can you make it work for Revit 2016? It would be awesome for my academic research about city potentials. I would be glad to mention you.

    Thanks!

Leave a Comment