Wednesday, May 14, 2008

Using Update Attributes to Set Contour Elevation

An alternative method to set the elevation value of a contour line is to use GeoMedia's Update Attributes.

  1. Use the Selection Tool to select one or more contour lines with the same elevation.
  2. From the GeoMedia's pulldown menus, select Edit > Attribute > Update Attributes.

    The Update Attributes dialog appears.


  3. In the Update Attributes dialog, expand the Select Set nodes and select the feature name.
  4. On the right side of the Update Attributes dialog, click in the Value field of the feature's geometry field, e.g. LinearGeometry.
  5. Click Expression.

    The Expression dialog box appears.


  6. In the Categories list box, click Geometry.
  7. In the Functions list box, double click the function SETZ.
  8. In the Attributes list box, double click the attribute Input.{GeometryFieldName} e.g. Input.LinearGeometry.

    The Expression field should read like this:
    SETZ(Input.LinearGeometry)

  9. Type in a comma before the closing parentheses.
  10. Type in the elevation to set in the Expression field, e.g. 1000. The elevation should be in the units of the GeoWorkspace Coordinate System's Vertical Storage Unit.

    The Expression field should now read something like this:
    SETZ(Input.LinearGeometry,1000)

    Note: If the elevation you want to type in is not in the Coordinate System's Vertical Storage units, then you will have to do a conversion yourself.

  11. Click OK.

    The selected contour line's elevation is adjusted to the new elevation.



Tuesday, May 13, 2008

Setting the Elevation of Contours using Edit Geometry

One of the common tasks in the terrain modeling workflow is to interactively tag vector contour lines with an elevation. I could not find a command in GeoMedia Terrain 6.0 or any steps in the delivered documentation. I could do the job with GeoMedia's Functional Attributes but I have to calculate the elevation values manually taking into account the storage units and my height unit preference - that would definitely scare users away. I later found out that I could also use GeoMedia Professional's Edit Geometry command. Here are the steps to tag contour lines with elevation with the Edit Geometry command.
  1. Activate the Selection Tool.
  2. Select a contour line geometry in the map window.


  3. In the GeoMedia Professional Edit pulldown menu, select Edit > Geometry > Edit.

    All the vertices in the contour line are displayed as black handles.


  4. Click on a vertex handle on the contour line to select it.

    The selected vertex is displayed as a purple filled circle.


  5. Right click in the map window to bring up the Edit Geometry context menu.


  6. Choose Select All.

    All the vertices are selected and are displayed with purple filled circles.

  7. Right click again in the map window to bring up the Edit Geometry context menu again.
  8. This time, choose Edit Height.

    The Edit Height dialog appears.

  9. In the Edit Height dialog, type in the height value.
  10. Click OK.

    The height of the contour line is changed to the new value.

  11. Press ESC.

    The Edit Geometry command is deactivated.
The good points about Edit Geometry are that the height units follow the user's preferences set and the height changes can be undone. On the downside, the workflow is still a little cumbersome having to select all the vertices (which take a while if a contour line has a lot of vertices). I just might decide to write a GeoMedia custom command just to set the elevation of geometries.

Friday, May 9, 2008

GeoMedia Terrain 6.1 Released

Intergraph has just released a new version of GeoMedia Terrain version 6.1 in April. According to the release notes, this release is for delivering a version of GeoMedia Terrain that is compatible with GeoMedia 06.01.00. Enhancements in the new version include:
  • Performance improvements
  • The ability to take in larger data volumes than version 6.0
  • New Primary InterOp Assemblies for .NET application development
  • Windows Vista support and 64-bit hardware compatible
I have encountered poor performance and inexplicable crashes while writing a training course guide for GeoMedia Terrain. I have just ordered a copy of the software and once I receive the DVD, I hope to give the new version the run through and see whether Intergraph has fixed the problems.

Monday, April 28, 2008

Alternative method to create PDF Plots from GeoMedia BatchPlot

There is a white paper from Intergraph detailing a workflow where you can create PDFs from batch plotting using Adobe Acrobat's Distiller. In this posting, I will describe an alternative method to create PDFs using the open source software ImageMagick instead of Distiller. While ImageMagick is free, the trade off is that the map image in the output PDF file is a raster image. Basically, the method is easy: just use BatchPlot to export to an image file, then use ImageMagick's convert utility to create a PDF file from the image file.

Step 1: Use BatchPlot to create the image file
If you are familiar with the BatchPlot utility in GeoMedia, you'd know that it can create bmp, jpg or tif image files of the map layout window contents. You can use the BatchPlot graphical user interface or the command line interface to create the image file.



Or for example from the command line:
C:\> BatchPlot export -file "C:\Temp" -type jpg -resolution 300 "C:\MyDocuments\geomedia.gbp"

The above example will create the JPG files in the folder C:\Temp.

Step 2: Use ImageMagick to convert to PDF
The convert utility has a long list of options but for our purpose, we only need to specify the input file name and the output PDF file name. For example from the command line, type in the following:

C:\> convert "C:\Temp\MapImage.jpg" "C:\Temp\MapImage.pdf"

This will create the PDF file from the image file generated by the BatchPlot utility.

That's it. Simple.

Monday, April 14, 2008

Editing GeoMedia Terrain Models

The documentation that comes with GeoMedia Terrain 6.0 does not provide clear details on practical usage of the terrain model editing commands. While writing a GeoMedia Terrain training course guide, I figure out that displaying the terrain model vertices and triangle edges goes a long way in helping users understand how to use the editing commands. By the way, this is not described in the delivered documentation.

Displaying Terrain Model Triangle Edges and Vertices
  1. In the GeoMedia menus, select Legend > Add Legend Entries.

    The Add Legend Entries dialog box appears.

  2. Expand the Terrain Warehouse connection node that contains your TIN terrain model.
  3. Check the {YourModelName}_TriangleVertices feature on.
  4. Check the {YourModelName}_TriangleEdges feature on.

    The Add Legend Entries dialog box should like as shown below.
  5. Click OK.

    The triangles and edges are displayed in the active map window.

Editing Terrain Model Vertices
Now that you can see the triangle vertices and edges, editing the model is so much easier.
  1. In the GeoMedia menus, select Terrain > Edit > Edit Model Vertices.

    The Edit Vertices dockable control is displayed.
Insert Vertices
  1. In the Action drop down list, choose Insert.

    You are prompted to "Select vertex to insert" in the GeoMedia status bar.

  2. In the Operate on drop down list, choose Individual vertices.
  3. In the Z field, enter an elevation value e.g. 5000.
  4. In the map window, click a new vertex point.

    A new vertex is created in the map window. You can see the model triangle edges and points dynamically adjust themselves to accomodate the new vertex.

  5. You can click to insert more vertices.
  6. If you made a mistake, you can do a mouse right click in the map window.

    The Edit Model Vertices context menu pops up.

  7. Choose Undo to remove the last vertex.
  8. After you have inserted all the vertices that you want, do a mouse right click in the map window.
  9. Choose Update Model to save the new vertices permanently into the terrain model.
  10. Right click and choose Cancel to terminate the command.
Move Individual Vertices
  1. In the Action drop down list, select Move.

    The cursor becomes a cross hair cursor. You are prompted to "Select vertex to move".

  2. In the map window, click on a vertex.

    The vertex is highlighted and you are prompted to "Select location to move".

  3. Click on the new location in the map window.

    The selected vertex is moved to the new location.

  4. In the map window, do a mouse right click and select Update Model.

    The changes are saved permanently.
Delete Individual Vertices
  1. In the Action drop down list, select Delete.

    The cursor becomes a cross hair. You are prompted to "Select vertex to delete".

  2. In the map window, click on a vertex.

    The selected vertex is removed and you are prompted to "Select another vertex to delete".

  3. In the map window, right click and choose Update Model.

    The changes are saved permanently.
Move Vertices in a Selection Set
  1. Click on the Select Tool icon.
  2. Then click on two or more vertices in the map window. Note that if you want to add to the selection set, then you need to press down the CTRL key on the keyboard while clicking.
  3. After you are done with selection, in the Action drop down list, select Move.
  4. In the Operate on drop down list, choose Select set.

    You are prompted to "Input X,Y values to move the vertices.

  5. Then key in the relative X and Y offsets in the X and Y fields, e.g. X=500, Y=500.

    You are prompted to Click Process Move to move the vertices.

  6. Do a mouse right click in the map window. In the context menu, choose Process Move.

    A message box appears showing the number of vertices moved and the number failed.

  7. Click OK.

    The vertices in the selection set are moved by the relative X and Y offsets.

  8. In the map window, right click and choose Update Model to save the changes permanently.
Editing Terrain Model Z Elevation Values
You need to activate the Edit Z dockable control toolbar to perform editing on the Z-elevations of the terrain model. Select Terrain > Edit > Edit Z in the GeoMedia menus.

The Edit Z dockable control appears.


Edit Individual Vertex's Z Value
  1. In the Edit Z control's Applies to drop down list, select Individual vertices.

    You are prompted to "Select vertices to edit".

  2. In the control's Operator field, choose None.
  3. In the control's New Z field, enter an elevation e.g. 6000.
  4. Click on an existing vertex in the map window.

    You are prompted to "Select another vertex or choose 'Edit Vertices' to perform the edit.

  5. Click on additional vertices.
  6. When you are done, right click in the map window and choose Edit Vertices to perform the edits.

    The message box appears showing the number of vertices edited or failed.

  7. Click OK.

    All the selected vertices' elevation values are updated.

Edit Z of Vertices with the Same Z
  1. In the control's Applies to drop down list, select Vertices with same Z.
  2. In the control's Original Z field, enter the Z elevation of the vertices to change e.g. 6000.
  3. In the control's Operator drop down list, select an operator e.g. +.
  4. In the control's Operand field, enter the delta value e.g. 500.

    The control's New Z field shows the resultant Z value,
    e.g. New Z= {Original Z=(6000)}{Operator=(+)}{Operand=(500)}=6500.

  5. In the map window, right click and choose Edit Vertices.

    After processing, the message box showing the number of vertices edited or failed appears.

  6. Click OK.
  7. In the map window, right click and choose Update Model to save the changes permanently.




Thursday, April 10, 2008

GeoMedia 6.0 Command Wizard for Visual Studio 2005

GeoMedia version 6.0 does not come with a command wizard for Visual Studio 2005. I found out that there is a zip file GeoMediaWizardVS2005v60.zip available from the Intergraph website http://synergy.intergraph.com (login required). Download and extract the contents of this file and follow the following procedure to install it as an add-in to Visual Studio 2005.
  1. Extract templates.zip to Drive:\Program Files\GeoMedia\wizard\Templates folder.
  2. Extract Regwiznet.zip to Drive:\Program Files\GeoMedia\wizard\ folder.
  3. Extract GeoMediaCmdWizNet8.zip to Drive:\Program Files\GeoMedia\wizard\ folder.
  4. Run Drive:\Program Files\GeoMedia\wizard\Regwiznet.exe.
  5. Start Visual Studio 2005.
  6. Select Tools > Add-in Manager (notice the GeoMedia Command Wizard Add-in)


Note: If you are using GeoMedia version 6.1, then you no longer need to do the above as 6.1 comes with the Visual Studio 2005 add-in.

Thursday, April 3, 2008

Work around GeoMedia Map Publisher's Slow Dialog Boxes Display Problem

GeoMedia Map Publisher is a brand new product from Intergraph for cartographic map production including project management, instance-based cartographic editing and display management. I tried out the spanking new Intergraph GeoMedia Map Publisher 6.1 software, released in December 2007. Overall, it is a pretty cool product but like all new software, there is bound to be some irritating program bugs. The first thing that I noticed was that the dialog box display of the product takes an annoyingly long time to complete refresh (if at all). This makes it difficult to work as you cannot see the text fields until the refresh completes. After discussing the problem with an Intergraph support engineer, he suggested the following workaround outlined below. Basically, the problem will go away if the Windows DirectX acceleration is disabled.

Workaround Steps:

  1. On the Windows Desktop, right-click the mouse and select Properties in the context menu to bring up the Display Properties dialog box.
  2. Press the Settings tab.
  3. Click the Advanced button to bring up the Plug and Play Monitor Advanced Settings dialog box.
  4. Click the Troubleshoot tab.
  5. Move the Hardware acceleration slider to the third scale mark. Make sure that the description below is saying something like "Disable all DirectDraw and Direct accelerations...", as shown in the screen shot below.
  6. Click OK. That's it! From now on, the annoying slow dialog box display will be gone.