Archive for the ‘Extensions’ Category

Doing network analysis

This is post #3 in a three part series. It is meant to be read after Creating a Network Dataset.

Now that we’ve done all the hard work building our network dataset, it is time to have some fun putting it to work. Most presentations would cover this part first to lure you in. I might have done things backwards. If I haven’t scared you away yet, and you’ve brought along a working network dataset, let’s explore what Network Analyst can do with it.

I will give examples of the first three Network Analyst tools: Route, Service Area and Closest Facility. Each of these revolve around facility locations paired with the network dataset. The City of Portland GIS Catalog doesn’t have a Points of Interest or Buildings layer, so I used ESRI Streetmap USA data for the point locations.

Route Tool

The Route solver finds the best path between any number of stops. Let’s pretend we are tourists who want to see a bunch of sites downtown and need some help planning our day so we’ll spend the least amount of time driving. I opened up ArcMap and added my new network dataset and the ESRI Recreational Areas point layer. Zooming to the Portland area shows 12 sites on both sides of the Willamette River.

Check on the Network Analyst toolbar, and then select New Route from the drop down menu. Also, click the button right next to the drop down menu to show the Network Analyst Window. You’ll be using it a lot.

The window will have a list of Stops, Routes and Barriers, all empty for now. The first step is to populate your list of stops. You can create stops manually by activating the Create Network Location Tool and clicking on the screen while your pointer is in the flag with crosshairs shape. Or, you can load them from another layer. That’s what we’re going to do. Select the 12 sites that you see on screen. (This step is important because you don’t want to be working with all the recreational areas in the entire USA. I skipped it the first time and proceeded to crash my computer). Once you’ve selected your subset, right click on Stops and select Load Locations…

It’ll grab their name from a name field if one exists, and nicely number them for you. Now click the Solve button. It’s generated a topsy-turvey looking route, due in part I’m sure to all the one-way streets downtown.

If you click the driving directions button, you’ll see the route has 80 steps and takes about 14 minutes.

We can probably do better than this. There’s an obscure button that will allow you to change some of the parameters used to calculate your route. It’s hidden on the top right of the Network Analyst Window.

The Analysis Settings tab has a Reorder Stops to Find Optimal Route box that is checked off by default. This means that if you added the stops manually, it will visit them in the order you created them, which might make sense. But if you loaded them from a file like we did, it will visit them in the order of random numbers it assigned, which definitely doesn’t make sense. Check the Reorder Stops box on, and check off the two boxes under it: Preserve First and Last Stop.

Now, the software will have the freedom to plan an itinerary that maximizes efficiency. Let’s see what difference it makes. After you’ve pressed OK to dismiss the Route Properties box, press the Solve button again.

That’s much better! It now wants me to visit the Children’s Museum first instead of last. And it has rearranged the entire middle so it’s not a mess. This new route saves us 5 steps, 3 miles and 4 minutes.

Service Area Tool

Now let’s pretend we work for Woodland Park Hospital and we want to know the area around it than an ambulance can reach within 5 minutes. We would select New Service Area from the drop down menu, and then load that one hospital point into the Facilities list.

I personally like to go into the Service Area Properties box and change the Polygon Type to Detailed (under the Polygon Analysis tab) because, why wouldn’t you? It’s set to calculate for 5 minutes by default, but you can change this to anything by editing the value in the Default Breaks box (under the Analysis Settings tab). If you want to solve for multiple times, separate them by commas. Here’s how it looks if I solve for 1, 3, and 5 minutes with high detail:

By the way, if you want to change these colors you can edit the symbology just like you would any other layer in the table of contents. And, if you wanted to, you could turn off the OneWay restriction because ambulances don’t need to obey it.

Closest Facility Tool

For the final scenario we’ll pretend to be home owners in the southwest portion of the city. We are planning a family and would like to determine the closest school to our house. The first step to solve this problem is to select New Closest Facility from the Network Analyst drop down menu, then press the Create Network Location tool button, and click on the map at the location of the house.

The new location will automatically be added to the Facilities list, but you want it in the Incidents list. Either drag it down there, or make sure the Incidents list is highlighted before you use the Create Network Location tool. The point will be automatically named Graphic Pick 1. You can double click on its entry in the Incidents list to rename it.

I purposefully picked a location that seems equally close to three different schools. The tool will tell me which is actually the fastest to drive to, not the closest as the crow flies. I selected a bunch of schools around it (more than just those three, to be safe) and loaded them into the Facilities list. Then I pressed the Solve button. The result is that Markam School is the closest at 0.7 miles away.

The tool shows you the route to get there, too. You can open up the Directions Window to see driving directions as well.

These are pretty handy, aren’t they? I’m in the mood to plan a vacation now just so I can play with the Route Tool some more!

Tags: , ,

Creating vertical profile graphs

Problem: You have some contour lines and want to chart elevation changes along a path

We got a 3D view of a neighborhood in my previous entry about displaying data in ArcScene. As I was panning around I got to thinking about what it would be like to sled down some of those hills. This one cul-de-sac looked particularly nice.

Hikers sometimes use topo maps to make vertical profile graphs along prospective trails so they know what they are getting into. Engineers use them when they are working on the grade of the new road. Today, we’re sledding enthusiasts wanting to see how much fun we’re going to have come winter.

In order to create a profile graph down the hill I spotted, I will need to move all my layers back into ArcMap. I’ll need the TIN surface to provide the height information and the roads so I know where to draw my line.

Once you’ve brought the layers up, go to Tools –> Extensions… and make sure you have the 3D Analyst extension checked on. Then go to View –> Toolbars to turn on the 3D Analyst toolbar. 3D Analyst needs a raster elevation surface to work with. If you are starting with vector topo lines, you’ll need to create a TIN (Triangulated Irregular Network).

As I explained in my ArcScene entry:

To do that, go to the 3D Analyst drop down menu, and select Create/Modify TIN –> Create TIN from Features. You just need to tell it which feature layer to use to create the TIN, which attribute has the height information, and which triangulation method to use. Soft Line is best for topos.

Make your TIN the target layer. Your screen will look something like this.

Now, press the Interpolate Line button that I moused-over above. Then, draw a line along the middle of the road from the point where the imaginary sled will start to the point it will stop. The line will show up as a graphic element. Make sure it is selected (it should be by default) and then click the Create Profile Graph button. Here’s what mine looks like:

Hmm, not really the even downward plunge I was hoping for. Good thing I checked! If you right click on the graph and select Properties… you can change the titles to make them more descriptive.

I edited my main title and bottom + left axis labels to get this.

Note: You can change the appearance of the profile line on the Series tab, and you can change the appearance of the entire chart under Advanced Properties.

I have found it a good idea to create a vector line over the top of the graphic element profile line. That way I’ll have it saved in a format that I can bring into other maps or, for instance, bring back into my ArcScene view.

Tags: , , , ,

Displaying in 3D with ArcScene

Problem: You have some elevation or multipatch data that you would like to visualize in three dimensions.

For several of my entries I have been using layers from the robust catalog over at DC GIS. They offer pretty much everything needed to make a map of the District. In addition, some of the data layers contain elevation information, such as the 1 meter topo lines and the mulipatch buildings.
Note: Multipatch is a unique geometry type that can contain 3D models with vertical and overhanging faces.

These layers lend themselves to being rendered in 3D, and ArcScene has been formulated for that purpose.
ArcScene will show up in your Start Menu along with ArcMap and ArcCatalog. There is also a button that launches it from the 3D Analyst toolbar.

You can add data to ArcScene using the Add Data button just like you would to ArcMap, but it will look very different. Any of the height information embedded in the layers will automatically be applied to form a 3D world.

Here’s how the multipatch buildings, topo lines, road areas, lot boundaries, tree points and swimming pools from DC GIS look when I first add them.

It’s pretty neat, but needs some work. Some of layers, like the lots and roads, appear to be floating beneath the ground. This is because those layers don’t have height information, so ArcScene doesn’t know where to put them. In order to proceed, we need to make a surface from those topo lines. To do that, go to the 3D Analyst drop down menu, and select Create/Modify TIN –> Create TIN from Features. This will create a Triangulated Irregular Network to act as an opaque ground surface that the other layers can be draped over.

You just need to tell it which feature layer to use to create the TIN, which attribute has the height information, and which triangulation method to use. Soft Line is best for topos.

Now I have a solid ground surface with realistic shadows to enhance the 3D effect.

In order to raise up the other layers so they sit on top of the ground, right click on them to open their Properties. Then go to the Base Heights tab and tell ArcScene to obtain their heights from the surface you just created.

I did this for all my layers and also changed the symbols to some more pleasing colors. Now it’s looking like a real neighborhood!

Those multipatch buildings are by far the coolest part. They’re likely pretty rare in the typical GIS catalog, however. If you’re like most people and just have normal (boring) building footprint polygons, at this point your scene would look thusly:

You can add more realism by “extruding” the buildings up from the ground by a uniform height. Go back to the Layer Properties and click on the Extrusion tab.

Play around with different values until it looks right. I found that 8 was about the height of most of the multipatches. It just looks like they’ve all got flat roofs now.

If I wanted to, I could extrude the roads and swimming pools just a bit too. I tried it, and decided they looked better flat. I also changed the tree symbol to Big Leaf Maple (available through More Symbols –> 3D Trees), checked off the Edge Types symbol on the TIN, and turned on the lot boundaries as hollow polys. Just some ideas to show you different things you can do.

Whatever you do, you are going to want to try a fly-through. You won’t be able to resist. I sure couldn’t.
Press the button that looks like a little bird, then click in the scene where you want the bird to go, and use the mouse to soar through the streets at eye level. If you are giving a presentation, this is a guaranteed crowd pleaser. Here’s some “photos” I took while flying through my scene.

Tags: , , , ,

Bad Behavior has blocked 82 access attempts in the last 7 days.