<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GIS Tips &#38; Tricks &#187; Attributes</title>
	<atom:link href="http://www.aubreyrhea.net/gis/index.php/category/attributes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aubreyrhea.net/gis</link>
	<description>for ESRI&#039;s ArcGIS suite</description>
	<lastBuildDate>Sun, 25 Jul 2010 14:42:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Preparing street data to become a network dataset</title>
		<link>http://www.aubreyrhea.net/gis/index.php/2010/05/preparing-street-data-to-become-a-network-dataset/</link>
		<comments>http://www.aubreyrhea.net/gis/index.php/2010/05/preparing-street-data-to-become-a-network-dataset/#comments</comments>
		<pubDate>Mon, 17 May 2010 11:50:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Attributes]]></category>
		<category><![CDATA[cost attribute]]></category>
		<category><![CDATA[network analyst]]></category>
		<category><![CDATA[one way street]]></category>
		<category><![CDATA[z value]]></category>

		<guid isPermaLink="false">http://www.aubreyrhea.net/gis/?p=336</guid>
		<description><![CDATA[Problem: You are unfamiliar with the Network Analyst extension and you would like to maximize the potential of your streetline data. Recently I encountered my first network dataset. This is a special file created by, and meant to work with, the Network Analyst extension. Route planning is the first thing that pops into my mind [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem: You are unfamiliar with the Network Analyst extension and you would like to maximize the potential of your streetline data.</strong></p>
<p><img src="http://www.aubreyrhea.net/gis/images/Nd_icon.png" alt="" align="left" />Recently I encountered my first network dataset. This is a special file created by, and meant to work with, the Network Analyst extension.</p>
<p>Route planning is the first thing that pops into my mind when I think about what a GIS does, yet I’d never even turned on that extension before. This is going to be a very basic introduction for people who might be in the same boat: interested in what Network Analyst can do, but don’t know where to start.</p>
<p>I am going to post it in three installments<br />
<strong>1. Preparing your data to become a network dataset<br />
2. Creating the network dataset<br />
3. Doing network analysis</strong></p>
<p>The first thing you will need is a streetline layer. The more information it has in it, the better. It should at least have road names, road types, and direction of travel (for one-way streets) designated, or its use will be very limited. You can use the ESRI StreetMap data if you have access to it, which is optimized for use with Network Analyst and even comes with a pre-made network dataset. If you’re going to do that you can skip ahead to installment #3. Otherwise, read on:</p>
<p><strong>Preparing your data to become a network dataset</strong><br />
I downloaded a streetline shapefile from the <a href="http://www.portlandonline.com/bts/index.cfm?c=25779">City of Portland GIS Data Catalog</a>.</p>
<p>The fundamental bit of information network analyst needs in order to work is a Cost Attribute. Cost is either the travel time or distance on each road segment. It is the thing the model is trying to minimize when calculating the best route. Distance is easy to add to any dataset. Create a field (type: double) if one is not there already, and then use the Calculate Geometry tool. Chose miles or kilometers, whichever you prefer, as your length unit. Note: your dataset needs to be in a projected coordinate system for this to work.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/distance.PNG" alt="" /></p>
<p>If you know, or have a basis upon which to estimate, the speed of travel on each road segment, you can also create a Cost Attribute based on time. This will make your results much more meaningful. My dataset designated road types, which allowed me to make an educated guess about speed limits. I added a Speed field and populated it with my miles per hour estimate. The <a href="http://www.iihs.org/laws/speedlimits.aspx">Insurance Institute for Highway Safety</a> has a table of maximum speed limits in each state. Oregon’s is 55 for urban interstates.  So, I used 55 for highways and freeways, 45 for major/primary roads, 35 for secondary roads, 25 for minor/local roads and ramps, and 15 for driveways.</p>
<p>These speed and distance fields in the attribute table will be used to calculate a time attribute later in the process. Moving on:</p>
<p>The next fundamental attribute to have is Hierarchy. Network analyst uses it to create more realistic routing based on the fact that people prefer to travel on larger roads. It is an integer value that ranges from 1 (major) to 3 (minor) based on road class / road level. If your roads are already labeled as primary, secondary, and tertiary, you’re set; otherwise, you’ll have to make some classification decisions. You can add a new integer field to the attribute table for it (that’s what I did). Or, you can calculate it later, like I’ll explain how to do with the time attribute.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/hier.PNG" alt="" /></p>
<p>Next, you will need to flag one-way roads with their direction of travel. I struggled with this for quite awhile before stumbling upon a procedure that works correctly, so I recommend doing it just this way:</p>
<ol>
<li>Create a new string field in the attribute Table called OneWay.</li>
<li>Change the symbol of your roads to a cartographic line with the arrow pointing right. This will allow you to see what direction the line was digitized in.<br />
<img src="http://www.aubreyrhea.net/gis/images/cartoRight.PNG" alt="" /></li>
<li>Bring up a Google map of your area, or something else that allows you to see the direction of travel.</li>
<li>Put an “F” in the OneWay column for any road that has been digitized along with the direction of travel.</li>
<li>Put a “T” in the OneWay column for any road that has been digitized against the direction of travel.</li>
<li>Use an “N” for any roads that don’t permit travel in any direction.</li>
<li>Use any other value for 2-way streets. (I used “X”).</li>
</ol>
<p><a href="http://www.aubreyrhea.net/gis/images/Sideby.PNG"><img src="http://www.aubreyrhea.net/gis/images/Sideby_thumb.PNG" alt="" /></a><br />
(click on image to see full size)</p>
<p>When you create your network dataset later, Network Analyst will recognize this formatting and will know what to do with it.</p>
<p>Finally, examine the way your road lines were digitized, especially around overpasses and tunnels. If they have a unique segment between each intersection (that is, they break anywhere a person could theoretically turn), then you can use End Point connectivity—the default. If, however, your roads are long lines that don’t break when they cross, you will have to use Any Vertex connectivity. The type of connectivity you chose tells Network Analyst where to create Junctions. Junctions are a special point layer that will be generated along with your network dataset. They are created wherever a person could transfer from road to another.</p>
<p>Regardless of what connectivity you chose, you will need a way to designate overpasses and tunnels so that people will not be routed to turn onto roads that are inaccessible because they pass below or above them. This is done using z-levels. Create two new integer fields to hold your z-level information. Call one “F_ZLEV” and the other “T_ZLEV”. The field prefixes stand for “From” and “To,” respectively. First, designate all ground level roads as z-level 0 in both fields. Then designate overpasses as 1 and tunnels as -1 in both fields. (Hopefully, your attribute table will tell you where these are. Mine had a “Structure Type” field). Now, symbolize with a cartographic line again as I described in Step #2, so you can see the digitization direction. Change F_ZLEV to 0 at the beginning of raised or lowered segments where they meet level road. Change T_ZLEV to 0 at the end of raised or lowered segments where they meet level road. The idea is that a route will only go through a junction where the z-levels match.</p>
<p><a href="http://www.aubreyrhea.net/gis/images/overpass.PNG"><img src="http://www.aubreyrhea.net/gis/images/overpass_thumb.PNG" alt="" /></a><br />
(click on image to see full size)</p>
<p>You are almost ready to move on to the next step, but before you do, think about any other potential restrictions to travel. Do you have roads that are marked as “under construction,” toll roads or private roads? Make a note of how they are designated in the attribute table so you can flag them later.</p>
<p>Stay tuned for installment #2: <a href="http://www.aubreyrhea.net/gis/index.php/2010/06/creating-a-network-dataset/">Creating a network dataset</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aubreyrhea.net/gis/index.php/2010/05/preparing-street-data-to-become-a-network-dataset/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a list of keywords from the attribute table</title>
		<link>http://www.aubreyrhea.net/gis/index.php/2010/03/creating-a-list-of-keywords-from-the-attribute-table/</link>
		<comments>http://www.aubreyrhea.net/gis/index.php/2010/03/creating-a-list-of-keywords-from-the-attribute-table/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 12:01:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Attributes]]></category>
		<category><![CDATA[attribute table]]></category>
		<category><![CDATA[keyword]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[report]]></category>
		<category><![CDATA[summarize]]></category>
		<category><![CDATA[text file]]></category>

		<guid isPermaLink="false">http://www.aubreyrhea.net/gis/?p=308</guid>
		<description><![CDATA[Problem: You need to summarize the contents of a dataset without wasting time typing a long list. Natural Earth is a crisp basemap dataset available for the world at 1:10m, 1:50m, and 1:110m scales. I downloaded one of their most detailed layers, the 1:10m Admin 1 &#8211; States, Provinces shapefile for use as my example. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem: You need to summarize the contents of a dataset without wasting time typing a long list.</strong></p>
<p><img style="margin-left: 0px; margin-right: 15px;" src="http://www.aubreyrhea.net/gis/images/toc.PNG" alt="" align="left" /><a href="http://www.naturalearthdata.com/">Natural Earth</a> is a crisp basemap dataset available for the world at 1:10m, 1:50m, and 1:110m scales. I downloaded one of their most detailed layers, the 1:10m Admin 1 &#8211; States, Provinces shapefile for use as my example.</p>
<p>If you were asked to write a metadata record or some other type of report about this dataset, you would want your description to be as complete as possible. You might find it necessary to generate a long list of place or topic keywords. Often, the attribute table already includes this information. You just need a good way to extract it.</p>
<p>For instance, if I symbolize by category on the ENGTYPE_1 field of my natural earth layer, I get a long list of administrative area types. There&#8217;s way more than just states and provinces here! If only I could select this list and paste it somewhere else to have in a usable format. Unfortunately, it&#8217;s not that easy.</p>
<p>The solution I have come up with is not perfect. I keep thinking there must be a better way. If any of my readers know of one, I would love the feedback. For now, this method certainly beats having to type the entire list:</p>
<p>First, open attribute table and right click on the field you want to turn in to a keyword list. Then, select Summarize&#8230;</p>
<p><img src="http://www.aubreyrhea.net/gis/images/summarize.PNG" alt="" /></p>
<p>Chose one summary statistic field. It doesn&#8217;t matter which, but works a little better if you chose something that&#8217;s always going to be the same. I chose &#8220;CheckMe&#8221; because that&#8217;s basically a flag (yes or no) field. It doesn&#8217;t matter which summary statistic (minimum, maximum, first, last etc.) you pick either. You won&#8217;t be using any of this information&#8211;it&#8217;s just a way to get ArcMap to make a list for you that includes each category one time.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/summarize_box.PNG" alt="" /></p>
<p>Hit the browse button in the Specify output table section. Then, change Save as type to Text File.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/textfile.PNG" alt="" /></p>
<p>Open up your text file in Notepad and remove the first line (the field names). Then, do Edit &#8212; &gt; Replace and replace all commas, quotation marks, numerals 1-9 and whatever text phrase was in your summary statistic field with nothing.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/replace.PNG" alt="" /></p>
<p><img style="margin-left: 0px; margin-right: 15px;" src="http://www.aubreyrhea.net/gis/images/listresult.PNG" alt="" align="left" />When you are done, you end up with this. If you want to add commas and move these all into one row, it&#8217;s pretty easy from here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aubreyrhea.net/gis/index.php/2010/03/creating-a-list-of-keywords-from-the-attribute-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculating Polygon Areas</title>
		<link>http://www.aubreyrhea.net/gis/index.php/2009/08/calculating-polygon-areas/</link>
		<comments>http://www.aubreyrhea.net/gis/index.php/2009/08/calculating-polygon-areas/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 11:39:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Attributes]]></category>
		<category><![CDATA[area]]></category>
		<category><![CDATA[coordinate system]]></category>
		<category><![CDATA[polygon]]></category>

		<guid isPermaLink="false">http://www.aubreyrhea.net/gis/?p=41</guid>
		<description><![CDATA[Problem: You need to get the areas of your polygons I have often been asked questions like &#8220;What is the total acreage of forest in our study area?&#8221; or, &#8220;Has the total forested area increased or decreased since we last mapped it two years ago?&#8221; The answer starts with being able to calculate polygon areas. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem: You need to get the areas of your polygons<br />
</strong></p>
<p>I have often been asked questions like &#8220;What is the total acreage of forest in our study area?&#8221; or, &#8220;Has the total forested area increased or decreased since we last mapped it two years ago?&#8221; The answer starts with being able to calculate polygon areas. After that it&#8217;s just addition and subtraction.</p>
<p>I used to have to use VBA scripting to calculate polygon areas. Now the task has been simplified with the Calculate Geometry tool introduced in ArcMap 9.2. However, there are some things you need to know to get good results with this tool.</p>
<p>There&#8217;s a lot of little parks around the San Francisco bay area in California that will serve as a good test case.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/parks.jpg" alt="" /></p>
<p>Let&#8217;s add the area of each park to the attribute table. The first step is to create a new field to hold the values. Chose field type &#8220;Double&#8221; (Double-precision floating-point number) which allows lots of decimal places. Then, right click on the field name and chose &#8220;Calculate Geometry&#8230;&#8221; from the context menu. You will then get to choose your units. In this case, decimal degrees are the only option because the layer is in a geographic coordinate system. Decimal degrees are pretty useless.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/decimal.jpg" alt="" /></p>
<p>Fortunately, the tool allows you to use the coordinate system of the data frame, so you don&#8217;t have to worry about re-projecting. You just need to change the data frame into a projected coordinate system, one that uses a linear unit of measure, such as feet or meters. UTM (Universal Transverse Mercator) is widely used. This image from <a href="http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system">wikipedia</a> shows the San Francisco bay area is in UTM zone 10N.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/Utm-zones.jpg" alt="" /></p>
<p>To change the projection of the data frame, select Data Frame Properties from the View menu. On the Coordinate System tab, pick from the Predefined &#8211; Projected Coordinate Systems folder.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/UTM.jpg" alt="" /></p>
<p>Now, the Calculate Geometry tool gives you choices like square feet, square miles and acres. I picked acres, a good tiny park sized unit. I got results back with 6 decimal digits, which sure seems good.</p>
<p>But wait. We used a common projection which is great for most purposes, but not particularly for this one. UTM preserves shape and direction, which makes things look right on maps. However, it distorts <em>area</em> and distance. Exactly <em>not</em> what is needed here. The distortions may be small, but if you want to be as accurate as possible (and what GIS Analyst doesn&#8217;t?) it is better to use an equal-area projection. Albers projections preserve area while distorting shape and distance. If you root around in the list, you&#8217;ll notice there&#8217;s several Albers equal-area projections available for different regions, such as Albers North America and Albers USA Contiguous. It is best to pick the most local one you can find. In the State Systems folder, there&#8217;s a California (Teale) Albers. Perfect!</p>
<p>Changing the data frame to this, and recalculating the area in a second field, does yield different, better results.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/acres.jpg" alt="" /></p>
<p>If you need to get the total area of all the parks, don&#8217;t dig out your calculator. Just right click the field name to run the Statistics tool.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/stats.jpg" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aubreyrhea.net/gis/index.php/2009/08/calculating-polygon-areas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
