Thursday, June 13, 2013

Challenge 5

In this "Challenge" session, I'm asking you to apply what you learned in LAD Module 5 and in Show & Tell 5.

The data is included in the Challenge5 zip file which you can download and unzip. If you already downloaded this data for "Show & Tell" you don't need to download it again.

CHALLENGE


In this Challenge you will get practice using the georeferencing toolbar (see Show & Tell 5) and some of the editing tools from Module 5.

You will find the data in Challenge5\data\Honolulu.

Some parcels in plat 111014 have been updated as follows:

A) Parcels 43 and 54 have been merged into a single parcel 43.

B) Parcel 7 has been split into three parcels - 7, 99 and 100.

C) Parcel 97 is a new parcel (added in the road area).

Suggested steps are:

1) Open a new blank MXD and add the parcels. Adjust the symbology so there is no fill color.

2) Add O11014.tif and georeference the scanned image to the parcels.

3) Complete edit "A" using the Merge command under Editor.

4) Complete edit "B" using the "Cut Polygons Tool".

5) Complete edit "C" using the "Auto-Complete Polygon" Tool.

6) Be sure and update the TMK attribute as you go using the Attributes window.

7) Save your edits.

8) Save your MXD (if you haven't already!).

Extra Credit:

9) Add the street data.

10) Georeference "nearHNL.jpg".

11) Make a map that highlights the two new parcels 99 and 100 and shows the street names and nearHNL image.  Something like this:



Show & Tell for Module 5

In this "Show & Tell" session, I'll show you some useful things that were not included in  LAD module 5.

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

TABLE TO MAP - TEXT, CSV, XLS with X,Y


Open "DiamondHead.mxd" in the Challenge5 folder.

Use Notepad to open the "traps.txt" file in Challenge5\data\Honolulu.


Note that the first row contains field names separated by commas and the rest of the rows contain the data. This is data for mouse traps set by the Department of Health around the Hawaii National Guard buildings inside Diamond Head. The data includes the type of trap, how many mice were caught and how many tested positive for Hanta virus. The last two fields were collected using GPS and are the X and Y coordinates (in longitude and latitude) for each trap. Please note - this is not actual data, I made it up for this exercise.

So how can you add this text file to your map as a set of points? Here's how:

Add the text file to your map. You'll see the table added in the Table of Contents but not on the map. Open the attribute table and look at the fields - they are named from the txt file and all the data is there along with the Xcoord and Ycoord fields.


Right click on the table and select "Display XY Data..." which opens up a new window. If the X and Y coordinate fields are not correctly identified, use the pulldown to select the correct fields. For the "Coordinate System of Input Coordinates", in this case these are GPS coordinates in WGS84 longitude and latitude. Click "Edit" and select the GCS/World/WGS84. It is important that you identify the coordinate system - ALWAYS DO THIS! Your window should look like this, click "OK":


The data has been added as features. You can now symbolize and label these features just like any other feature class.


You can also export the text data features into a shapefile or geodatabase feature class. Right click on the text feature layer, click "Export Data...".



PHOTOS WITH GPS INFORMATION


Photos you take with your smartphone and many newer digital cameras save the GPS coordinates of the location you were in when you took the photo. ArcMap has a tool to automatically these geotagged photos to ArcMap. Here's how:

Open "Africa.mxd" in the Challenge5 folder.

Last summer I visited my sister-in-law in Tanzania and we trekked around Kilimanjaro. Using File Manager, open the Challenge5\data\Africa\pics folder and right click on one of the photos and click properties. Click the Details tab and scroll down until you see the GPS section where the coordinates are stored.


These are the coordinates that ArcMap will use to locate the photos. Go back to ArcMap, open ArcToolbox, click "Data Management Tools", click "Photos", click "GeoTagged Photos To Points".


For the Input Folder, point to the pics folder. You can use the default Output Feature Class location. Click "OK". The tool will run in the background, it may take a couple of minutes, but when it's done it will notify you and add the points to the map. They may be hard to see so change the symbol to a camera symbol.


The tool also has configured the features HTML Popup properties. Use the HTML Popup tool and click on each feature.


The windows will stay open and you can move them around. Here's an example:



GEOREFERENCE AN IMAGE


There are times when you have a scanned image of an old map, or maybe some old air photos, that you'd like to add as a layer in your map. To do this you need to move the image into a coordinate system. Here's how to do that:

Open "Kauai.mxd" in the Challenge5 folder. These are parcels on Kauai.


Open the Challenge5\data\Kauai\413001.tif image. This is a plat map that is used to record property information. Right now it is not in a coordinate system. Go ahead and add the image to ArcMap. If ArcMap asks if you want to build pyramids, say "yes". You can right click on the image and then click "Zoom to Layer". Note what the map looks like.


Use the "Return to previous Extent" button to go back to the parcels. Zoom in to the same area in parcels that the plat map covers. Change the symbology of the parcels to have no color inside and a wide colored outline.


Open the Georeferencing Toolbar.


Under the Georeferencing pulldown, click "Fit to Display".


Now comes the hardest part. Scan the image and the map to find the same exact spot on both. Once you have found a spot, click the "Add Control Points" tool and do two clicks. The first click is the spot on the image, the second click is on the exact same spot on the map.


After you do the second click, the image will be moved so that the two points line up.


Now add a second control point in a different part of the image. Again, find the same spot on both the image and the map, click the image spot first, then the map spot. Always click the image first, then the map. After the second click, it's almost like magic how things line up.


Now that the image and the map are roughly aligned, you can zoom in and more carefully add two more control points.  Add them in opposite parts of the maps, think about legs on a table, try to choose points near the four corners.  Once you have added the third and fourth points, you might want to delete the first two and go back, zoom in, and add them more carefully.


Once you image and map are lined up with four (or more) control points, you can permanently save your work by clicking the Georeferencing pulldown and "Update Georeferencing".  This will write a world file in the same folder as the tif image.












Wednesday, June 12, 2013

Challenge 1 to 4

In this "Challenge" session, I'm asking you to apply what you learned in the LAD modules 1 to 4.

The data is in the Challenge1to4 zip file which you can download and unzip. If you already downloaded this data for "Show & Tell" you don't need to download it again.

CHALLENGE


A student has been reported missing from Kaimuki Elementary School.  Her cellphone is GPS-enabled and her last known position has been reported and delivered in a shapefile.  Create an ArcMap document that shows parcels, streets, schools and her last known position as shown below.  Try to re-create this image – colors, label positions, etc.
  

What coordinate system (datum, projection, units) is each dataset in?


Parcels            Challenge1to4\\data\CCHGISOHD\parcels.shp   ___________________________

Streets             Challenge1to4\\data\ CCHGISOHD\streets.shp   ___________________________

Schools           Challenge1to4\\data\StateGIS\StateGIS.gdb\PubSchools   ____________________

Cellphone       Challenge1to4\\data\mydata\cellphone.shp   _______________________________

1) How far (straight line) from the school to her last known position? ______ feet   ______ miles

2) What is the TMK of the parcel at her last known position?  ___________ TMK

Save your map document as Challenge1to4\challenge.mxd.


Extra credit: Add a basemap service from ArcGIS Online

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).





Dataset Reference Sheet

FILE GEODATABASE
            Keywords: *.gdb, GDB_tablename
                  ! – editing data models and topology requires ArcGIS Standard or Advanced


PERSONAL ACCESS GEODATABASE
            Keywords: *.mdb, GDB_tablename
                  ! – editing data models and topology requires ArcGIS Standard or Advanced


SCALABLE GEODATABASE (SDE)
            Keywords:      Workgroup - SQL Server Express
                                 Enterprise - SQL Server, Oracle, DB2/Informix, PostgreSQL
                  ! – access controlled by system or db admin
                  ! – editing only via ArcGIS Standard or Advanced 


SHAPEFILE
            Keywords: *.shp, *.dbf, *.shx, *.ain, *.aih, *.sbn, *.sbx, *.prj
          ! - must have at least *.shp, *.dbf, *.shx to be a valid shapefile


COVERAGE (ArcInfo Workstation)
            Keywords: INFO, *.e00, *.e01…
                  ! – Use ArcCatalog to copy and manage coverages


ESRI GRID (ArcInfo Workstation, ArcGIS)
            Keywords: INFO, *.e00, *.e01…, *.aux
                  ! - Use ArcCatalog to copy and manage ESRI grids


GEOREFERENCED IMAGES
            Keywords: *.tif, *.jpg, *.sid, *.img,  *.aux, *.rrd
               *.tfw, *.jpw, *.sdw  (world files – info sometimes in header)
                  ! – still need projection information to project-on-the-fly


CAD FILES
            Keywords: *.dxf, *.dwg, *.dgn
                               *.wld (world file)

                  ! – can read as CAD file or as separate feature classes

Quiz on Modules 1-4 (with answers)

MODULE 1

1) What is a data frame?

A map element that defines a geographic extent, a page extent, a coordinate system, and other display properties for one or more layers in ArcMap.


2) Why might you want more than one data frame in a map document?

Map layouts can display more than one data frame. So you might, for instance, use one data frame for your main map and a second data frame for your location map. 

3) One inch on a map equals how many feet on the ground at each different scale?

       1:24000  _2000__ feet                                              1:63360  _5280___ feet

       1:2400    __200__ feet                                              1:200      __216.67_ feet

       1:240      ___20__ feet                                              1:1          ____0.83_ feet

MODULE 2

4) What is the difference between labels and annotation?

Labels are dynamic, they move for best display as the map is moved, so they're good for displays and web maps. Annotations are fixed at a location and scale and are best suited for publication mapping.

5) Why might you want to use layerfiles?

Layerfiles allow you to re-use symbology in other map documents. This saves you time and can help promote standards across an organization.

MODULE 3

6) What is the best projection to use?

Trick question! There is no single best projection.  You must first define how the map will be used and what is the most important property to preserve - shape, area, distance or direction.  Only then can you decide the best projection to use.

MODULE 4

7) Give an example of a vector dataset.

There are three types of vector datasets that define features using x,y and sometimes z coordinates:

  1) points - like wells, cities, fire hydrants

  2) lines   - like streams, roads, contours

  3) areas or polygons - like lakes, oceans, parcels

Sometimes the type of dataset will depend on the scale of the map. On a worldwide map a city might be a point, whereas it will be an area on a state or county map.

8) Give an example of a raster dataset.

Raster datasets represent space as an array of equally spaced cells. They are often used to portray data that is not sharply defined, data that changes continuously over a surface.

Satellite and aerial imagery are commonly used raster datasets where the cell values represent colors on the earth that we see as a picture.

Elevation surfaces, or digital elevation models (DEMs), are another example of raster datasets.

Quiz on Modules 1-4

MODULE 1

1) What is a data frame?

2) Why might you want more than one data frame in a map document?

3) One inch on a map equals how many feet on the ground at each different scale?

       1:24000  ________ feet                                              1:63360  ________ feet

       1:2400    ________ feet                                              1:200      ________ feet

       1:240      ________ feet                                              1:1          ________ feet

MODULE 2

4) What is the difference between labels and annotation?

5) Why might you want to use layerfiles?

MODULE 3

6) What is the best projection to use?

MODULE 4

7) Give an example of a vector dataset.

8) Give an example of a raster dataset.