Grasshopper 13: Importing GIS Data (Shapefiles) into Rhino+Grasshopper with Urbano

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone and welcome to a new tutorial uh today i'm gonna teach you how to open and import some shade files uh gis data in grasshopper using a very interesting tool called banos so if you go to food for rhino there is a tool a plugin called urbano designed by mordogan so urbano as he says here is a very new and easy way to use urban design tool was basically what is allowing you is just to upload or load urban data in this case gis information or shape files from any software that you produce them or you can download it online into rhino and also open street map information so the first part of this let's say uh video will focus mostly on shed file i will upload a separate video tutorial in which i will focus on openstreetmap only okay so let's start so the first thing you have to do is to download uh we're on our binary is provided as a uni is a smart installer it just isn't executable so you just have to extract it and data sets should be copied to the c drive or panel uh the instructions are here and then um there is um once you install there's a couple of um um grasshopper components that has to be copied or added to the a component folder or rhino plugins um rhino components folder manually and that's it once you have that you have to restart your grasshopper and then what you're gonna get is this um set of tools so you have inputs and outputs and we're going to focus mostly on importing a shape file okay file this um tutorial you have uh how to read the metadata the metadata is referring in order by urbano as all the information that in gis we call it the attribute tables okay so if you have qgis or arcgis the attribute table is um the information that it's it's contained on a table that is assigned to each uh each and every feature or element either point um line polyline or a polygon in um gis so you can read that metadata and then it has also other tools i will uh try to teach you in another in other videos which is basically how to create buildings how to create models and mostly how to simulate particularly how to simulate walkability so it has a lot of very interesting tools to assimilate walkability and an estimate a short part distances between different elements so as you can see here there are plenty of other tools that will help you to simulate for example distances or short distances between buildings or estimate estimated scores and walkability scores as well generate catchments etc so it's a very interesting tool um this is this is another of the motivation of the development was just to develop walkable neighborhoods and estimate that um but that could be for another time so the first thing is that the new version if you add this um previous version of urban didn't have bounds as an one of the inputs so what the first thing what we're gonna do is just to add and import the shade file feature we're gonna move it somewhere here okay so sorry so once we have this one here um i'm going to revisit some of the input parameters that we need to put we need to put a file path to locate the shape file and this is a reprojection um by default or when it is true is using a wgs84 datum unless you have a different datum i suggest you just to keep it like that because is a world uh geodesic datum and it's easy to work um we have a define a utm song which is a given region so it's easier for us to locate exactly where the data is i will teach you how to do that we use a translation vector the translation vector will help to move all the actual information into the same utm window and what happens is like every time we um we import a shed file the shape the shapefile will be imported with its own origin so it's really important just to use the translation vector to connect so all they will overlap in the same utm zone the balance define the bounds or the boundaries that will be where all this information data is located and then we have crop and geometry in case you want to let's say um a particular shape and you want to crop a gis geometry i will teach you all this stuff so the first thing is we are going to create a file path file path uh we are not connecting anything yet then for the utm zone we need a panel okay so once we have the i know we need to define there in the panel what is going to be our zone in this case our sun is 54 h okay that's it so we connect this here no problem and then we are going to identify our um the bound the bounds for each of them so we're going to create we can copy this panel by dragging and clicking on alt and then we can edit it and delete and then we can create four of these we will define our core balance now where to find those bounds if you don't define the bound if not nothing is going to be here okay all we have to do is are two options one i want to show you here is to use oran portal so if you go to portal.oring.org.eu oring is the australian urban research infrastructure network uh you need to have of course an account an account is usually free for people working in government people working in specific companies and people working at universities so it is very useful for students so what i've done here is i just draw a box i open the oring box um and it's very simple so what you have to do here is just if you assuming you will have you can define a bounding box so this is the bounding box you can draw it and the bounding box will have here the information of the data you want to download so this step is very useful very simple so you can drag and drop look and the numbers will automatically um update it okay don't touch it it's anymore this is one option second option is just go to openstreetmap once you go to open a street map and you click on export you can draw let me go again to the main main um menu export you'll need to click on manually select area and then let's imagine this is the same area that i am highlighting here it is the same area i want to download this information so here you will have the information for your bounding boxes the upper the lower left and right so you have their two options to extract this information this is very easy for those who doesn't have don't have or important access interesting thing about oring is like you can browse data once you are there you can browse data you can add donna um okay click this let me browse some data and then import it here and this is gis data that you can download easily okay so here is your bounding box defined then you click in browse and then we're gonna put for example a straight network once we have done that you identify here different information um the most common one is the uh psma and then we have here different attributes this attribute is the metadata okay we just click on any of them and then when you have this option geometry it means that you have a geometrical element can be in this case a polygon or it can be a polyline we'd have that information attached to each of those polygons and it will be very easy then later to export to shapefile but there is sometimes information that um like um this one you have geometry um you have open street map road network um some other ones are socioeconomic aspects you don't have geometry in this case there is no problem there is geometry so we're going to click on this and then we put add and keep browsing okay so the data will require um to accept some terms and say okay so it's here and once you hit that you can put for example save say if safa means social economic index for specific areas and if you click on the save form you will see that there is no geometry but there are codes and then you can link the code for example in this case the statistical areas codes which is essay as they want say 2x834 in australia are statistical areas um and you can link that to them shapefile that is available in the bureau of statistics for example if you don't have a geometry you can you cannot download it as a shapefile so once you've got this you can open here and you can directly go and try to download it you can visualize it but it's not the purpose of this video tutorial so we just go here and then we download check file it will download the information that it is not only within the boundary but sometimes it grabs the information that is within that grid so this will work and after a while it would download the data in this case for example download the data as a zip folder if we go to the download and we click here and we extract we're going to get a folder and inside the folder is the shape file i recommend you to open it in qgis or arcgis and rename it and don't rename manually each of these because we'll take too long okay so what happened is that for this tutorial already have a lot of datasets a cadastral data so for example i have the abs the australian board of statistics data which is unused population and dwelling i have also uh features of interest cadastr um street network topography and so on so all of these were downloaded from urine this is a way to download that okay um you can also download the openstreetmap but that's where we will be for the second video tutorial okay so once we have this information we have the shapefile we have the bonding box and the numbers and then what we have to do is go to um here and start inputting that information so to make it easier for us we just need this oh gosh sorry um we need this information so what we're gonna do is i'm gonna reduce this for a moment so then i can use the left bound which is this one and i can copy come here and paste put okay the right bound copy paste upper bound or the bound and lower now this is in the case of these bounds but you can also use the ones from as i said before from o-ring which are not far too far very different so it's 49 is a little bit larger the area cover but then but then um this mountain box so you can use the same one so look you can change this for 71. if you want to increase it you can increase it uh the other one is 38 84 72 so you can see 84 72 and so on and the other one is 57 20 57 20 and the last one is minus 34 80 64. so it is very similar 80 64. okay so what we're gonna do now i'm bringing this back to the same size i'm bringing this back here so we're just connecting the left bound the right round the top down still nothing is displayed because i have to link the shape file so then i will go to select one existing file and then i need to locate so i will go to my data and cadastral and then i will start with the zoning which is very simple then use and that's it so look the shape file it has to be the shp file okay this is the number that we are looking for okay and then we are going to connect to the shape file and it will take a little bit of time if you don't see the points what you can do is right click sorry i'll click the mouse scroll and then go to this option which is soon so as you're gonna start seeing the point display here so all these points can be later connected into a polyline so what we're going to do if we remove the bounds things start disappearing have you noticed okay good so now what we're going to do is these points and you can read here all the data you have metadata what we're gonna do is just for this point we're trying to display it as a polyline uh poly polyline okay so we have the vertices and everything is closed at the moment we can turn off sorry disable this visualization so we only look at the polyline okay so that's the polyline defined in zones for this information that we are displaying so we are displaying our first shapefile in we can bake it so we can bake it send it to a particular um layer and then it will be there physically now what we're going to do we're going to understand the metadata that it is here so which is basically all the attribute table and shared file so what we're going to do we're going to use the deconstruct metadata connect this metadata here and then we open panels panel one and two to understand what is keys and what are values so keys as you can see are each of the height let's say the field fields of your attribute table in gis for those who are familiar with the gis will be obvious but if you have a table that is the upper part of the table in which you have the hidden number of people and you see that the number zero zero has 38 we don't know which one it is i will teach you how to do that later um area okay and then other quotes the state name which is south australia um you have number of dwelling which is the index then which is 31. so we know there are 31 dwellings there we know the name of the of the greater zone and which is this case greater adelaide we have other information okay um we have the same for the next one and the next one and the next one so each one is individual so then is when we have information of the metadata now um something interesting to do is just to create a custom preview for this i don't want to preview everything in red so what we're going to do is just like click and type custom preview and for custom preview we need the polyline as a geometry and then we need to add a color color swatch and we connected there so i i want to choose for example this red or this blue or this black or any other i wanted perhaps uh change the hue and then go to a kind of bluer i like these lower colors okay so that's it so we have now the custom preview of this information so it's very simple okay let's save this and then i will go to the next step so now that we already added all this information and we have the polylines properly color now we're gonna um it's important to for you to check that we're having here is that there are a lot of locally defined values but many of these may not be correct or maybe invalid or ethanol so what we're gonna do next is we're gonna in the tree and we're gonna do um to eliminate invalid or no geometries so to do that quickly i would just move these two panels away from it so what we're going to do is add three just a simple tree one thing is the yeah three eyes oh it's not tree item this graph three yep so what we're gonna do is just grab this polyline we should flatten all the values here and add it to this tree and then once we have done this so i'm gonna disable this representation so then i have my tree here and i'm gonna disable this one so i have this tree i don't know it's not to say okay and i'm gonna enable this so i have my tree there the next step is we're gonna remove the invalid okay so we're gonna remove invalid um i think it's plain clean tree okay we're gonna remove the invalids with the tree with clean tree so what we need here is just we're gonna connect the tree to this tree and we're gonna um remove empty we need a boolean table and we put it here and then we run it through okay so when we have done that we have already um have removed all the empty ones now we're gonna do is a three statistics okay so we'll just write three statistics and we connect in the three and so we're gonna get here all the paths okay all the list of paths and information that we need and we need to generate an index so what we're gonna do is we're gonna use the index to identify which of these items we want to let's say um isolate okay so we knew this item is somewhere here please item and then we grab but before that what we need is just to create a three branch three branch so we add the tree branch here we have the path goes into the path i should move this so once we have the path there and then we need to copy the tree from the tree correct so but the tree it will come from values here all these values uh you see here yeah they are coming into the tree so maybe it is better if i move it down here so we have already here we have the path we know the whole tree we need the path that we're gonna get and then from this branch we connect to the list okay we need to generate an index so we have here a list so we have from 0 to 18 and this is what we want from 0 to 18 0 to 18 we need to connect that index so that's what we're going to do we put in the index we'll leave it with zero for now and after doing this item we're going to do is just create a domain a minimum and maximum domain okay so that will help us what we're going to do is i'm going to create a representation a color representation for the minimum and maximum values so for that what we're going to do is we're going to create now a domain okay so minimum maximum domain so it's domain um where is the minimum maximum domain construct domain um now we need to go to math minimum and max bounce we need to create bounce first and then we need to construct domain construct domain so we create the bounce first and we get the bounce from these items again we need to flatten these so we connect the these leads to the numbers and then we create these to the domain um um instead of construct a domain we need to deconstruct sorry deconstruct domain deconstruct domain so we got the domain we're going to deconstruct so we need we have our start 0 our end 182 for that particular index so what it means this index this index will tell you is the index 0 that relates to number of people so for that particular for this particular set our minimum is zero no people and our maximum is is 182 people so once we have done this we have the beginning and at the end so now we can proceed to add um what i call is um legend or somehow of legend in fact if we go to parameters and then we go here the name is a gradient so right click to select the preset that it's uh maybe the correct blue and we have the lower limit and upper limit so um let's put the lower limit in fact what we have to do is invert here and i will explain you why that later for now it doesn't display anything because in fact we need to connect this to custom preview so what we're going to do now is we're going to generate here um something called um surface um boundary surface so here is boundary boundary surfaces so we grab edges from our geometry right so the geometry comes from the tree where is the tree yeah from here we got our edges so you can see how they are appearing and we're gonna use the custom preview to visualize properly this so our custom preview will go here um we got custom custom preview and then use this as a information for the material this for geometry it will take a bit and it will try to show here the information so it will take a while or what something we forgot is the parameter so which parameter we want to add there so we have to grab the list and connect there to the parameter and something i wanted to show you is like what you see here it's the one single color and this is because here we need to do the graft um sorry um you need to right click and we need to graft so this is when you can start seeing the lower values and upper values so that's why i invert otherwise the star otherwise the colors will be the opposite so what we want to get is the lower number right zero zero houses and these are all here okay um in order instead of inverting the colors because this will take a while so you need to set up the preset in the opposite direction having the blue on the left side and the red on the right side because we want the lower values and the higher values instead of that it's easier just you just invert and then otherwise you will look like this right you see the lower values will be red and the higher values will be blue so we don't want that to happen so you just do a sensitivity analysis simple like you connect them based on what is that information you see here you want to represent you use the proper connection um if you have another presets for example um and your preset goes from light color to dark color and you want to represent higher numbers higher values as dark then you have to connect it in the opposite direction in the opposite order why because you want to represent the height as a lower value which is not the case in in this sort of representation so that it is you can fix also this information now we have here um or the polyline so we can turn off this so that's our representation it's very nice okay so we have here which index we are representing that is very important so if we use the index 0 that means we are representing the total number of people living in each of these polygons okay if i want to represent the area we need to check the index i want to go for another thing which is dwelling the number of telling which is index 10 so what i'm going to do is go to index 10 and this is the number of dwellings but if you want to represent for example the area then you go to the index one so you move the index one so you can see the bigger areas or the bigger polygons medium polygons and smaller polygons so that's how with this index or a slider operate and you selecting the item in the item which of these items are you gonna use to create this sort of domains of upper and lower levels and use them for representing things x is in terms of this now what we can do is now i want to is import another layer and another shape file on obviously so what we're going to do is avoid doing it again and again we just copy whole including these we can copy the whole set bring it old and then press fold and then sorry and then it will here appear okay so once we have here the whole shape file what we will do is use we need to replace the file so now we're gonna reset one different existing file um i'm going to data i have these and then we're going into the catalog and i want to now represent these perhaps um uh the features of interest which are points but i want to do something more interesting maybe okay i i can go to them um cadastral okay which is basically the a lot or parcel um size um uh polygons okay so we go to cadastral and then we choose the shade file again which is this one here open so we don't see anything because um we need to turn on this so we have it here you get an alert which is the zero length segments are collapsed so there are problems here with the polylines of course what you can do is do again their data tree cleaning etc but use now to save time i'm just showing you as you can see they were important in at different the sort of geographic locations even though the boundaries have been defined because the origin for this particularly particular component is different and for the other one so that's why we use the translation vector we're going to translate this vector or this origin into the other one and we click block it there and now they are overlapping okay so now we can you do again what i i i show you before the representation with the suave etc but then i want to do something more interesting in this case which is um i want you to displace one of these um holy lines or the cadastral on top of the existing create a stack exploded axonometric of this um of this um plan so what we're gonna do is just it's kind of creating an exploded axonometric it's a stack of different layers so how to do that very simple what we're gonna do now is just gonna use a move component okay um we have the geometry that we want to move okay that's very clear is the polyline and what we're gonna do is we need a unit set vector but that will be the direction of our motion and then we need a factor so here we can do something for example we can displace it 1400 meters and just connect the factor there um turn on disable these representations and then what you can see here we just displace it um the specific amount but you can see it increases or decreases and you are displacing the whole geometry in a direction so you can create um you can export this axonometric view in another in as a jpeg or as um as a line word for adobe illustrator for example well that's not the case we want to do is also you can move it um together as a factor of the other one of the other layer so to do that you you have to do the same we have to create a geometry okay we connect geometry from the polyline we have another unique factor and we connect and we disconnect this okay so once we have this unit that this is the this unit one the geometry and unit set what we can do here is basically connect the factor again to this one okay so it's moving again well we can put it in zero for now or in another value now this is the geometry we want to move okay so so we connect this geometry um sorry this geometry this is the one that we want to move we want to move also there so these edges instead of using these three connected from here they will be connected from here okay oh sorry sorry what we have to do is disconnect geometry because this geometry it contains the negative values so let me just move all of these together here and what we need to do is connect the three and that is the tree that we are just replacing these and connected to the edges okay so now when i move this it will stay it moves the m initial layer but now we want to move the other one um as a factor of the previous one so what we need to do is do something like multiplication okay multiplication so what we're gonna do is we're gonna multiply and let's imagine we're gonna multiply a factor of four and that's will be here and then we're gonna connect this uh from this value sorry um here and the result of this thing so this will be four times that is this distance and that it is what it's gonna move this geometry as a factor rather than the other one so as soon as we move this as you can see the other one will displace four times the distance of of the displacement of the of the displacement of the um initial layer or we can set up like at the double so anytime we move this ability in 3000 meters this distance will be times the dimension that we establish as a distance so this can help to create um various um multiple layers at the same time okay so it's very useful as well for stacking layers one on top of each other and we can color them etc so that it's another way to represent shape files and then you can bake the colors and you can make the polygons and you can make the lines and so on um maybe what i can do is just to copy this unlock or disconnect these and then use these for the geometry and turn on this so you see the geometry and then we can change the color and any color you want and then so you have this sort of stacked version or of layers which is very interesting to them so this is in terms of connecting one layer and you can start adding more layers later well that's all for today and i hope you have enjoyed um a tutorial and if you find it useful and i will prepare other tutorial with how to import openstreetmap information so please stay tuned thank you very much bye
Info
Channel: Carlos Bartesaghi Koc, PhD
Views: 3,864
Rating: 5 out of 5
Keywords: Grasshopper, Urbano, Rhino, GIS, SHP, Shapefiles, OSM, Open Street map
Id: 3dibmohx1Wo
Channel Id: undefined
Length: 38min 13sec (2293 seconds)
Published: Wed Mar 03 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.