2

GeoMedia –
A Whirlwind Tour

This  chapter provides a broad overview of some of the basic features in GeoMedia in a workflow format and serves as an introduction to its capabilities. All of the topics discussed here are covered in detail in later chapters. The problem presented here involves developing a GeoMedia workflow to ide.gify the cities in the state of Louisiana that are capable of providing disaster relief to neighboring cities located in flood-prone areas.

To accomplish this goal, you will build buffers around the rivers to determine the possible extent of flooding. You will use spatial analysis to find cities that are located in the flood zone and to determine the areal extent of potential flooding. Creating buffers around cities that fall within the flood zone will allow you to find neighboring cities that are not in the flood zone that might provide disaster assistance. You will develop a base map of communication facilities that might be impacted by river floods by geocoding their locations. Finally, you will generate reports about impacted population, and produce hardcopy maps of the area.

It is suggested that you go through the sections and exercise steps in order, as the later sections build on earlier ones. The data set used in this workflow is USSampleData.mdb, which is delivered with GeoMedia. If changes have been made to your sample data, you might want to run the GeoMedia installation setup again from the original CD. This time, however, use the Custom installation and select only the Sample Data to obtain a new, clean copy of the database. There is an additional file, LouisianaTVTowers.csv, which you will need later in the workflow. It is available in the Harnessing GeoMedia data sets.

GeoWorkspaces

The first requirement of a new workflow is a GeoWorkspace. A GeoWorkspace is the area in which your work takes place. Technically, it is a file that stores information about your working environment. At a minimum, a GeoWorkspace contains an empty map window where you will eventually display features, images, and labels; an empty legend, which is the tool you use to add things to the map window; and the default coordinate system, Cylindrical Equirectangular. As your workflow develops, the workspace might contain several map windows, each displaying different feature classes, data windows containing attribute data for those features, a different projection, a North arrow, a scale bar, and so on.

When you start a new workflow, you will typically create a new GeoWorkspace from a template. You can store many GeoWorkspaces in your workspace directory; however, only one can be open at a time. When you are ready to quit GeoMedia, you have the option of saving the GeoWorkspace. By saving the workspace, you can resume working where you left off.

Create a GeoWorkspace

To begin, create a GeoWorkspace by performing the following steps.

1. Run GeoMedia from the Windows Start menu, or from a desktop shortcut, if you have one.

2. If the Welcome to GeoMedia dialog box appears on the screen, select "Create New GeoWorkspace"

Or

Select File > New GeoWorkspace from the Main Menu bar.

    1. 1. In the New dialog, accept the default template, Normal.Gwt, by highlighting its name, select the Document radio , and click on New. The New GeoWorkspace dialog is shown in the following illustration.
 

hgm2_1.tif


The new workspace will open. It is shown in the following illustration.

     hgm2_2.gif
 
 

Save the GeoWorkspace

Continue by saving the new GeoWorkspace. To do this, perform the following steps.

1. Select File > Save GeoWorkspace.

2. In the File Name field, type Flood Wworkspace.

3. Click on Save.

2 NOTE: Anytime you exit this workflow save the GeoWorkspace.
Data Warehouses

A warehouse is a source of geographic data. Warehouses, or data servers, defined for GeoMedia include Access, Arc/Info, ArcView, AutoCAD, FRAMME, ODBC Tabular, MapInfo, MGE, MGE Segment Manager, SQL Server, and Oracle. Most warehouses are read-only, meaning that you are not allowed to make changes to the data stored in them.

Access warehouses are the exception. They are read/write warehouses that allow you to modify, add, and delete data. You can create new Access warehouses and import data to Access from your read-only data servers. This allows you to set up read/write connections to that data. The warehouse for this workflow, USSampleData.mdb, is an Access database.

See Pro section for more info.

Each warehouse is linked to your GeoWorkspace via a connection. A connection contains the file system path to your warehouses, as well as information about the connection type; that is, whether it is read-only, read/write, or closed. It can optionally contain a  spatial filter. Each workspace can have connections to many warehouses, and the warehouse connections can be any combination of read-only and read/write.

Creating a Warehouse Connection

To create a warehouse connection, perform the following steps.

    1. 1. On the Main Menu bar, click on Warehouse > New Connection. This will start the Warehouse Cnnection Wwizard, shown in the following illustration.
hgm2_3.tif

[Fig. 4

2. From the list of available data servers, select Access and click on Next.

3. In the "Connection name" field, type US Data.

4. Click on Browse and navigate to the Warehouses directory. Select USSampleData.mdb and click on Open. Click on Next. See the previous illustration.

5. Select "Access all features in the warehouse" and click on Next.

6. Select "Let the wizard open the connection as read-only" and click on Finish.

You have now connected to a GeoMedia warehouse. The next step in the process is to add features to your map.

Feature Classes and the Legend

Understanding features and legends is fundamental to working in GeoMedia. A feature is a geographic entity represented by geometry and by nongraphic attributes. A feature is a member of a feature class. Feature classes reside in warehouses. The Sample data contains feature classes such as States, Rivers, and Cities. Florida is a feature in the States feature class, and Rockwall is a feature in the Cities feature class.

The legend is the control center for the map window. With legend tools you add feature classes to the map window. GeoMedia gets the geometry from the feature class table and transforms it into map objects. The legend assigns default styles (display characteristics such as color, weight, and pattern) to the map objects and allows you to then customize the display properties. Each open map window has its own legend so that you can display the same feature in more than one window, in different colors or line styles.

Adding Feature Classes to a Legend

To add feature classes to a legend, perform the following steps.

  1. 1. On the Main Menu bar, select Legend > Add Feature Class. The dialog is shown in the illustration at left.
 hgm2_4.gif
  2. From the "Connection" drop-down list, select US Data, which is the name you gave to the warehouse connection to USSampleData.mdb.

3. From the list of feature classes, select States and StateNameLabels by clicking on them while holding down the Shift or Control key. Click on OK.

The states and state names should now be displayed in the map window. However, the state names are too large. To correct this, you need to change the feature class styles.

Changing Feature Class Styles

To change the display characteristics of the state names, you need to use Legend Properties, which allows you to change map styles, sizes, and other visual characteristics of maps. To do this, perform the following steps.

1. On the Main Menu bar, click on Legend > Properties.

2. On the Entries tab, select the row StatesNamesLabels by clicking on the selector button to the left of the entry. Click on the Style button.

3. On the Style Definition dialog, select 8 from the Size drop-down list. Check Bold, and make sure the "Size remains constant as display scale changes" checkbox is selected. Click on OK.

4. On the Entries tab, click in the Display cell for StateNameLabels. From the drop-down list, select By Scale.

5. Click on the Scale button. In the Minimum field, type 10,000,000. Click on the OK button on the Scale Range dialog, and then click on OK on the Legend Properties dialog, shown in the following illustration.

6. Zoom in and out in the map window to see how these settings affect the display of the state names.

7. Change the display characteristics of the States feature class. In the legend, double click on the Style key for the States entry. The Style key is the rectangle symbol to the left of the feature class name.

    1. 8. On the Style Definition dialog, click on the Color button that is just below the heading "Primary line." This will bring up a new Color dialog. Select a new color from those displayed by clicking on the color box you want. Click on OK on the Color dialog, and then click on OK on the Style Definition dialog. The following illustration shows the modified feature styles.
 hgm2_5.tif [
The modified feature styles.

Naming Legends

Naming legends allows you to reuse them. It is possible to have many map windows open at the same time. By naming legends, you can have the same data and graphic representation in each window simply by assigning the same named legend to more than one window. When you use an existing legend, its style properties are reused, maintaining consistency in your displays.

1. On the Main Menu bar, select Legend > Name Legend.

2. In the Name field, type DisasterReliefLegend. Click on OK.

The following section shows you how you can change the map projection.

GeoWorkspace Coordinate Systems

Projections are algorithms used to transform the 3D surface of the earth to two dimensions. A coordinate system is a grid of intersecting lines;, meridians, and parallels, on a flat surface on which features from the curved surface of the earth are mapped according to their spatial location. GeoMedia recognizes two different categories of coordinate systems. The first is the projection of the warehouse, the coordinate system the data is stored in. The second is the GeoWorkspace coordinate system. This is the projection the data is displayed in.

One of the strengths of GeoMedia lies in the fact that data from different warehouses, in different storage formats, and in different coordinate systems, is resolved and displayed in whatever coordinate system is defined for the GeoWorkspace. Re-projecting warehouse data to the workspace coordinate system has no effect on the source data. In this part of the workflow, you will change the projection parameters of the GeoWorkspace.
 
 

Defining a GeoWorkspace Coordinate System

When you display features in the map window, GeoMedia automatically converts the data from their warehouse coordinate system into the coordinate system of the GeoWorkspace. The workspace coordinate system can be defined in two ways. You can explicitly select coordinate system and projection parameters or you can instruct GeoMedia to match the workspace coordinate system with that of the first warehouse you connect to.

First you will look at the setting that allows the workspace to use the warehouse coordinate system. It is found in the Options dialog, which is used to customize many parameters in your workflows.

1. On the Main Menu bar select Tools > Options. On the General tab there are two selections that deal with coordinate systems. On the "Match GeoWorkspace and Warehouse coordinate systems" panel make sure that "When making first connection is checked. Also deselect "When creating a new warehouse". Click OK to dismiss the Options dialog. 1. Select View > GeoWorkspace Coordinate System from the Main Menu bar.

2. On the Storage Space tab of the GeoWorkspace Coordinate System dialog, select base storage type Projection.

3. Click on the Projection Space tab and select Albers Equal Area from the drop-down list.

4. Click on the Projection Parameters button. In the "Longitude of origin" field, enter –100:00:00:000. Enter 40:00:00:000 for the "Latitude of origin." Click on OK on both dialogs.

The dialog box in the upper right of the following illustration is the GeoWorkspace Coordinate System dialog. When the Projection Space tab is selected on this dialog, you can set specific map projection parameters by clicking on the Projection Parameters button. When you do, the smaller dialog box (at the lower left in the following illustration) appears and you can enter specific projection parameters in the appropriate fields. When you have completed the projection parameters, you should click on OK on the Projection Parameters dialog, and then on OK on the GeoWorkspace Coordinate System dialog.

 hgm2_6.tif
 
 

5. Click on the Geographic Space tab and select WGS84 for the Geodetic datum.

6. Click on View > Fit All on the Main Menu bar. You now have a more "traditional"-looking map of the United States. The re-projected map is shown in the following illustration.

 hgm2_7.tif

Creating Warehouses

You will create a new warehouse in this workflow for two reasons. First, you do not need all of the data in the Sample warehouse. You are interested in the state of Louisiana. Working with data for that states only will speed up all processing that requires database searches. Second, this workflow will require the creation of new features. In order to preserve the integrity of your sample data, the new features need to be written in a different warehouse. You will create a new warehouse and import the features you need from the USSampleData warehouse.

Creating a New Access Warehouse

To create a new Access warehouse, perform the following steps.

1. On the Main Menu bar, click on Warehouse > New Warehouse.

2. Select the template Normal.Mdt, click on Document, and click on OK New.

3. In the "File name" field, type Flood Pproject.

4. From the "Save as type" drop-down list, select Access and click on Save.

You can review your warehouse connections by clicking on Warehouse > Edit Connections. Notice that GeoMedia automatically connected the new warehouse to your workspace. Although you may want to change the projection parameters of your map for various display purposes, you may also want to store data in a particular projection. For example, if you are commonly going to create maps in a specific projection, it might be more efficient to store the data in that projection rather than re-project it each time.
  1. On Main Menu bar select Warehouse > Warehouse Coordinate System. On the Select Connection dialog click FloodProject and click OK. Select the Geographic radio button on the Storage Space tab of the Warehouse Coordinate System dialog. On the Geographic Space tab select Geodetic Datum WGS84 and click.
2 NOTE: You can create a new warehouse with a wide range of projections.

 Spatial Filters

Before you import feature classes to the new warehouse, you will define and apply a  spatial filter to the USSampleData warehouse. A spatial filter is an area in the map window that restricts the number of map objects displayed and the number of objects evaluated in queries. It can be a fence you place in the map window, or it can be a selected feature geometry.

The spatial filter you are going to create in this workflow will be used when you import data to the new warehouse. Putting a filter on the Sample data will restrict the import to features in and near the state of Louisiana. The import will pick up some features from surrounding states but will substantially reduce the amount of data you work with, and speed up processing.

Creating and Applying a Spatial Filter

To create and apply a connection spatial filter, perform the following steps.

1. On the Main Menu bar click on Warehouse > Define Spatial Filter by Fence.
  1. You are returned to the map window to place the fence. The cursor is now a crosshair. Click on a point that will be the Northwest corner of a box that will enclose the state boundary of Louisiana. Keeping the mouse button depressed, pull the box to the diagonally opposite corner of the state boundary and single click. Try to get as close to the state boundaries as you can. You may want to zoom in to make this easier. You are returned to the Define Connection Filter dialog. Click on Close. If you do not like the fence click Cancel on the dialog when it appears and start again.
  2. 2. In the New Spatial Filter dialog "Filter name" field, type Louisiana. Click on the Overlaps radio button, and select.  Set as default filter for existing connections". Click OK. The New Spatial Filter dialog is shown in the following illustration.

  3.  

     

     hgm2_8.tif
     

    Importing Data

    Importing data is the process of copying data from one warehouse, the source, to another, the target. You can import data from any supported warehouse to an Access or an Oracle warehouse. Data stored in Access warehouses can be modified, added, and deleted. You need all feature classes in USSampleData for your analysis.

    2 NOTE: In GeoMedia, you must import data into an Oracle read-only warehouse; in GeoMedia Pro, the Oracle warehouse can be read/write.

    An important capability of GeoMedia is the ability to connect to data in many formats. It is also possible to import data from its native data warehouse into a GeoMedia Access warehouse. When you do this, you can change and add to the data. In the exercise that follows, you will import data from the larger US Access warehouse and create a smaller project-focused warehouse. Later in the book, you will learn how to do this with data from other warehouse formats. Importing Data to an Access Warehouse

    To import data to an Access warehouse, perform the following steps.

    1. On the Main Menu bar, click on Warehouse > Import from Warehouse.

    2. Read the first panel of the Import Wizard dialog and click on Next.

    3. For the source connection, select your US Data entry. Click on Next.

    4. The target connection dialog should have the new FloodProject connection preselected. This is because it is the only open, read/write connection in this GeoWorkspace. Click on Next. Click OK on the warning that appears. It refers to the fact that the filter on the target, not the source, warehouse will be used during the import.
     

  4. 5. Select all feature classes in the select feature class part of the Import Warehouse wizard.  They will be copied to the right window ("Import to target warehouse"). Click on Finish. The following illustration shows features being selected for import.

  5.  

     

     hgm2_9.tif
     
     

  6. Click Next on the "Feature class to import" panel. On the next screen make sure the "Do not create new legend entries" radio button is on. Click Finish.
  7. 6. The Import Statistics dialog box, shown in the following illustration, informs you about the progress of the process. It will tell you when the import is complete. You can then close the wizard.


 hgm2_10.tif.
 
 

Analysis

Since you won’t be using the US Data connection from now on, highlight the States feature class in the map window legend and hit the Delete key on your keyboard. From your FloodProject connection, add Rivers and States to the legend using the Legend > Add Feature Class dialog. . You are now ready to begin your analysis. The cartographic model you have developed indicates that you need to build buffers around the rivers, use the spatial analysis to find cities in the floodplain, buffer those cities to find their neighbors, analyze the areal extent of flooding within affected counties, develop a base map of television tower locations, generate reports about impacted population, and produce hardcopy maps of the area.
 
 

Working in Data and Map Windows

The data window is used to display the nongraphic attribute values of your feature classes. Attributes are all the information you keep about your features. When you have a data window and a map window open for the same feature class, they are linked in such a way that items selected in one window are automatically displayed in the other. Open a data window and look at the attribute data for the Counties feature class by performing the following steps.

1. On the Main Menu bar, click on Window > New Data Window.
    1. 2. In the New Data Window dialog, expand the listing for the FloodProject connection, click on Counties, and click on OK. Attribute data for the Counties feature class is shown in the following illustration.
 hgm2_11.tif Attribute data for the Counties feature class. 3. Activate the map window by clicking on its title bar. Add the Counties feature class by clicking on Legend > Add Feature Class. Select Counties from the FloodProject connection.

4. Tile the windows by clicking on Window > Tile Vertically. Select a map object by clicking on it. Notice that its attribute record is highlighted in the data window. Now click on a record in the data window. Notice that the map object displays in the map window in the highlight color defined on the Map Display tab of the Tools > Options dialog.

5. Maximize the data window by clicking on the center button on the right side of the title bar.

6. Click on the POP column heading. When the column highlights, click on Data > Sort Ascending on the Main Menu bar. Close the data window by clicking on the X on the upper right of the title bar.

7. Adjust the map window display using the View tools. The View menu on the Main Menu bar contains the commands for zooming, panning, and fitting all to the map window.

8. Suppress the display of the Counties feature class in the map window by right clicking on the Counties legend entry. From the pop-up menu, click on Display Off.

9. Remove the counties feature class from the legend by clicking on the Counties legend entry and pressing the Delete key on the keyboard. Confirm that you want to delete the feature class from the legend.

In the next section you will create an attribute query. This allows you to select just a subset of the mapped items and display them on your map in a special way.

Performing an Attribute Query

The next step in this workflow is to extract only the cities and counties in Louisiana. Remember that the filter you used captured some counties in Arkansas, Texas, Alabama, and Mississippi. The data window you created in the previous step in this workflow you saw some counties from each of these states.

An attribute query looks at the nongraphic attribute values of a feature and selects features from a feature class based on an operator such as "is equal," "is not equal," "is not Null," and so on. A query outputs a query set that can be used as input to other queries. You need to build an attribute query to extract the counties for Louisiana. To do this, perform the following steps.

1. On the Main Menu bar, click on Analysis > New Query. 2. From the "Select Features in" drop-down list, select the Counties feature from the FloodProject connection. Click on the Filter button. 3. In the Attributes window, select STATE_NAME and click on the down arrow below the window.

4. Select the equal sign from the Operators button pad.

5. Click on the Show Values button at the upper right of the dialog box. If you get the warning that processing might take some time, click on Yes. When the attribute values display, select Louisiana and click on the down arrow under the window. You have constructed an SQL query that says

Select all county features from the Counties feature class where STATE_NAME = ‘Louisiana.’ 6. Click on OK. An attribute query filter dialog is shown in the following illustration. 7. Type LA counties in the Name field on the New Query dialog. Click on the Options button and click on the "Display named query results in Active window" checkbox. Click on OK in both dialogs.

8. Repeat steps 1-6, but in step 2 select the feature Cities in place of Counties. Name the query "LA cities." Notice that queries are added to the legend just as feature classes are. A display of the Cities and Counties attribute queries is shown in the following illustration.

 hgm2_12.tif
 
 

The previous queries were based on attributes in the database. In the next section you will build queries in which the spatial location and relationships of the feature are the basis for the query.

Performing Spatial Queries

Now you need to visually ide.gify the counties that border the rivers. This query is not based on feature attributes, but on a spatial relationship among map objects. The following steps query a query. You will use the LA counties query you created earlier. Perform the following steps.

1. Click on Analysis > New Query on the Main Menu bar. The New Query dialog is shown in the following illustration.  hgm2_13.tif
 
  2. In the "Select Features in" field, expand the Queries listing. For this query, you will use the "LA counties" query. This time, click on the Spatial button.

3. In the drop-down that is part of the middle field in the New Query dialog (it has the heading "That"), select touch. From the "Features in" drop-down list on the left side of the dialog box, select Rivers from the FloodProject connection. Name the query Counties on rivers and click on OK. The query set for "Counties on rivers" is shown in the following illustration.

 hgm2_14.tif.
 
  4. Now find all cities in Louisiana within three miles of the rivers. Click on Analysis > New Query again. Select "LA cities" from the Queries listing as the features and click on Spatial. In the "That" drop-down list, select "Are within distance of" and enter 3 mi in the Distance and Units fields. Select the FloodProject Rivers in the "Features in" field. Name the query Cities on rivers. Click on the Options button and click in the "New data window" checkbox. Make sure that "Active window box" is not checked. Click on OK on both dialog boxes. Dismiss the data window by clicking on the X on the title bar. The data window view of the query is shown in the following illustration.  hgm2_15.tif
 
 

Output a Query as a Feature Class

In order to more easily distinguish the impacted cities from the other cities in Louisiana, you will create a new feature class from the query set you just created. To do this, perform the following steps.

1. On the Main Menu bar, click on Warehouse > Output to Feature Class. The Output to Feature Class dialog is shown in the following illustration.  hgm2_16.tif.
 
  2. In the "Select feature to output" drop-down, expand the Queries listing and select Cities on rivers. In the "Select output feature class" field, select the FloodProject connection.

3. In the "Feature class" field, type impacted_cities. Feature class names cannot contain blanks.

4. Click on the "Display feature class in map window" checkbox. Optionally click on the Style button if you want to change the display properties of the new feature class. Click on OK.

Now that you have seen how to query features, the next section shows you how to clean up your data by deleting features.

Deleting Features

Now the 15 cities exist in both the Cities  and the impacted_cities feature class. In this workflow you need to eliminate this duplication by deleting them from the Cities feature class. You have already created a query set named Cities on rivers and you now need to create a select set of the same features for deletion. A select set is a group of map objects selected for simultaneous manipulation. Map objects can be selected interactively in the map or data window, and they can be selected by legend entry. To delete the cities, perform the following steps.

1. In the map window, double click on any map object to display select set properties, shown in the illustration at left. Click on OK or Cancel to dismiss the dialog.

2. Add the query to the legend with Legend > Add Query. Select Cities on rivers and click on OK.

3. Create a select set of the same cites by highlighting Cities on rivers in the legend. Click on Edit > Select by Legend Entry. The cities in the query are now members of a select set.

4. Click on the Delete button on the Placement and Editing toolbar. The toolbar is typically located on the left side of the application window. The Delete button is the red X. Answer Yes when asked to confirm the deletion. You have removed both the attributes and the geometry for the impacted cities from the "LA cities" feature class. They now reside only in the impacted_cities class.

5. Delete the "Cities on rivers" query from the legend by selecting it and pressing the Delete key on the keyboard.

6. Add the new feature class to the legend. On the Main Menu bar, click on Legend > Add Feature Class. Select impacted_cities from the FloodProject listing. The new feature class is shown in the following illustration.

 hgm2_17.tif.
 
 

Thematic Displays

A thematic map uses colors and patterns to display attribute data in the map window. The POP field in the Counties feature class contains the population for each county. You will use the POP field to create a map that displays the population of the riverfront counties in ranges. To do this, perform the following steps.

1. Select Legend > Add Thematic on the Main Menu bar.

2. In the "Feature class" field on the Add Thematic Entry dialog, expand the Queries entry and select Counties on rivers.

3. From the "Available attributes" list, select POP. Click on the Range button. Click on Define.

4. On the Map by Ranges dialog, shown in the following illustration, click on the Rotate Color Scheme button until you find some colors you like. It is the left-hand button in the "Color selection" section of the dialog. Click on OK on both dialog boxes.

5. You can change the display priority on the map window by moving entries up or down in the legend. The new thematic entry has been posted to the top of the legend. In that position it overlays all other legend entries. To view LA cities, impacted_cities, and Rivers, select each one and drag it to the top of the legend. The thematic display of population for riverfront counties is shown in the following illustration.  hgm2_18.tif
 

In the next segment of the workflow you will build 20-mile buffer zones around the impacted cities. These buffers will then be used to ide.gify surrounding cities that could potentially provide disaster relief in the event of a flood.

Creating Buffer Zones

When you create buffers in GeoMedia, you are building a new feature class. Therefore, you must be connected to a read/write warehouse. You will write your new buffer features in the FloodProject database. To build the buffer zones, perform the following steps.

1. On the Main Menu, click on Insert > Buffer Zone. The Buffer Zone dialog is shown in the following illustration.  hgm2_19.tif.
  2. In the "Buffer zone around" drop-down, select impacted_cities from the FloodProject connection.

3. From the "Output buffer zone to Warehouse" field, select FloodProject.

4. In the "Feature class" field, type city_buffers. This is a feature class name and cannot contain blanks.

5. You can optionally change the display of the new features with the Style key.

6. In the "Constant distance" field, enter 20 mi.

7. For the "Buffer type Point," select Single, and click on the Merged radio button.

8. Using the buffer zones, you can now create another query to ide.gify the cities located within 20 miles of the impacted cities.

9. Click on Analysis > New Query.

10. In "Features in," expand the FloodProject list and select Cities. In the "That" field, select Touch. In the "Features in" field, select city_buffers from the FloodProject connection.

11. Name the query Disaster relief cities. Click on Options and select both "Active window" and "New data window." Click on OK on both dialogs. The results of the analysis are shown in the following illustration.


 hgm2_20.tif.
 
 
 

Calculating Spatial Difference and Analyzing Geometry

At this point you want to look at the potentially flooded areas in a little more detail. You will add the three-mile buffer around the river and calculate the area it encompasses by county. GeoMedia provides two commands you will use to accomplish this task, Spatial Difference and Analyze Geometry. Spatial Difference allows you to subtract one area geometry from another. Analyze Geometry provides you with selected measurement statistics for feature classes or queries.

Open a new map window for this portion of the workflow using the Window > New Map Window command on the Main Menu bar. On the New Map Window dialog select the <Empty> legend and click OK. Using the Legend > Add Feature Class, add the Rivers features. Using Legend > Add Query, add Counties on Rivers to the map window.

  1. Build a buffer zone around the rivers. On the Main Menu bar click on Insert > Buffer Zone. From the "Buffer zone around" drop-down list select Rivers. From the "Warehouse" list select FloodProject and type RiverBuffer in the "Feature class" field. For "Constant distance" enter 3 mi. From the "Line" drop-down in the "Buffer type" portion of the dialog select Round and click on the Merged radio button. Click OK to end the dialog. The completed dialog is shown below.

  2.  

     
     
     
     
     
     
     

    hgm2_22.tif

    Caption: The completed Buffer Zone dialog.

    To find the portion of each county that is not in the flood zone you will first subtract the river buffer from the counties, then you will subtract those areas from the original counties.

  3. On the Main Menu bar select Analysis > Spatial Difference. In the "From features" drop-down select Counties on Rivers from the Queries list. In the "Subtract features" list select RiverBuffer from the FloodProject list. In the "Query name" field type in CountiesNoFloodZone and make sure that MapWindow2 is selected for the display. The completed Spatial Difference dialog and the resulting geometry are shown below.

  4.  

     
     
     
     
     
     
     

     hgm2_23.tif

    Caption: The Spatial Difference dialog.

  5. To speed up processing you are going to create feature classes from two queries before proceeding. Click on Warehouse > Output to Feature Class. In "Select features to output" choose Counties on Rivers from the Queries list. Select the FloodProject connection and type CountiesOnRivers. Click OK. Repeat these steps, selecting the query CountiesNoFloodZone, and name the output feature class CountiesNoFloodZone.
  6. On the Main Menu bar select Analyze > Spatial Difference. In the "From features" drop-down select CountiesOnRivers from the FloodProject list. In the "Subtract features" list select CountiesNoFloodZone from the FloodProject list. In the "Query name" field type in CountyAreaInFloodZones and make sure that MapWindow2 is selected for the display. The resulting geometry are shown below.

  7.  

     
     
     
     
     
     
     

     hgm2_24.tif.

    Caption: County areas in the flood zone shown shaded.

  8. Now you will calculate the total area from the spatial difference query you just completed. On the Main Menu bar click on Analysis > Analyze Geometry. In the "Features to analyze" drop-down select CountyAreaInFloodZones from the Queries list. Select the "Area" checkbox and set the "Area units" to mi^2. Do not display results in the map window, but insure that the "Display results in data window" checkbox is selected. Click OK to end the dialog.
hgm2_25.tif

Caption: The completed Analyze Geometry dialog and the results in the data window.

Geocoding

Part of this workflow is concerned with the impact flooding might have on television towers around the state.

You have acquired a file of tower locations from the FCC Antenna Structure Registration Database at http://www.fcc.gov/wtb/geographic/Welcome.html#screenshots. The database contains the latitude and longitude of the towers, however it does not contain the geometry necessary for spatial analysis. Geometry can be created from coordinate data through a process called geocoding. The tower information is stored in a comma-delimited text file named LouisianaTVTowers.csv. You will make that file available in your workflow by attaching it to the FloodProject warehouse.

  1. On the Main Menu bar click Warehouse > Feature Class Definition. In the "Feature classes" window highlight the FloodProject connection and click on the Attach button. On the Attach dialog insure that the "Type" field is set to Text. Using the Browse button navigate to the directory where LouisianaTVTowers is stored, after you change the "Files of type" to CSV Files (*.csv). On the Attach dialog click OK and Close the Feature Class Definition dialog. The Attach dialog is shown in the illustration below.

  2.  

     
     
     
     
     

     hgm2_26.tif.

    Caption: The completed Attach dialog.

  3. On the Main Menu bar click Analysis > Geocode Coordinates. From the "Geocode attributes in" drop-down expand the FloodProject list and select LouisianaTVTowers. On the "Coordinate system of attributes" panel click the Define button. On the Storage Space tab select Geographic and select WGS84 on the Geographic Space tab. Click OK. Again on the "Coordinate system of attributes" panel click the Units and Format button. From the "Geographic" drop-down select d:m:s. From the "Hemisphere designation" list select N,W positive. Click OK on the dialog shown below.
 hgm2_27.tif

Caption: The Units and Format dialog.

From the "Latitude" drop-down select LatDMS and from the "Longitude" list select LonDMS. Make sure that MapWindow2 is selected for the display. The dialog is shown below. Click OK to dismiss it.

 hgm2_28.tif.

Caption: The completed Geocode Coordinates dialog.

The results of geocoding are show in the illustration below. You could now perform various analyses with the tower locations.

 hgm2_29.tif.

Caption: The LouisianaTVTower locations.
 
 

You can now close MapWindow2.In the following section, you will add some labels to the display in MapWindow1.

Labels

Labels take several different forms in GeoMedia. They can be text you type in, or you can label features with attribute values stored in the warehouse. When you use attribute values as labels, they can be stored in a query or as a new feature class. Labels contained in queries are updated anytime the attribute values change. They move when you move the feature, but they cannot be edited independently of their associated features. When labels are stored as features, they are independent map objects and can be deleted, moved, or rotated.

Inserting Labels as a Feature Class

In this section you will add the city name and population for the "Disaster relief cities" query. You will store them as a feature class in the FloodProject warehouse. To add the city and population attributes, perform the following steps.

1. Make sure that MapWindow1 is the active window. On the Main Menu bar, click on Insert > Label. The Label dialog is shown in the following illustration. 2. On the Label dialog, select Queries. Select "Disaster relief cities" in the "Label features in" drop-down.

3. In the Content Attributes window, select CITY_NAME. It will move to the Layout window.

4. Click immediately behind the CITY_NAME entry in the Layout window and, while holding down the Control key, press Enter.

5. On the second line of the Layout box, type Pop; then select POP from the Attributes window.

6. Set "Alignment" to "Center center."

7. In the "Output labels as" section, select "Feature class (static, editable)." Select the FloodProject connection. In the "Feature class" field, type CityNames. Click on OK.

As you can see, things are crowded around New Orleans. Had these labels been created as a query, you would not be able to fix them. However, because they are features, they can be moved around the map window.
Editing Map Objects

Map objects can be moved, deleted, digitized, and changed with the placement and editing tools. In this part of the workflow, you will clean up the overlapping labels around the New Orleans area. To do this, perform the following steps.

1. Zoom in on the southeast portion of the state with View > Zoom > In.

2. Activate the Select tool by clicking on the "Northwest arrow" button on the Selection toolbar.

3. Select one of the labels by clicking on it. This highlights the label and makes it a member of a select set. The following illustration shows a select set member.

4. Move the label by clicking on Edit > Move. A handle appears on the label. Click on the handle and, while keeping the mouse button depressed, drag it to a new location. Release the mouse button when you get to the desired location.

5. Select another label and repeat step 3. Continue until you have the labels pulled apart. If you are unsure which city is which, double click on one and review the properties dialog. It includes the city name attribute.

6. You might optionally want to go to the Style dialog for the CityNames feature class and change the font and possibly other attributes. The relocated labels are shown in the following illustration.


North Arrows and Scale Bars

North arrows and scale bars are easily placed in the map window using the View tools. The following section shows you how to do this.

Placing North Arrows and Scales Bars

To place North arrows and scale bars in the map window, perform the following steps.

1. Zoom out until the map window contains the entire state of Louisiana.

2. On the Main Menu bar, click on View > North Arrow. The North Arrow can be dragged and dropped at a different location. It can be modified by right clicking on it and selecting Properties from the pop-up menu.

3. You display the Scale Bar by selecting View > Scale Bar. It also can be modified by right clicking on it and selecting Properties. The final GeoMedia map window is shown in the following illustration.

 hgm2_21.tif.
 
 

ig. 4-29]

Before Going On
 
 

In preparation for the cartographic output section that follows, you need to complete a few miscellaneous steps. Performing these steps will make the resulting map easier to work with and visually more appealing.

1. In the legend, turn off the legend entries for everything except "Disaster relief cities," city_buffers, impacted_cities, Rivers, and "Counties on rivers by POP". Right click on each of the other entries and select Hide Legend Entry from the pop-up menu. This action leaves the map objects in the map window, but removes the display of the legend entry. Save the legend by clicking on Legend > Named Legends and selecting DisasterReliefLegend from the drop-down.

2. Remove the spatial filter from the US Data connection. Click on Warehouse > Spatial Filters. Select <None> and click the Apply button. In the Apply Spatial Filter dialog select the US Data connection and click the ">" key. Click on OK.

3. Open a new map window by clicking on Window > New Map Window. With this window active, click on Legend > Add Feature Class. Add States from the US Data connection. Access the Legend menu again and select Add Query. Add LA Counties from the FloodProject connection.

4. Switch to MapWindow1 by clicking on Window. Click on MapWindow1.

Preparing Cartographic Output

You plot your results using the GeoMedia layout window. The layout window uses SmartFrames to store the map graphics and associated marginalia; legends, North arrows, and scale bars, originating from any of the map windows in the GeoWorkspace. The layout window contains a variety of tools that allow you to add graphic and textual enhancements to your cartographic products.

In this section, you will import an existing layout from a GeoMedia layout template. You will work with the template, add an additional SmartFrame for a U.S. locator map, and then populate all SmartFrames with the contents of your two map windows. You will see the effect of linking the map and layout windows, which allows changes in the map window to cause updates to the contents of the layout window.

  1. Insure that the geographic area and display characteristics in the map window are literally the ones you want in your final output, but think of each component of the map window separately. Position the map the way you want it to look in your output. If, for example, the legend overlaps part of the map in the map window it does not matter. Each map component is placed in the layout window as an independent entity. However, each one will be a copy of whatever you have displayed in the map window.
  2. Open the layout window by clicking on Window > Layout Window.
  3. Import an existing template. On the Main Menu bar select Sheets > Import. Select Awide.glt and click Open. On the Main Menu bar click on View > Fit.
The Import Layout dialog will open the directory defined as the default in the Options dialog. Templates are normally found in \Program Files\GeoMedia\Templates\Layouts.
 
 

The template, shown below, defines the page setup parameters and contains SmartFrames for a map, a North arrow, the legend, and the scale bar.

 hgm2_30.tif.

The Awide template.
 

The layout window contains working sheets and background sheets. Working sheets define the foreground of the layout and usually contain the graphics that are unique to a particular layout.
The background sheet contains the graphics that are used for multiple layouts, such as logos, copyright information, and so on. The graphics on the background sheet display behind the graphics on the working sheet. What is shown in the previous illustration is actually the contents of the template’s background sheet.

  1. To avoid any confusion, delete the default sheets in the layout window. You should see two tabs at the bottom of the window labeled Sheet1 and A Wide. Click on the Sheet1 tab, then on the Main Menu bar click Sheets > Delete Sheet. Next click View > Background Sheets. With the Background1 tab active, click Sheets > Delete Sheet. Switch back to the working sheet by clicking View > Working Sheets.
  2. Remove a SmartFrame from the working sheet. Move the cursor over the Legend box and pause there until the ellipsis (three dots) appears. Left click to activate the PickQuick dialog. Pass the cursor over the numbers on this dialog. The number 1 represents the entire group of frames. The number 2 is associated with the legend frame. Click on 2 to select the frame. On the Main Menu bar click Edit > Delete.
  3. Delete the text from the background sheet. On the Main Menu bar click View > Background Sheets. Select the text Legend and hit the Delete key on the keyboard. Select View > Working Sheets to return to the working sheet.
  4. Place a SmartFrame for the locator map. Select Layout > Design Map Layout on the Main Menu bar. Click Apply with nothing selected. "Map" is always selected, as it is required. Single click in the upper left-hand corner of the box that contains the text "North Arrow". Move the mouse diagonally and left click againg to form a new frame as shown below.

  5.  

     
     
     
     
     
     
     

     hgm2_3.tif

    Caption: Placing a new map SmartFrame.

  6. Insert map graphics. Click in the large frame on the working sheet. Handles appear indicating that it is selected. Click on Layout > Insert Map Graphics. From the "Map window" drop-down select MapWindow1. Click on Fit to frame on the "Plot Scale" panel. On the "Associated marginalia" panel select the Legend, North arrow, and Scale bar checkboxes. Finally select Dynamic on the "Mode" panel. Click OK.
The map is placed into its corresponding SmartFrame, and an outline is shown for placing the legend. Since you specified in the previous step that a legend should be placed in addition to the rest of the map graphics, and since there is not yet a SmartFrame for a legend, you will be prompted to place the SmartFrame for the legend interactively in the next step. When the empty box appears move the cursor under the frame you placed on the right hand side of the template and left click. The legend will be added at that location, then the predefined frames for the scale bar and the North arrow will be filled.

9. Place the locator map. Select the frame you created at the upper right of the template by clicking on it. On the Main Menu bar click Layout > Insert Map Graphics. Select MapWindow2 from the "Map window" drop-down. Click on Fit to Frame and select the Static radio button on the "Mode" panel. Click OK.

10. Move a map graphic. Pause the cursor over the scale bar until the ellipsis (three dots) appears. Left click and select the number 2 from the PickQuick dialog. When the handles appear on the scale bar you can simply drag and drop it at a new location.
  1. Edit graphic properties. Pause the cursor over the North arrow until the ellipsis appears. Left click and select number 2 from the PickQuick dialog. When handles appear on the arrow, right click on it and select Properties from the pop-up menu. On the Info tab you can change the size of the arrow by modifying the settings in the scale portion of the dialog. The Format tab allows you to remove or change the border around the arrow.
  2. Clean up the background sheet. On the Main Menu bar select View > Background Sheets. Click on each text entry on the sheet in turn and use the Delete key to remove it.
  3. Edit the title. Double click on the "Plot Title" text. When the insertion point appears in the text delete it and type Louisiana Disaster Planning. You can single click on the box and reposition it if you need to. You can change the font or size of a text string by right clicking the text, selecting Properties, and selecting the Paragraph tab.
  4. Highlight Louisiana on the locator map. Zoom in on the U.S. map till you can clearly see the state of Louisiana. Click on the Circle by Center Point tool, shown below.

  5.  

     
     
     
     
     
     
     

    hgm2_32.tif.

    Caption: The Circle by Center Point button.

    On the new control, shown below, select the Thick line style from the drop-down list at the far left. Click the Line Color button next to the line style field and select red from the color table. Move the cursor to the layout window and click once where you want the center of the circle located. Move the cursor the distance of the radius of the circle and click again. If you don’t like the circle, select it and click Edit > Delete. Click the Select Tool, the Northwest arrow, to exit Circle by Center. Use View > Fit to resize the layout window.

  6. In this step you will return to the map window to make some final changes. On the Main Menu bar click Window > MapWindow1. Select Legend > Add Image. From the FloodProject connection select USSampleImage.gif and click OK. Select Legend > Properties and select the image entry by clicking on the grey button at the far left of the entry for USSampleImage.gif. Click the Style button, type 50 in the Brightness field and click OK. When you return to the Properties dialog, use the double down arrow on the right to send the image to the bottom of the legend. Click in the Entry column so that the image name will not appear on the legend. Click OK.

  7.  

     
     
     
     
     

    Note: If the image is not available, simply change some of the legend entry styles.

  8. On the Main Menu bar click Window > Layout Window. (Use the entry at the end of the menu, not the first one.) The map design has been updated with the additional of the image.
17. Use View > Zoom > Actual Size command to rescale the view in the active layout sheet to approximate the actual printed size of the map. Because this command lets you see the layout at actual size before printing, it serves as a plot preview. Many plot sizes will exceed the size of your monitor, so use the vertical and horizontal scroll bars, or the pan tool, to preview the entire sheet.
  1. You are ready to print the final map, shown below.
 hgm2_34.tif

With the layout window active, select File > Print. Select the "Selected Sheet" radio button on the Print Range panel. Set the "Number of copies" to 1. If you need to edit any printer properties, select the Properties button. After making any modifications in this printer-driver specific dialog box, click OK to return to the Print Layout Window dialog box. Click OK on the Print Layout Window dialog box.

You can now create a report to go along with the map. The following section shows you how to do this.

Creating a Report

You have decided to provide the disaster relief planners with a set of charts and graphs showing the population of the cities involved. GeoMedia is designed to work with all Microsoft compliant software and you decide that the best tool to use to create the tabular data you need is Excel.

Moving Tabular Data to Excel

You want to create a report showing the populations of the impacted cities. To do this, perform the following steps.

1. On the Main Menu bar, select Window > New Data Window, and select Impacted_citie" from the FloodProject list.

2. Use your mouse to select all cells that include the cities’ names and populations.

3. On the Main Menu bar, select Edit > Copy or simultaneously press the Control and C keys on the keyboard.

4. Open a new Excel spreadsheet and use Edit > Paste or simultaneously press the Control and V keys on the keyboard.

5. Use the various Excel tools to create the necessary tabular reports and charts.
 
 

This chapter has given you an overview of the powerful analysis and mapping features of GeoMedia. The chapters that follow present the details of the capabilities covered in this chapter, as well as ways of making your work more productive.