a product message image
{' '} {' '}
Limited time offer
SAVE % on your upgrade

Page 1

GIS SERIAL GUIDANCE Volume 1

Google Maps API 3D Ripper DX ELK for Grasshopper, Rhinoceros Heron for Grasshopper, Rhinoceros Meerkat GIS for Grasshoper, Rhinoceros

Cover Image From Google Engine


WARNING $ This guide is for non-commercial purposes. You are free to copy, distribute, transmit, or adapt the work so long as you attribute the work to the author. You may not use this work for commercial purposes.

2


PREFACE Nowadays, there are so many ways approach GIS Data. This guide cannot load all the knowledge of GIS, but it might be the starting point for people who work or study in the Architecture or Urban Planning industry. This guide is about the workflow to capture the GIS Data and manipulate the results to dedicate to your projects. This tutorial will show several ways to extract GIS Data through authorized GIS databases. Some of them are open source, some are not. For those of you who use them for commercial purposes, choose the sources carefully and legally. The authors are not responsible for any sources which are referred to in this guidance. The authors will not take any responsibility for those users who use it in an illegal manner. Hope you can enjoy this tutorial. You If you have any questions, please feel free to contact us through our website: www.ling.world

--- ling

3


ACKNOWLEDGEMENTS There are lots of organizations and persons dedicated to GIS data collection and operation so we cannot list them here one by one. The authors of this guide respect those people who make generous efforts to make the data easier to approach. We would especially like to thank OpenStreetMap, founded by Steve Coast. OpenStreetMap (OSM) is a collaborative project designed to create a free editable map of the world. It allows us to collect data using manual survey, GPS devices, aerial photography, and other free sources. This crowd-sourced data is then made available under the Open Database License. OpenStreetMap is supported by the OpenStreetMap Foundation, a non-profit organization registered in England. We would also like to thank ELKdesigntech, who makes it possible to bring data from OpenStreetMap to three dimensional modeling space, originally Rhinoceros through Grasshopper plug-in. ELKdesigntech designed an extremely simple interface to allow users to manipulate GIS data without a lot of effort. Through Heron for Grasshopper, Rhinoceros enables the import of GIS data from various sources into the Rhino/Grasshopper environment, located, scaled and cropped based on an Earth Anchor Point and a clipping polygon. The authors thank Brian Washburn, the developer of Heron, who has made critical contributions to allow users to easily bring GIS data into three dimensional interface. Finally, we are not native English speaker, so we appreciate our friend Jarrod Lopatka for looking through this guide to improve the quality of the words.

4


WHAT is GIS A geographic information system (GIS) is a system designed to capture, store, manipulate, analyze, manage, and present all types of spatial or geographical data. The first known use of the term “geographic information system” was by Roger Tomlinson in the year 1968 in his paper “A Geographic Information System for Regional Planning”. Tomlinson is also acknowledged as the “father of GIS”. Modern GIS technologies use digital information, for which various digitized data creation methods are used. The most common method of data creation is digitization, where a hard copy map or survey plan is transferred into a digital medium through the use of a CAD program and geo-referencing capabilities. With the wide availability of ortho-rectified imagery (both from satellite and aerial sources), heads-up digitizing is becoming the main avenue through which geographic data is extracted. Heads-up digitizing involves the tracing of geographic data directly on top of the aerial imagery instead of by the traditional method of tracing the geographic form on a separate digitizing tablet (heads-down digitizing). GIS uses spatio-temporal (space-time) location as the key index variable for all other information. Just as a relational database containing text or numbers can relate many different tables using common key index variables, GIS can relate otherwise unrelated information by using location as the key index variable. The key is the location and/or extent in space-time. Any variable that can be located spatially, and increasingly also temporally, can be referenced using a GIS. Locations or extents in Earth space–time may be recorded as dates/times of occurrence, and x, y, and z coordinates representing, longitude, latitude, and elevation, respectively. These GIS coordinates may represent other quantified systems of temporo-spatial reference (for example, film frame number, stream gage station, highway mile-marker, surveyor benchmark, building address, street intersection, entrance gate, water depth sounding, POS or CAD drawing origin/units). Units applied to recorded temporal-spatial data can vary widely (even when using exactly the same data, see map projections), but all Earth-based spatial–temporal location and extent references should, ideally, be relatable to one another and ultimately to a “real” physical location or extent in space–time. Related by accurate spatial information, an incredible variety of real-world and projected past or future data can be analyzed, interpreted and represented. This key characteristic of GIS has begun to open new avenues of scientific inquiry into behaviors and patterns of real-world information that previously had not been systematically correlated. -taken from GIS Wikipedia

5


TABLE OF CONTENTS Warning Preface Acknowledgements What is GIS?

2 3 4 5

1. Google Maps API Styled Map Wizard •1.1 What is Google Maps API? •1.2 Stylize Google Maps •1.3 Generate and edit JSON code •1.4 Save as a high resolution JPEG file •1.5 Create CAD map from Google Maps

7 7 8 15 19 21

2. 3D Ripper DX •2.1 What is 3D Ripper DX? •2.2 Preparations •2.3 Capture geometries from Google Earth •2.4 Import model to 3Ds Max •2.5 Modify the scale of the model in 3Ds Max •2.6 Export to other software

25 25 25 27 29 31 33

3. ELK for Grasshopper •3.1 Introduction and Installation of ELK •3.2 Introduction of components of ELK •3.3 Operation of ELK components

34 34 35 36

4. Heron for Grasshopper •4.1 Introduction and Installation of Heron •4.2 Introduction of components of Heron •4.3 Operation of Heron components

45 45 46 47

5. Meerkat for Grasshopper •5.1 Introduction and Installation of Meerkat •5.2 Introduction of components of Meerkat •5.3 Operation of Meerkat components

52 52 52 53

6


Google Maps API Styled MapWizard 1.1 What is Google Maps API?

Shot from Google Developers

As we all know, Google does not open the source of Google Maps. But, by using the Google Maps API, it is possible to embed Google Maps into an external website, on to which site specific data can be overlaid. Over 1,000,000 web sites use the Google Maps API, making it the most heavily used web application development API.

Shot from Google Developers

The Google Maps API uses JavaScript along with simple coding, allowing users to call maps from the Google server. In this chapter we will introduce the whole process using Google Maps API for making personal styled maps, simple GIS map diagrams, and vectorizing Google maps into CAD maps. As I mentioned above, the methodology involves JavaScript code. But do not hesitate if you’ve never wrote a code. Simply follow the steps, and you will make it!

1.1 What is Google Maps API?

7


Google Maps API Styled MapWizard 1.2 Stylize Google Maps

Shot from Google Developers

First of all, we will begin with the process about how to stylize your own maps. Google Maps API styled map wizard will do you the favor of modifying the map with layers and features and generating the API code based upon settings of your preference. Interface â—? Connect to the Internet â—? Launch the Explorer with the address below. http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html

1.2 Stylize Google Maps

8


Google Maps API Styled MapWizard There are only two control panels used to modify the maps. Feature and Element Selector Feature Type Feature type window allows you to select the features based upon categories, including roads, water, landscape, building, etc. Element Type In the element type window, you can select either geometry or labels of the features you selected above. Visibility In this window, you are able to turn on or off and simplify the features and elements you selected.

Modification This window allows you to modify the color of features and elements in either RGB mode or HUE mode and also adjust the stroke weight.

Note: The RGB mode does not work very well sometimes, so I recommend using the HUE mode for modifying the color.

Map Style Layers

Add a new layer for selecting and modifying the features and elements A layer shows the settings you made. Press button to delete the layer.

This button allows you to generate the JavaScript code based upon your settings. 1.2 Stylize Google Maps

9


Google Maps API Styled MapWizard Taking Boston,MA as an example here, we will follow the steps to make a road pattern diagram.

You can locate your map either by zooming in or typing the address in search panel on top-right corner of your screen. The Google map turns on all the features and elements as the default map. But, what we are trying to show is just the road pattern. So in this case, instead of turning off the other features one by one, it is easier to start from a blank map and just turn on the road features.

Make sure you select all features and elements type. Check the information in the layer Turn off all features and elements

1.2 Stylize Google Maps

10


Google Maps API Styled MapWizard

1. Press button to create a new layer. You are not able to turn on the roads on the first layer, because we already applied the turn off function in the visibility for all features and elements. 2. Select the Road > Highway category first in feature type window. 3. Select Geometry > Fill in element type window, because we do not want to show the labels and stroke lines of the roads. 4. Turn on the visibility to show the highways. 5. Arrange the color in HUE control window based upon your preference.

In same way, you could also turn on the arterial road. Try 1.2 Stylize Google Maps

to modify the stroke of the roads. 11


Google Maps API Styled MapWizard

We should turn on the water to clarify the figure of the land.

Finally, turn on the labels of the land to complete the road pattern diagram.

1.2 Stylize Google Maps

12


Google Maps API Styled MapWizard Google Maps API styled map wizard is quite simple to use, all the features and elements are well-organized. You can play with every single feature and element to make your own map or diagram. Here are some maps as examples to show how much you can do with Google Maps API styled map wizard.

State divisions of US.

Highway connections of East Coast, US.

1.2 Stylize Google Maps

13


Google Maps API Styled MapWizard

Building Figures of Manhattan, US.

Points of Interest of 5th Ave, Manhattan, US.

1.2 Stylize Google Maps

14


Google Maps API Styled MapWizard 1.3 Generate and edit JSON code JSON stands for JavaScript Object Notation and is an open standard format that uses human-readable text to transmit data objects. The reason we generate JSON code in this chapter is because we can customize the size of map and save out a high resolution image for the later purpose. For generating JSON code based upon your styled map simply press --------- button. Then, a new window will pop up like the one showing on the left that contains all the information based on your settings. We will keep this code for later use.

Keep in mind that this is not a complete JavaScript code for exploration. The integral JavaScript contains information of the server address, coordination of latitude and longitude, size of canvas, map options, etc. Fortunately, Google developers website offers a lot of sample codes, so that we could simply adjust it as our own code. Go to Google Developers to find your own sample code. https://developers.google.com/maps/documentation/javascript/examples/

Shot from Google Developers

1.3 Generate and edit JSON code

15


Google Maps API Styled MapWizard In this Chapter, we will use a Simple Styled maps sample. Click Simple Styled maps in Styles category, or go directly to the address below.

Shot from Google Developers

https://developers.google.com/maps/documentation/javascript/examples/maptype-styled-simple

Shot from Google Developers

Google Developers offers two kinds of scripts, one is purely JavaScript and the other is JavaScript HTML code. In this case we will make a HTML format file to explore the map and save it as an image. 1. Press the button on the website for getting the sample code you need. 2. Copy the code to Notepad . 3. Edit the sample code based upon your preferences (see next page). 4. File > Save as, save your notepad as name.html format (shown below).

1.3 Generate and edit JSON code

16


Google Maps API Styled MapWizard Note: Do not be nervous about these long codes, what you need to look at are the red

<!DOCTYPE html> boxes. <html> <head> <title>Simple styled maps</title> <style> This applies to the size of your canvas. For customizing html, body, #map-canvas { the size, edit like this. You will get 8000 x 8000 resolution width: 8000px; height: 100%; height: 8000px; (Maximum) image in explorer. You could also make the margin: 0px; padding: 0px numbers smaller. } </style> <script src=”https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true”></script> <script> var map; Here you need to provide coordination of latitude and var brooklyn = new google.maps.LatLng( 40.6743890, -73.9455 );

longitude. You could find the latitude and longitude from Google Maps. • Right click on the website page. • Click “What’s here?” • The little pop-up window will show the info.

var MY_MAPTYPE_ID = ‘custom_style’; function initialize() { var featureOpts = [ { stylers: [ { hue: ‘#890000’ }, { visibility: ‘simplified’ }, { gamma: 0.5 }, { weight: 0.5 } ] }, { elementType: ‘labels’, stylers: [ { visibility: ‘off’ } ] }, { featureType: ‘water’, stylers: [ { color: ‘#890000’ } ] } ] ;

Shot from Google Maps

Most importantly, you have to overwrite this feature options code into the JSON code you get from the Google Maps API styled map wizard in the earlier page.

var mapOptions = { Last, adjust the zoom scale of zoom: 12 , the map (20 is maximum). center: brooklyn, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.ROADMAP, MY_MAPTYPE_ID] }, mapTypeId: MY_MAPTYPE_ID }; map = new google.maps.Map(document.getElementById(‘map-canvas’), mapOptions);

Note: Do not miss any sign of aggregation, comma, semecolon, etc.

var styledMapOptions = { name: ‘Custom Style’ }; var customMapType = new google.maps.StyledMapType(featureOpts, styledMapOptions); }

map.mapTypes.set(MY_MAPTYPE_ID, customMapType);

google.maps.event.addDomListener(window, ‘load’, initialize); </script> </head> <body> <div id=”map-canvas”></div> </body> </html>

1.3 Generate and edit JSON code

17


Google Maps API Styled MapWizard

<!DOCTYPE html> <html> <head> <title>Simple styled maps</title> <style> html, body, #map-canvas { width:8000px; height: 8000px; margin: 0px; padding: 0px } </style> <script src=”https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true”></script> <script> var map; var brooklyn = new google.maps.LatLng( 40.730455, -73.998218 ); var MY_MAPTYPE_ID = ‘custom_style’; function initialize() { var featureOpts = [ { “stylers”: [ { “visibility”: “off” } ] },{ “featureType”: “road.arterial”, “elementType”: “geometry.fill”, “stylers”: [ { “visibility”: “on” }, { “color”: “#808080” }, { “lightness”: 48 } ] },{ “featureType”: “road.local”, “elementType”: “geometry.fill”, “stylers”: [ { “visibility”: “on” } ] } ]; var mapOptions = { zoom: 16 , center: brooklyn, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.ROADMAP, MY_MAPTYPE_ID] }, mapTypeId: MY_MAPTYPE_ID }; map = new google.maps.Map(document.getElementById(‘map-canvas’), mapOptions); var styledMapOptions = { name: ‘Custom Style’ }; var customMapType = new google.maps.StyledMapType(featureOpts, styledMapOptions); }

map.mapTypes.set(MY_MAPTYPE_ID, customMapType);

google.maps.event.addDomListener(window, ‘load’, initialize); </script> </head> <body> <div id=”map-canvas”></div> </body> </html>

Complete your code like this 1.3 Generate and edit JSON code

18


Google Maps API Styled MapWizard Open the HTML file you saved from notepad with Explorer (Firefox is recommended for later use). After a few seconds loading, you are able to use the scroll bar to preview your high resolution map.

1.4 Save as a high resolution JPEG file For saving as a high resolution JPEG file, I would like to introduce the Screengrab add-on for Firefox explorer. The Screengrab add-on allows you to grab the entire page frame, saving your full web page as a JPEG file regardless if it extends past the visibility of your screen. ● Download and install Firefox and Screengrab. Firefox: https://www.mozilla.org/en-US/firefox/new/?src=amo Screengrab : https://addons.mozilla.org/en-US/firefox/addon/screengrab/

Firefox with Screengrab

● Open your HTML file with Firefox. ● Do not use pan to move or scroll for zooming your map. ● Make sure your screen is 100% Extended, otherwise it will not grab full resolution.

1.4 Save as a high resolution JPEG file

19


Google Maps API Styled MapWizard â&#x2014;? Screengrab > save > Complete Page/Frame.

8000x8000 resolution map 1.4 Save as a high resolution JPEG file

20


Google Maps API Styled MapWizard 1.5 Create CAD map from Google Maps In this chapter, we will use high resolution Google Maps to create CAD maps. First, we have to create the map features separately before making the CAD layers. For now, we will create building layer, water layer, and several road layers. Below is my Setting codes for HTML files. (Manhattan, US) ● Basic Settings (Same for all files) Size Longitude and Latitude Zoom Scale

width:8000px; height: 8000px; (40.730455, -73.998218); zoom: 18,

● JSON code Building [

{

“stylers”: [ { “visibility”: “off” } ] },{ “featureType”: “landscape.man_made”, “elementType”: “geometry”, “stylers”: [ { “visibility”: “on” } ] } ]

Water [

{

“stylers”: [ { “visibility”: “off” } ] },{ “featureType”: “water”, “elementType”: “geometry.fill”, “stylers”: [ { “visibility”: “on” }, { “color”: “#808080” } ] } ]

Highway [

{

Arterial Road [

“stylers”: [ { “visibility”: “off” } ] },{ “featureType”: “road. highway”, “elementType”: “geometry.fill”, “stylers”: [ { “visibility”: “on” }, { “color”: “#808080” }, { “saturation”: -100 }, { “lightness”: -100 } ] } ]

{

“stylers”: [ { “visibility”: “off” } ] },{ “featureType”: “road. arterial”, “elementType”: “geometry.fill”, “stylers”: [ { “visibility”: “on” }, { “color”: “#808080” }, { “saturation”: -100 }, { “lightness”: -100 } ] } ]

Local Road [

{

“stylers”: [ { “visibility”: “off” } ] },{ “featureType”: “road. local”, “elementType”: “geometry.fill”, “stylers”: [ { “visibility”: “on” }, { “color”: “#808080” }, { “saturation”: -100 }, { “lightness”: -100 } ] } ]

● 8000x8000 High resolution JPEG file

For these files, we can use Adobe Photoshop and Adobe Illustrator to generate Vector files from these JPEGs.

1.5 Create CAD map from Goolge Maps

21


Google Maps API Styled MapWizard We will take the Local Road image as an example to vectorize into CAD map. First, we will start with Photoshop to create paths.

● Use Magic Wand Tool

to select the background. Check the setting of Magic Wand Tool

● Inverse the selection to select roads. Select > Inverse or Shift + Ctrl +I

● Turn on the Paths panel. Window > Paths

1.5 Create CAD map from Goolge Maps

22


Google Maps API Styled MapWizard ● Click the button to make work path. The range of tolerance rate is from 0.5 to 1, higher number means more smooth. Here I use 0.8 as my preference.

● Export work path to Illustrator. File > Export > Paths to Illustrator

● Open the Illustrator file and export to DWG file. File > Export

1.5 Create CAD map from Goolge Maps

23


Google Maps API Styled MapWizard Apply the same instructions for the other four JPEGs, and combine all the DWG file into one based on same origin point.

.html

.jpg

.ai

.dwg

This workflow generates vector files from JPEGs, and the lines are not perfect. But, this method of making maps still helps a lot in the initial process of projects.

1.5 Create CAD map from Goolge Maps

24


3D Ripper DX 2.1 What is 3D Ripper DX? 3D Ripper DX is a software that allows users to capture 3D models from rendered frame for exporting them to Autodesk 3D Studio Max or Maya. In the following chapters of this tutorial we will take advantage of 3D Ripper DX to bring 3D Builidngs from Google Earth to 3Ds Max, and eventually utilize them for many other 3D modeling software.

Google Earth

3Ds Max

2.2 Preparations ● ● ●

Install earlier version of Google Earth. Install 3D Ripper DX. Install 3Ds Max. (support versions of 5.0-9.0, 2009, 2000, 2011)

In this tutorial, I will use Windows8.1, Google Earth v6.2 free version, 3D Ripper DX 1.8.2, 3Ds Max 2009. Download earlier version of Google Earth. https://support.google.com/earth/answer/168344?hl=en

Shot from Google Earth Support 2.1 What is 3D Ripper DX?

25


3D Ripper DX Install Google Earth and set graphics mode as DirectX (Tools > Options > 3D View > DirectX).

Note: 3D Ripper DX supports only DirectX 6.x, 8.x and 9.x applications.

Download latest version of 3D Ripper DX. http://www.deep-shadows.com/hax/3DRipperDX.htm

Shot from 3D Ripper DX website

Install 3D Ripper DX. (While going through the step of the 3DR import page, check the box that corresponds to the 3Ds Max version you will use and indicate the file location)

2.2 Preparations

26


3D Ripper DX 2.3 Capture geometries from Google Earth Open the 3D Ripper DX

and check the settings of 3D Ripper DX

Most importantly, you have to locate the googleearth.exe file.

These two check box allows you to capture not only the geometry, but also the textures. You are able to customize the capture key, which you can use for capturing Models through Google Earth. These are the output file locations, set them as a one location.

Close Google Earth and press the

button to launch Google Earth through 3D Ripper DX.

Note: Notice the top left corner of the Google Earth window, once 2.3 Capture geometries from Google Earth

appears, the operations works correctly. 27


3D Ripper DX We will take Boston as an example to go through the process. ● Zoom in to the exact location you want and wait for a minute for while the 3D buildings load. If the 3D model doesn’t show up, you have to check the box for the 3D buildings in the layers window.

Orbit the model to top view and press “N” button to place the north to top.

Note: Do not zoom too far away from ground, 2-3 blocks in vertical direction is preferable. Otherwise, the captured model will be a little jagged.

● Once you are ready, press “F12”, which we set up in 3D Ripper DX options. If it works the processing message shown below will appear on top left corner of the screen. If it does not appear, you have to pan around or zoom in or out a little bit, then try again until the message shows up.

2.3 Capture geometries from Google Earth

28


3D Ripper DX 2.4 Import model to 3Ds Max When the process works, you can find the file in the location that you set earlier in the 3D Ripper DX options. But, in some cases the file does not show up. Then, you have to look at the Document folder. C:\Users\“your user name”\Documents\3DReaperDX\Frames

● Open the 3Ds Max and import .3dr format file. File > Import

Set import options.

Most importantly, you have to correct the FOV and Monitor aspect ratio.

FOV FOV stands for field of view. In this option we have to put the FOV of Google Earth. Human vision is roughly 180 degrees of FOV. Google Earth uses 60 degrees of FOV in the horizontal direction. Therefore, we will use 60 and for width in the FOV option. Monitor aspect ratio This is the ratio of the pixels of screen you captured. The Monitor aspect ratio equals the horizontal pixels divided by the vertical pixels. (More instruction below) ● Then, you have to check off the boxes to keep your captured model from Google Earth because they are too small when you import.

How to calculate monitor aspect ratio The easiest way to get the information of pixels is to simply press the PrintScreen

button on your keyboard.

Then create a new page in Photoshop and paste it. Crop

the useless boundary to the window you previewed in Google Earth.

Then check the image size. Image > Image size or Alt+Ctrl+I

2.4 Import model to 3Ds Max

29


3D Ripper DX

Crop the boundary

In my case, the Width is 1842 pixels and the Height is 1011 pixels. Hence,

Monitor aspect ratio =

1842 1011

= 1.82

Therefore, the settings come like this. You can check the boxes like I did here to avoid 3Ds Max automatically removing your models.

2.4 Import model to 3Ds Max

30


3D Ripper DX 2.5 Modify the scale of the model in 3Ds Max As I said earlier, the geometries that are imported are too small to see, and the scale is wrong. You have to size up by a certain scale to correct the size. ●

Press “Select by Name” button.

Select all geometries in the scene.

Group all Geometries. Group > Group

Right click the “Uniform Scale”.

Type 638700 scale factor in “Offset: World” blank. 638700 is the scale factor to size up into real-life size.

2.5 Modify the scale of the model in 3Ds Max

31


3D Ripper DX ●

Right click “Rotate”.

Type -90 in “Offset: World” to correct the position.

The texture doesn’t always map correctly. After all this is brute way to extract models from Google Earth, and we could not expect so much. However, the geometries are really decent. Happy mapping!

2.5 Modify the scale of the model in 3Ds Max

32


3D Ripper DX 2.6 Export to other software The file type that I use to export is normally .3ds format. Hence, I will not show one by one how to use it for other 3D modeling software, but below are examples of the massing in Sketchup and Rhino.

Import to Skethup

Import to Rhinoceros 2.6 Export to other software

33


ELK for Grasshopper 3.1 Introduction and Installation of ELK Introduction ELK is one of the Plug-ins for Grasshopper to generate maps and topographical surfaces using open source data from OpenStreetMap.org, and Shuttle Radar Topography Mission (SRTM) data from USGS. To see more go to: http://www.food4rhino.com/project/elk?ufh In these tutorials, we assume that users have a basic idea of Grasshopper (the visible coding plug-in for Rhinoceros) because we will focus on one of its plug-ins, ELK. Installation â&#x2014;? Go to Food4Rhino website and download the latest version of ELK at: http://www.food4rhino.com/project/elk?ufh

â&#x2014;?

Open Grasshopper and drag to the Component folder. File > Special Folders > Components Folder

3.1 Introduction and Installation of ELK

34


ELK for Grasshopper 3.2 Introduction of components of ELK There are only 8 components to learn in ELK, and it is quite simple to operate. The Basic logic of its operation is shown below.

STRM Data

Topography

Highways

Major Roads

Minor Roads

.osm Data

Railways

Waterways

Any Features

3.2 Introduction and Installation of ELK

35


ELK for Grasshopper 3.3 Operation of ELK components In this chapter, we will make a map of Boston using ELK. ● Location The Location component collects data from outside of Grasshopper and feeds it to the other ELK mapping components.

.osm Data

OSM points XML data

outputs to the other ELK componets

Longitude (Lo) and Latitude (La). OpenStreetMap (OSM) OpenStreetMap is an open source website for creating a free editable map of any location in the world. You can get the vector information for your map from OpenStreetMap and utilize the linework in any available interface. Get .osm file from OpenStreetMap 1. Go to website: http://www.openstreetmap.org/ 2. Press “Export” button shown on top of the web page to bring up the side panel.

3. Then, you can press “Export” in the side panel to export the map previews in the web page.

The map you exported will be located at this longitude and latitude.

4. Or, you can customize the boundary of the map you are going to export by selecting “Manually select a different area”. (Here, we take Boston as an example)

3.3 Operation of ELK components

36


ELK for Grasshopper

4. Once you are ready, press

.

This is the file you will utilize for ELK.

5. Right click

component to set the file path of map.osm.

3.3 Operation of ELK components

37


ELK for Grasshopper ●

Highways

OSM points required from “Location” component XML data required from “Location” component Collection type (points and ways as default) OSM data defines features as points. Most points are able to connect into curves as roads, some just appear as points. This input allows you to select the type of features you are going to output. 0 = Points and ways, 1 = Only ways, 2 = Only points. Normally, I leave it at the default settings.

Use “PolyLine(Pl)”

Point clouds of Motorways Point clouds of Motorway Links Point clouds of Trunks Point clouds of Trunk Links Feature Key, features information contained in the output; in this case the road name will be included.

component to make the points into lines (roads).

3.3 Operation of ELK components

38


ELK for Grasshopper ● Major Roads, Minor Roads, Railways, Waterways These features are similar to the “Highways” component, so you can follow the same operation for exporting these layers. For further help with each output, use the “Help” file by right clicking each component.

3.3 Operation of ELK components

39


ELK for Grasshopper By using “Custom Preview”

and “Color Swatch”

we can differentiate the features into different colors.

● GenericOSM (GenOSM) This component acts like a master key and allows users to customize the feature types before outputting the map. OSM points required from “Location” component XML data required from “Location” component Feature Key Feature Value Collection type (points and ways as default)

Feature points Feature Key, feature information contained in the output.

Go to website to find your feature types: http://wiki.openstreetmap.org/wiki/Map_Features

3.3 Operation of ELK components

40


ELK for Grasshopper

Feature Value Feature Key

Contents

As an example, we will map all the buildings.

Note: Because this map does not contain detailed information, most values are not defined. In this case, we will leave â&#x20AC;&#x153;Feature Valueâ&#x20AC;? as a blank to show all the buildings. 3.3 Operation of ELK components

41


ELK for Grasshopper â&#x2014;? SRTMTopo (sTopo) SRTMTopo component allows users to create topography by using SRTM data (Shuttle Radar Topography Mission) from USGS. .hgt file (SRTM data) Latitude domain Longitude domain

Topographical points organized by latitude row Latitudinal curves Topographical surface from points

Get .hgt file (SRTM data) from USGS website 1. Go to website below: http://dds.cr.usgs.gov/srtm/

Select the latest version of SRTM data 2. Select the file based on the location of your map.

SRTM data

SRTM data is distributed in two levels: SRTM1 (for the U.S. and its territories and possessions) with data sampled at one arc-second intervals in latitude and longitude, and SRTM3 (for the world) sampled at three arc-seconds. Three arc-second data is generated by averaging a three by three chart of the one arc-second samples.

More information from http://dds.cr.usgs.gov/srtm/version2_1/Documentation/SRTM_Topo.pdf http://dds.cr.usgs.gov/srtm/version2_1/Documentation/Quickstart.pdf

3.3 Operation of ELK components

42


ELK for Grasshopper Continuing with the example of Boston, we can use SRTM1 (for the U.S. and its territories and possessions).

Check the definition of regions

Obviously, Boston is located in Region 06. Also, you have to check the latitude and longitude of Boston. In this case, we can get the information from the Location Component of ELK.

Longitude 71.086° W ~ 71.0468° W Latitude 42.351° N ~ 42.3716° N

SRTM data comes in 1°x1° and is identified by the lower left corner of the tile. Longitudes in the east hemisphere are typically represented by positive numbers that increase as you move east (left to right). If you replace the positive/negative to indicate east/west by using the letters E or W, the numbers in the western hemisphere tend to increase from right to left, so the N42W072 tile is the right one to use since it goes from 42-43 latitude and -72 to -71 longitude. Explain by ELKdesigntech

43°N N42W073 N42W072 42°N

Boston

N41W073 N41W072 41°N 73°W

72°W

3.3 Operation of ELK components

71°W

43


ELK for Grasshopper Therefore, go to find N42W072.hgt.zip from the list. Download it and unzip the file. Now you are ready for creating topography with ELK.

3. Create topography using ELK.

Because the SRTM data we got from USGS is just 1 arc-second, the topography is not very detailed. (You can get more detailed topography with the GIS plug-in for Grasshopper which I will introduce in a later chapter.)

3.3 Operation of ELK components

44


Heron for Grasshopper 4.1 Introduction and Installation of Heron Introduction Heron is a plug-in for Grasshopper which allows users to import GIS data from various sources to the Rhinoceros interface. It also enables users to locate the map with latitude and longitude coordinates inputted through an Earth Anchor Point and a clipping polygon. Heron supports many sources of GIS data including Shapefiles, USGS IMG/HGT Elevation files, and ArcGIS REST Services. To see more information go to website: http:// www.food4rhino.com/project/heron?ufh Actually, the example file provided by Heron is well organized. Advanced users can operate with the instructions in example file only. This tutorial just acts to assist with instruction. Installation â&#x2014;? Go to Food4Rhino website and download Heron: http://www.food4rhino.com/project/heron?ufh

â&#x2014;? Run Grasshopper and extract all files to the Components Folder. File > Special Folders > Components Folder

4.1 Introduction and Installation of Heron

45


Heron for Grasshopper â&#x2014;? To open the example file, you must first install Human and Weaverbird for Grasshopper. The steps for installing Heron can be repeated for installing Human and Weaverbird.

Download Human for Grasshopper: http://www.food4rhino.com/project/human?ufh Download Weaverbird for Grasshopper: http://www.giuliopiacentino.com/weaverbird/ 4.2 Introduction of Components of Heron Only 8 components are contained in Heron and they allow users to get the GIS data in many different ways. The components currently assume input/output units is Meters.

GIS REST

GIS Tools

Geolocate and Earth Anchor Point

JPEGs of imagery

Data from .shp file

Topography

Vector data from ArcGIS REST services

4.2 Introduction of components of Heron

46


Heron for Grasshopper 4.3 Operation of Heron components In this chapter, we will take Boston as an example. â&#x2014;?

Geolocate and Earth Anchor Point

ESRI REST Service Geocode We can simply type in the Geocode or Point-of-Interest in the input of component for getting the actual coordination over the world.

In many series of address, find the exact one which is in {0} branch of data tree. Set EarthAnchorPoint Runs a macro to set the Earth Anchor Point in Rhino. This is important to minimize distortion translating from the curved surface of the Earth to Euclidean coordinates.

4.3 Operation of Heron components

Decimal Degrees to XY Convert Decimal Degrees to XY coordinates through Rhino interface based on the EarthAnchorPoint.

47


Heron for Grasshopper â&#x2014;?

JPEGs of imagery

Get REST Raster Grabs JPEGs of imagery from the specified web source. Once downloaded to a folder the image can be located and scaled to match the boundary in real world units (meters) with the use of the image frame.

Boundary curve(s) for imagery Resolution for imagery (max.4096) File location for downloading image File name for the downloaded image ArcGIS REST service website Set true for downloading image

File location of downloaded image Bounding box of image for mapping to geometry URL address for image

Image frame for output

4096 px

Boundary of imagery for input

4096 px

If you install Human, there will be series of URL resources in the example file available for grabbing map imagery.

The point which was converted by the longitude and latitude of address you typed in earlier. This point help to locate the boundary of your map.

You can also have the multiple boundaries.

4.3 Operation of Heron components

48


Heron for Grasshopper â&#x2014;?

Vector data from ArcGIS REST services

Get REST Service Layers Discover data layers from various data sources on the web. If the layers are a vector type, they return data similar to a shapefile, with geometry and associated data fields. To be used with the Get REST Vector or Get REST Raster component depending on the data type.

Again, you can find these URL resources in the example file. You can also visit the address below to explore more maps over ArcGIS REST service. http://tigerweb.geo.census.gov/arcgis/rest/services http://services.arcgisonline.com/arcgis/rest/services

The layers of the map and the corresponding URL index for each layer. Get REST Vector Queries the web source for geometry and associated data fields. For instance, primary roads can be referenced as sets of points. The layer of Primary Roads will input to the URL.

The URL index of the layer of Primary Roads.

Try to explore the other layers of the Physical Features. 4.3 Operation of Heron components

49


Heron for Grasshopper The output of this component not only gives you the feature points, but also gives you lots of important information which expresses property of each feature point groups. For instance, in the query of USA Population Density, you can get every track blocksâ&#x20AC;&#x2122; land area, total population and square feet per person, etc.

â&#x2014;?

Data from .shp file

Import SHP Imports Shapefiles using OGR Libraries. Output is in the form of points (for now) which can then be connected to form polylines. You can find the .shp file all over the website. Normally, I can just type in the Google engine and see what I can find. For instance, we can type in Boston building shape file for the building footprints in Boston. http://boston.maps.arcgis.com/home/item.html?id=c423eda7a64b49c98a9ebdf5a6b7e135

Fortunately, we got the height of buildings.

Download the .shp file and plug in to here.

Note: For Shapefiles with Multipolygons (i.e. building footprints with courtyards), the component reads multiple branches of points per Feature. To get the footprint, you will need to draw a polyline for each branch, trim the branches and use the Boundary Surfaces component. 4.3 Operation of Heron components

50


Heron for Grasshopper ●

Topography

Import Topo Imports IMG and (STRM) HGT files using GDAL Libraries. Output is in the form of a mesh. A source for IMG files in the United States is provided by USGS: ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/ There are three available resolutions 1, 1/3 and 1/9 arcsecond. Typically you can round up to the next highest Lat/Lon to find the relevant file. Lat: 42.351° N Lon:71.086° W Becomes: n43w72.zip (or ned19_n42x50_w71x25_ma_lftne_lot7_2011.zip for 1/9 arcsecond) A source for STRM HGT files which cover most of the globe topography can be found from USGS in 1 arcsecond and 3 arcsecond resolutions at: http://dds.cr.usgs.gov/srtm/version2_1/

File location for downloaded IMG or HGT file.

4.3 Operation of Heron components

51


Meerkat for Grasshopper 5.1 Introduction and Installation of Meerkat Introduction Meerkat is a set of tools to generate Grasshopper geometry from GIS shape files. GIS shape files can be batch â&#x20AC;&#x153;geolocated and croppedâ&#x20AC;? in a Google Maps browser. To see more information go to website: http://www.food4rhino.com/project/meerkatgis?ufh

Installation You can go to the Food4Rhino website then search for Meerkat to download the software. http://www.food4rhino.com/project/meerkatgis?ufh. Please follow the instructions on the website to install this tool to Grasshopper. After installation complete, open Grasshopper, then go to the Extra tab, and you will see all the components:

5.2 Introduction of components of Meerkat Basically, you will see it has four components. In this guidance we will focus on the two main components.

Import shapefile: Opens a dialog for loading and cropping shapefiles.

Parse Meerkat file: Access to MKGIS geometry and attribute from shapefile.

5.1 Introduction and Installation of Meerkat

52


Meerkat for Grasshopper 5.3 Operation of Meerkat components The components of this plugin are very simple and pretty straightforward. Thus, in this tutorial I will go through one example to show how it works. Then, you can play around with it to see further functions. So now, open a new Rhino file ,then open Grasshopper, and navigate to Extra > Import shapefile. Drag this component to the canvas. Also go to Params > Boolean Toggle, drag the component to the canvas too. Then connect the two components as below:

Double click the Toggle component to set it True. You will notice that a new window will pop up, which is called Meerkat Version 1.5 Beta (depends on what version you have). You will see the google map inside the window.

In this example we will create the buildings of downtown Los Angeles using shapefile. To download shapefile, go to website: http://egis3.lacounty.gov/dataportal/2011/04/28/countywide-building-outlines/ Once you have the shapefile, click the Add Shape File button to locate the shapefile. Then, you will notice there is a new file showing on the left side dialogue, and if you check the box, you will see the boundary of the shapefile is attached to the map as below:

5.3 Operation of Meerkat components

53


Meerkat for Grasshopper

Let’s try to build the downtown area of Los Angeles. Zoom into the downtown area of Los Angeles and click the rectangular icon on the top of the window to draw a boundary of the area you want. Then click the Crop Shape File(s) button to export the file to the local directory. Then click “ok.” You will notice it will generate a file and close the window.

5.3 Operation of Meerkat components

54


Meerkat for Grasshopper Next, go to Params > File path, and drag the component to the canvas. Right click the component then choose Set One File Path, and select the file you created earlier. Then, click â&#x20AC;&#x153;OK.â&#x20AC;?

Go to the Extra > Parse Meerkat file, and drag the main function component into the canvas. Link the input to the Path file. After a little while, you will see the points cluster in Rhino interface as below:

The shapefile itself contains all the data of building footprints and features. The building footprints are defined as points lists.

5.3 Operation of Meerkat components

55


Meerkat for Grasshopper Next, drag two panel components into the canvas, and connect them to Field Name and Field Value per Shape. If you look at the data carefully, you will notice that the values match each other. For instance, the [2] index in Field Names is HEIGHT, and [2] index in Field Values per Shape is 3.31300000000e+001, which means the height of this tree (a building) is 3.313 meters.

Now go to the Curve > Polyline and drag the Polyline component into the canvas. Link the input to the Geometry per Shape. Now you should see each building footprint showing in Rhino interface.

5.3 Operation of Meerkat components

56


Meerkat for Grasshopper Next step, we will use the building height data to build entire downtown area. To do this, we will use List Item component to extract the [3] index of each building tree which contains the data of the building height. Then, use the Move component to copy the polylines (building footprints) to the intended heights. Finally, use the Loft component to create the volume.

Go back to the Rhino interface, you will notice the entire downtown area is created.

This is the way of utilizing the shapefile to create the buildings in downtown Los Angeles. Now you can also use the shapefile to create the road or crime diagram into Rhino. Because the Meerkat is quite simple to use, we will omit the further process. We believe you are able to explore more with Meerkat after looking at this short guidance. 5.3 Operation of Meerkat components

57


cover image from Google Engine

Profile for Xingyun Jin

GIS SERIAL GUIDANCE_vol1_en  

Google Map API, 3D Ripper DX, ELK for Grasshopper, Heron for Grasshopper, Meerkat GIS for Grasshopper

GIS SERIAL GUIDANCE_vol1_en  

Google Map API, 3D Ripper DX, ELK for Grasshopper, Heron for Grasshopper, Meerkat GIS for Grasshopper

Profile for kimxy
Advertisement