3

GeoWorkspaces

GeoWorkspace is a file that stores information regarding almost every aspect of your working environment. It contains all the parameters relevant to your analysis, such as projection algorithm settings, links to data sources, and database joins. It is the place where you save your analytical tools such as named queries. It also stores all information regarding your display environment. Toolbar locations are kept here, as are details about legend structure, contents, entries, and symbology.

2 NOTE: GeoWorkspace files have an extension of .gws and GeoWorkspace templates end in .gwt. Working with GeoWorkspaces

Whether you are beginning a new project or resuming work on an existing project, your workflow always begins by opening either a GeoWorkspace template or a GeoWorkspace. Normally you conclude your work by saving everything back to a GeoWorkspace.

What a GeoWorkspace Is

The GeoWorkspace is an application file where your GeoMedia workflow "lives." It contains, at a minimum, a map window, an empty legend, and a coordinate system. As your workflow develops, you will add warehouse connections, legend entries, map objects, named queries, customized display specifications, data windows, a layout window, scale bars, and North arrows, among other things, to the GeoWorkspace.

As previously mentioned, the GeoWorkspace manages and stores almost everything in your working environment. There is one important exception. The workspace does not contain your geospatial or attribute data. Data sources are linked to the workspace via connections. Although GeoMedia includes functionality that allows the addition, modification, and deletion of the attribute and spatial data stored in read/write data sources, the majority of what occurs in a typical workflow does not affect the original data. That is, most operations, such as changing a projection or graphic symbology, occur exclusively in the workspace components and have no impact on the data.

New to GeoWorkspace capability in the 4.0 release of GeoMedia is functionality related to cartographic output. Map design and layout are created in the Map Layout Window. Hardcopy output is intimately tied to the contents of the workspace and its component parts. It is now stored inside the GeoWorkspace.

What a GeoWorkspace Does

As you work, you save the details of your working environment and the results of analysis in a GeoWorkspace just as you save any other file. In this respect, the workspace serves as a productivity tool, allowing you to reuse your customized workspace configuration. Reusability is an important feature for your analyses as well. Queries stored in the workspace can be rerun as the data changes at the source. They can also be rerun against new data as new connections are added to the workspace.

Using GeoWorkspaces

The workspace is basically a dynamic bookmark for your project. When a workspace is opened, the connections to data sources are restored. Your map, data, and layout window displays are recreated, and queries are rerun. Because only configuration parameters and query structures are stored, the workspace is always linked to the current version of your data. When your query displays and legends are recreated, they reflect any changes that have been made in the source project or coverage.

Creating GeoWorkspaces

There are a variety of ways you can create a GeoWorkspace. Workspaces can be built from the default template delivered with GeoMedia: normal.gwt. This template contains a map window, an empty legend, and the Cylindrical Equirectangular projection. To create a new workspace, you simply open the template and save it as a GeoWorkspace.

Workspaces can be built from a custom template you design. Normal.gwt, or any other template, can be opened, modified, and saved as a new template. This flexibility allows you to design custom templates for GeoWorkspaces that reflect your specific analytical needs and standardize your GeoMedia workflows.

New workspaces can also be created by copying an existing workspace. GeoWorkspaces and GeoWorkspace templates are basically the same thing. The main difference between them is their default locations in the file system and their respective naming conventions. For all intents and purposes they are interchangeable. Although the template is intended to serve as a static "form" for a workspace, the fact is that there is no workspace functionality that cannot be incorporated into a template.

Creating a New Workspace
from a Template

The first time you run GeoMedia you must open the normal.gwt template. GeoMedia opens the template and names the workspace GeoWorkspace1. As you build GeoWorkspaces and GeoWorkspace templates, you have the option of opening the default template or any of the other templates or workspaces you have created.

Customizing normal.gwt and saving it as a new template is a way to set custom defaults for your workspace. The GeoWorkspace template, normal.gwt, contains the items required to build a workspace. When you begin a new workflow, you build a workspace by opening a GeoWorkspace template and adding the stuff specific to your project. The template, in turn, is saved as a GeoWorkspace, which then contains pointers to your attribute and spatial data.

By default, Ssaved workspace templates must be placedwill be written in the directory specified by on the File Location tab of the Tools > Options dialog. However, you can save workspaces and workspace templates anywhere in the file system. file location. This is the directory where GeoMedia will look for templates, but is not necessarily the directory where it will write templates. You must save templates in the directory defined in the Options dialog. The New Workspace dialog does not permit browsing; therefore, workspace templates saved in any but the default directory are not available.

Workflow 3-1:

Creating a GeoWorkspace from a Template

Until you have saved your own GeoWorkspace templates or GeoWorkspaces, there is only one way to get started in GeoMedia. You must open the template normal.gwt that is delivered with GeoMedia. From the default template you can create both custom templates and workspaces. In this exercise you will open the default template and save it as a new GeoWorkspace. In the next exercise you will customize this workspace and save it as a template for future workflows.

1. Open a GeoWorkspace template. Select GeoMedia from the Start menu or your desktop icon. On the Welcome to GeoMedia screen, click on Create a new GeoWorkspace. If you have permanently dismissed the Welcome dialog by clicking on the "Don’t display" checkbox, you can work from the Main Menu bar. Click on File > Open GeoWorkspace, or click on the New GeoWorkspace icon, shown in the illustration at left. 2. Select a GeoWorkspace template. Select normal.gwt. Select File of Type GeoWorkspace Templates (*.gwt) from the drop down menu. Make sure the Document radio button is selected. Click on OKNew. The New GeoWorkspace dialog is shown in the first of the following illustrations. The application window is shown in the second of the following illustrations. hgm3_1.tif 3 TIP: When you open the default template, GeoMedia provides you with an empty map window named MapWindow1, an empty legend, and the default coordinate system Cylindrical Equirectangular. The workspace is GeoWorkspace1. 3. Save the template as a GeoWorkspace. On the Main Menu bar, click on File > Save GeoWorkspace As. Type normal in the "File name" box. Click on Save. Exit GeoMedia. You now have a GeoWorkspace named normal.gws. Naming conventions and file system issues are discussed later in this chapter. You should exercise caution when working with the default template. If you should delete the template, the only way to restore it is to reinstall GeoMedia.
 
 

Opening and Saving GeoWorkspaces

The second way to get access to a workspace is to open a saved GeoWorkspace. When you open a GeoWorkspace, the workspace is restored to the state it was in when saved, with the exception that it will reflect any changes subsequently made to the data. All map objects will represent the current state of the data in the source warehouse. Therefore, feature classes and query recordsets may not necessarily look the same as they did when you last exited GeoMedia. If your workflow requires static data, such as a snapshot of the database at a specific point in time, the information can be captured. See Chapter 9 27 for a discussion of importing data and saving query recordsets., and read the "Introduction to Warehouse Import" in Chapter 3.

Only one GeoWorkspace can be open during a GeoMedia session. An attempt to open a second workspace forces the first to close. In such a case you are prompted as to whether you want to save the workspace before it is closed. Workspaces are not automatically saved. Exiting or opening a new workspace without saving abandons all changes made to the workspace during the session. Further, GeoWorkspaces can be opened read-only. To save changes made while a read-only workspace is open, you must save the workspace to a new name using the Save GeoWorkspace As dialog in the File menu. Although you can only have one GeoWorkspace open at any given time, you can access workspace files already open by another user. When you attempt to access a workspace in use, you are warned that the file is open exclusively. However, the warning gives you the option to copy the workspace. When you copy an open workspace, a GeoWorkspace file with a new name in the format tmpnnnn.gws is created in the \Windows\Temp directory on your C:\ drive. These workspace copies are not removed when you exit GeoMedia, but are permanent files.

Creating a Workspace by Modifying
an Existing Workspace

The final way to create a GeoWorkspace is to copy an existing workspace. You simply open the workspace of interest and use Save GeoWorkspace As from the File menu. This is another example of the interchangeability of templates and workspaces. Either one can serve as a source configuration for a new workspace.

Setting and Modifying Projections

Every GeoWorkspace contains projection information. This information is used to convert the data in connected warehouses from their original projections to the projection of the GeoWorkspace, allowing you to work simultaneously with source data of different projections and datums. Again, the projection transformation that occurs in the GeoWorkspace has no affect on the source data. A base storage type is assigned as either geographic or projected, and various projection algorithm parameters are available for user configuration based on the storage type. Projections are discussed in Chapter 38 "Projections and Datum Transformations." However, in the following exercise you will learn how to modify the projection for your GeoWorkspace.

Note: For users of earlier releases, nominal map scale, which was set on the Paper Space tab of the GeoWorkspace Coordinate System dialog has been moved. It is now part of the View > Display Properties command, discussed in Chapter 8.

Workflow 32-2:

Customizing a GeoWorkspace Template

In the previous discussion you have seen the relationship between templates and workspaces. Remember, changes made in the GeoWorkspace are exclusive to the GeoWorkspace and are not applied to the data in the source warehouse. In this workflow exercise you will open the GeoWorkspace named normal.gws you created in the last exercise, change its projection to the State Plane coordinate system, and save it as a new template. You could just as easily save it as a new workspace.

1. Open a GeoWorkspace. Run GeoMedia. On the Welcome screen, click on Open Existing GeoWorkspace. Alternatively, on the Main Menu bar, click on File > Open GeoWorkspace. Also alternatively, click on the Open GeoWorkspace icon, shown in the illustration at left. 2. Select a GeoWorkspace. From the drop-down, navigate to your GeoWorkspace directory and click on normal.gws. Click on Open. You can double click on many, but not all, browse selections. 3. Select a projection algorithm. Click on View > GeoWorkspace Coordinate System. The Coordinate system dialog is shown in the following illustration. hgm3_2.tif
 
  4. Set up projection parameters. Under Base Storage Type, click on Projection. Click on the Projection Space tab and select State Plane Coordinate System 1983 from the Projection Algorithm drop-down menu. Click on the Advanced Parameters button. Select Arkansas North from the drop-down menu. Click on OK. The zone number is supplied for you. Conversely, when you provide the zone number, the zone name is supplied. 3 TIP: The projection parameters available in this dialog vary as a function of the selected projection algorithm. 5. Close the coordinate system dialog. Click on OK on the GeoWorkspace Coordinate System dialog. Remember, changing the projection in your GeoWorkspace does not change projection of the source data. 6. Save the GeoWorkspace as a template. Click on File > Save GeoWorkspace As. Select the drive and the directory where your Template directory resides from the dialog box, and type in the new template name spcs 1983. Confirm that "Save as type" is set to GeoWorkspace Template. Click on Save. Alternatively, you can click on the Save GeoWorkspace icon. GeoWorkspaces reside by default in the GeoWorkspaces directory. As noted at the beginning of this exercise, you could alternatively save this as a GeoWorkspace. The working environment is the same regardless of the file type you choose.

Options That Apply to GeoWorkspaces

There are three sections of the Tools > Options dialog that set control values relevant to GeoWorkspaces. Values entered on the File Locations tab record your default file system directory paths. The General tab contains two sets of defaults that apply to GeoWorkspaces. One gives you he option to open workspaces, but not to load data. The second gives you an option that allows GeoMedia to automatically set the workspace coordinate system. All these parameters are stored in the system registry and are therefore active for all GeoWorkspaces that you create. See Chapter 10 for a more extensive overview of the Options dialog.

Default Directories
and How to Set Them

As with other Microsoft Office compatible applications, the default GeoMedia file locations are stored on the File Locations tab in the Tools > Options dialog. The four five GeoMedia file types are GeoWorkspace Files, GeoWorkspace Templates, Warehouse Files, and Warehouse Templates and Layout Templates. Directories for each file type are created when GeoMedia is installed, and their exact location may vary as a function of system requirements and your network configuration. Consult your system administrator for specific drive designations. By default the directory for each respective file type is as follows:

C:\GeoWorkspaces

C:\Program Files\GeoMedia(or GeoMedia Profesional)\Templates\GeoWorkspaces

C:\Warehouses

C:\Program Files\GeoMedia(or GeoMedia Profesional)\Templates\Warehouses

C:\Program Files\GeoMedia(or GeoMedia Profesional)\Templates\Layouts

Note: Layout Templates are discussed in Chapter 24 "Cartographic Operations, Hard Copy and Plotting".
The path information for each file type can be changed by highlighting the file type and clicking on Modify. Expand each directory entry until you have established the complete path pointing to the directory where you want to keep each file type. Remember, this is the search path GeoMedia will use to locate files. When saving workspaces and templates back to disk, always confirm that you are writing to the correct directory.

Determining Whether to Load Data

Typically, when you open an existing workspace you want to see all the features you added to the legend, attribute data you had displayed in the data window and so forth. However, there may be times when you want to open a workspace without the overhead of loading all the geometry and attribute data. The Tools > Options General tab contains this control setting. Simply click the ‘Do not load data when opening GeoWorkspace checkbox on the General options panel. GeoMedia will recreate all the objects contained in the workspace, such as Map and Data Windows and Legends, but will leave all legend entries and Data Windows in the unloaded state. See Chapter 11 The Legend–Controlling How Features Are Displayed for more information.

Matching the GeoWorkspace and Warehouse Coordinate Systems

Traditionally, the GeoWorkspace coordinate system was used to control the display of warehouse data. You were required to define a projection for the workspace, then GeoMedia transformed all connected warehouse data from their ‘native’ projection to that of the workspace. You now have an option that allows GeoMedia to automatically assign the projection stored with your warehouse data to the workspace. The second panel on the General tab of the Tools > Options dialog is titled Match GeoWorkspace and Warehouse coordinate systems. Checking the box labeled ‘When first making connection’ will effectively override the GeoWorkspace coordinate system and display all data in the coordinate system of the warehouse in the first connection you create. Setting this default improves the efficiency of the application by eliminating unnecessary or unwanted projection transformations. Matching workspace and warehouse coordinate systems is covered in more detail in Chapter 6 Step by Step Warehouse Connection Configuration.