Wednesday, June 12, 2013

Show & Tell for Modules 1 to 4

In this "Show & Tell" session, I'll show you some useful things that were not included in the LAD modules 1 to 4.

If you'd like you can try these yourself. The data is included in the Challenge1to4 zip file which you can download and unzip. Here are the notes to re-create what I show you.

RELATIVE PATHS FOR DATA


Open "Landsat Ungrouped.mxd" in the Challenge1to4 folder.

Notice that in the Table of Contents, the two layers - Ocean and Islands - have a red exclamation point next to them. This means the data has been lost.

Right click the red exclamation next to Ocean, click "Data", click "Repair Data Source", and then navigate to Challenge1to4\data\StateGIS\StateGDB geodatabase and click the "Ocean" featureclass. This will fix the Ocean data and since the Islands data is in the same geodatabase, it gets fixed as well and you can see both on your map.

You can avoid this problem by setting your MXD to use relative pathnames to data rather than absolute pathnames. Click "File", click "Map Document Properties...", and next to "Pathname:" check the box to "Store relative path names to data sources"

CREATING GROUP LAYERS


Make sure your Table of Contents is set to "List by Drawing Order".

Turn off visibility for both the Ocean and Islands layers.  Add the Landsat raster datasets for Hawaii, Maui-Kahoolawe, Molokai-Lanai, Oahu and Kauai-Niihau from Challenge1to4\data\StateGIS.

Turn visibility back on for the Ocean layer and you'll see why this ocean mask is a handy layer to have sometimes.

You can group all five Landsat layers into a single group layer which can then be turned on and off easily. Select all five layers, then right click on one of the selected layers and click "Group".

Rename the new group layer to "Landsat" and then collapse all the levels underneath it.

CREATING LAYERFILES


In the future it'd be nice to have ArcMap remember all the work I did to set up the Landsat group layer so I don't have to do it again. You can do that by saving the layer as a layerfile. Right click on the "Landsat" group layer and then click "Save As Layer File...".  You can store it in the data folder.  

Now in the future, instead of adding all five Landsat layers and then grouping them, you just add the layerfile and ArcMap does all that for you.  Layerfiles will also remember symbology, label, scale and other layer properties.  They are great timesavers!

LABEL HALOS


Add the layerfile "Body Surfing Sites no halo".  How can you make the body surfing site names show up better?

Right click on the body surfing layer, click "Properties", click the "Labels" tab, click the "Symbols..." button, click the "Edit Symbol..." button, click the "Mask" tab, set the Style to "Halo".


CUSTOM POINT SYMBOLS


ArcMap provides a large number of different point symbols to choose from, but sometimes you want to use a special custom symbol.  Here's how:

Right click on the body surfing layer, click "Properties...", click the "Symbology" tab, click on the graphic symbol to open the "Symbol Selector" window.

Click "Edit Symbol..." to open the "Symbol Property Editor" window. Change the Type to "Picture Marker Symbol" and point to one of the graphics in the graphics folder.  You can change the size and change other properties.

LABEL PLACEMENT


You can specify how dynamic labels are shown.  Here's an example:

Add the layerfile called "Flightpaths solid".  Notice how the labels are horizontal. It would be better if they followed the direction of the flightpath.

Right click on the flightpaths layer, click "Properties...", click the "Labels" tab, click "Placement Properties" and choose "Always straight".

LAYER TRANSPARENCY


So now I like the flightpath labels better, but I don't like how they totally cover up the Landsat imagery underneath them.  Here's how to change that:

Right click on the flightpaths layer, click "Properties...", click the "Display" tab, and set "Transparent" to 50%.

LABEL EXPRESSIONS


A couple more show and tell examples using a different MXD.

Open "High School Demographics.mxd" in the Challenge1to4 folder.  Although the map is zoomed to a portion of Oahu, these are high school boundaries for the entire state.

Open the attribute table and you'll see there are fields for the name of the high school, the total population of that area (all people, not just students) and the total population by racial categories.  This is population data from the year 2000.

You can easily label the polygons using any one of the fields, but what if you wanted to label each polygon with both the school name and the total population?  Here's how:

Right click on the high school demographics layer, click "Properties...", click the "Labels" tab, click "Expression...".  You can build an expression that includes multiple fields, static text and special formatting codes.  Here's an example that will label the name on one line and the population on the second line.


PIE SYMBOLOGY


What about the population by race fields?  You know how to symbolize the polygons by any one of these fields, but how can show multiple populations by race at the same time?  One way is by using a pie chart.

Right click on the high school demographics layer, click "Properties...", click the "Symbology" tab, click "Charts", click "Pie".  Use the right arrow button to move the White, Black, Asian and NHOPI fields into the right hand box.  (NHOPI is Native Hawaiian or Other Pacific Islander).





No comments:

Post a Comment