Friday, September 30, 2005

Update to the FME GTViewer Reader/Writer



The latest FME Beta (build 2125) from Safe Software includes an update to the GTViewer FME Reader/Writer Modules. This update includes several fixes that have accumulated since the modules were introduced, and more importantly it includes a significant amount of new functionality for making the GTViewer modules more powerful and easier to use.

The original Writer Module was only able to produce one GTViewer category per Destination Dataset in FME. While this limitation did not prevent multiple categories from being created, it now only requires the setting of gti_categoryId format attribute. The value the gti_categoryId attribute is set to now determines the GTViewer category the feature will be written to.

This update also allows the users to create an Overview category. In the previous version, the Overview category was automatically generated with a single data bounding rectangle. Now, any feature written with gti_categoryId equal to 1 will be written to the Overview category.

A new directive file called catNameMapInfo.txt has also been added to allow a simple text file to map category names and category display settings (display on/on, min/max thresholds) to be statically defined in the GTViewer output directory. If the directive file is present, it will be used to fill in names and settings in the .GTM file produced. The GTM Directive files (genInfo.txt, addInfo.txt, catInfo.txt, and catNameMap.txt) can all be optionally used to provide information that is not necessary part of the conversion process, but is part of the polished results. By using these directive files, you should not have to modify the .GTM file after the conversion process.

GTI will continue to improve the GTViewer Reader/Writer modules for FME as they have proven to be a very powerful means of getting data into and out of the GTViewer format. Through the use of FME, GTViewer, Pocket GTViewer, GTVx, and GTWeb can be used with any of the data formats FME Supports.

Monday, September 26, 2005

GTData 5.0.0.1 is Available



Version 5.0 of GTData has been released. This version contains updates of the utilities to support the new functionality found in GTViewer 5.0 as well as some new features and fixes.

-----------
05.00.00.01 - 09/26/05
-----------

- NEW - GTShapeConv - A RangeFile entry has been added to produce a valid range file usable in a .GTM file to define the data range. The RangeFile entry, is defined in a Category section of the parameterfile and defines a path to the file to create.

- NEW - GTShapeConv, GTIntersect, GTShapeDbfConv - Now supports environment variables as tokens.

- NEW - GTFormatInfo - No includes a filterId entry in the parameter file to restrict processing to a specified set of filter ids. Entry can be a single values or a comma delimited list with ranges.

- NEW - GTExtract - Supports the ExtractAllDetailRanges flag in the .GTM file.

- NEW - GTExtract, GTQuery, GTPack - Support for Type 40 Address Queries.

- NEW - GTGetRecords - The -oh flag was added to omit the header line in the output file.

- NEW - GTConv - Tiling feature for files that all overlap.

- FIX - GTConv - Cell with all internal elements filtered out with the level filter would generate an index record even though there was no element.

Thursday, September 22, 2005

New Coordinate Readout Modes in GTViewer 5.0

GTViewer has always provided two modes for Coordinate Readouts: system mode and computed mode. With GTViewer 5.0, two more modes are provided to display coordinates at latitude and longitude values.

The Coordinate Readout defaults to Computed mode and most users probably never change it. Computed mode displays the coordinate values as they are in their source GIS which is what most users want to see. Computed is probably a misleading label, but the values are “computed” from GTViewer’s internal system coordinates. The System mode will display the coordinate values using the internal coordinate system used by GTViewer and is probably only useful to advanced users working directly with the data.

With GTViewer 5.0, there are two new modes for displaying the coordinates as latitude and longitude regardless of the coordinate system used by the data. One mode displays the coordinates as Decimal Degrees and the other as Degrees/Minutes/Seconds.

The Coordinate Readout setting affects the display and use of all coordinate values in GTViewer:

  • The current position on the cursor is shown on the status bar
  • The Attribute Info Dialog’s Element tab show element coordinates
  • The coordinate labels used on Print borders
  • The interpretation of coordinate values in the Locate XY dialog

There are two requirements before the Latitude/Longitude modes can be used:

  • The GPS Components must be installed for GTViewer
  • The data must have a coordinate system defined using the GPSInfoFile entry in the .GTM file

The Coordinate Readout mode is set either in the .GTM file with the CoordinateReadout entry or with the Options/Settings dialog in GTViewer. The Settings dialog in GTViewer 5.0 now allows the user to set a coordinate system as their personal default, so if the user wants to always use one of the Latitude/Longitude modes, they can set this as their default.

When using either of the Latitude/Longitude modes, the Locate XY command found under the Query menu becomes a Locate Latitude/Longitude command and it will accept either Decimal Degrees or Degrees/Minutes/Seconds as inputs. To use Degrees/Minutes/Seconds, separate the three components with a delimiter (space, comma, colon, or semicolon); there must be three delimited values for both the Lat and Long prompts.


Remember that in the Western Hemisphere, the Longitude value is negative to indicate West. Use a negative value for Latitude to indicate South.

When using the Latitude/Longitude Coordinate readout with Decimal Degrees, you will usually need to increase the Coordinate Readout Precison to 6 or more numbers after the decimal place to get a useful readout. The precision is also set with Options/Settings.

For more information on the Locate XY dialog see the previous Blog posting: Locate XY's Hidden Features

Wednesday, September 21, 2005

GTViewer 5.0 has been released



GTViewer 5.0 has been released.

See previous posting for details on new features.

Monday, September 19, 2005

Masking a shape for plotting

I'd like to share a user control I wrote for a client. He wanted to select a shape element and plot only what was inside the shape. The user control makes a mask around the shape. Then the user can adjust the view as he likes and then plot it.

For those of you who have written user controls for GTViewer, this will be old hat. For those who have not yet attempted one, this could be an easy start. It illustrates how to capture a feature that the user selects and do something based on that feature.

As with all user controls, make an entry in the .gtm file in the [External Applications] section, as documented in gtvconfig.doc in the 5.0 release. Then register the .ocx file, and GTViewer will automatically place it on the Query menu. When you open the .gtm file.

Sample code can be downloaded from http://www.gti-us.com/Blog/PlotShape.zip

Monday, September 12, 2005

The Data Monitor comes to GTViewer 5.0

GTViewer 5.0 includes the Data Monitor functionality provided in GTVx. For more information on the Data Monitor see the previous Blog posting: The Data Monitor in GTVx.

The Data Monitor provides a powerful set of tools for displaying geographically oriented data that is of a temporary nature. One might compare the Data Monitor items to Redlines (or session graphics), but the Data Monitor items are more for conveying information to the user at the moment rather that providing a mechanism for sharing and storing data. Lighting Strikes, Vehicle Tracking, and Outage Management are the example I provided in the previous posting.

The Data Monitor has been withheld from GTViewer in the past because it usually requires more coding than typical External Apps, and if you are going to be doing that much customization, GTVx is usually a better solution. However, the Data Monitor turns out to be very useful in very simple applications just as a means of presenting information to the user. For example, an application might read a file of ticket information and show the tickets at their geographical locations with all of their corresponding data as tooltips. Currently, the Data Monitor in GTViewer and GTVx are identical providing the same set of methods and events. The Data Monitor consists of around 50 methods to create, modify, and delete items. Five events are provided to know when items are clicked, double-clicked, and when tooltips are displayed and hidden.

The Data Monitor has been a very powerful too in GTVx for several years. Now, this power is part of GTViewer as well.

Friday, September 09, 2005

Applications Interacting with GTViewer

We get questions about how an application written in, say Visual Basic, can interact with GTViewer. This capability has been in GTViewer for a long time. We have recently updated the documentation in gtvconfig.doc for the 5.0 release, and it includes a descrioption of just how to do it. I'm going to paste a preview of that section of gtvconfig.doc below. It will be most useful when used on conjunction with gtvx.doc, which has a decription near the front about the differences between using GTVx and the methods exposed by GTViewer, as well as a list of methods and which ones are currently exposed in GTViewer.

So here is a section you put in the .gtm file in order to let your VB app interact with GTViewer. It will appear on the Query menu with a name you specify:

External Applications Section

The External Applications Section is used to specify parameters for ActiveX user controls. This mechanism allows sophisticated applications to be developed in Visual Basic that call methods exposed by GTViewer and interact with the graphics and tabular data.

· The ActiveX entry defines an external application for GTViewer with the following format:

ActiveX|<name>|<menu Position>|<objectPath>|<mode>
|<flags>|<height>|<width>|<x>|<y>|


  • Name is the name that will appear on the Query menu in GTViewer at the bottom of the list after the names of locate and thematic highlight queries. The Name must be unique.
  • Menu Position is for future use. Currently, it should be set to the numeral “1”.
  • ObjectPath is the path to the ActiveX user control that the system will recognize. In Visual Basic projects, the objectPath will typically be the name of the Project as found in Project > Properties followed by a dot, followed by the name of the user control, typically “UserControl1”.
  • Mode is set to 0 for modal dialog and 1 for non-modal. Modal dialogs must complete before they return control to GTViewer; Non-modal dialogs can run simultaneously with GTViewer.
  • Flags is for future use. Currently, it should be set to 0.
  • Height is the height in pixels of the area that will be reserved in GTViewer for the display of the user control.
  • Width is the width in pixels of the area that will be reserved in GTViewer for the display of the user control.
  • X is horizontal position in the GTViewer map window at which the upper left hand corner of the user control will be displayed.
  • Y is vertical position in the GTViewer map window at which the upper left hand corner of the user control will be displayed.
Example:

[External Applications]

ActiveX|<name>|<menu Position>|<objectPath>|<mode>|<flags>|

<height>|<width>|<x>|<y>|

ActiveX=Valve Isolation Trace|1|GTV_ElectGasDemos.ValveIsolation|

1|0|250|450|0|0

ActiveX=Highlight By Phase|1|GTV_HiliteByPhase.UserControl1|

1|0|270|220|0|0

ActiveX=Pole Inspection/New Pole|1|GTV_PoleInspection.UserControl1|

1|0|480|340|0|0|



Wednesday, September 07, 2005

Getting the most out of GTConfig

GTData contains over 40 utilities for performing a variety of Data related tasks. Many of these utilities are for the conversion to or creation of data in the GTViewer format; however, one of these utilities is provided to make configuration easier. The topic of this posting is GTConfig. GTConfig is actually a multipurpose tool that can be used for several different tasks (including data conversion), but this posting is only going to cover using GTConfig for configuration.

The simplest way to describe GTConfig is to say that it is simply a GUI for editing and manipulating GTViewer Table Definition Files (.TAB). A .TAB file is used by every GTViewer dataset that contains tabular data and it defines the Tables, Columns, and other metadata properties including:

  • Tables that are to be displayed
  • Table Display Order
  • Alternate Table Names
  • Attributes that are to be displayed
  • Attribute Display Order
  • Alternate Attribute Names
  • Table and Attributes that are omitted from Extracts

As you can see, these setting are things that you would most likely want to modify to make your data more friendly for your users. While the table structure is generally fixed and should not be changed, the display characteristics can be very important in making data more usable.

The .TAB file and its format are comprehensively described in the GTVConfig.doc (not to be confused with GTConfig.exe) and anything you can do with GTConfig to configure this file can also be done manually. The benefits of using GTConfig lie in its GUI to edit the file and not using Notepad or some other text editor. GTConfig also provides some Macro-like functionality for performing the same operation to all tables and all attributes. It also provides some template based functionality to modify all table and attributes to a commonly used configuration. So, while GTConfig cannot do anything that is not already achievable by manually editing the .TAB file, it does provide an easier way to perform the same task with much greater efficiency and is less prone to mistakes.

GTConfig is a simple tool to use. You can run it from the command-line without or without a .tab file specified:

GTConfig

Or

GTConfig data.tab

If you do not specify the .TAB file on the Command-line, you can use the Open button to select any .TAB file you like. Once GTConfig is running with an open .TAB file, you get something that looks like this:

You will see a list of Tables defines in the .TAB file along with their current settings. Selecting a table from the list will populate the Table Properties section showing which values can be modified:



Generally, for Tables, you will only modify the Display Name, Display Flag, and Display Priority. The Name, Number, and Reference Table setting can be modify if you uncheck the Lock Standard Properties checkbox, but these changes are not recommended.

The Display Name is the name used for the Table on the Attribute Info dialog’s Tab for the particular table. The Display Flag can be set to Show, Hide, or Omit. When set to Hide, the table will not display on the Attribute Info dialog, but the data will still be present for applications to use. If set to Omit, the Table will be omitted from any extraction of the data (either by GTViewer or GTExtract). If set to Omit, the data will not only be hidden, it will be removed from the extract making it unavailable for applications to use. The Display Priority determines the order of the Tabs in the Attribute Info dialog. Lower values are displayed first. In the following Attribute Info dialog, Pole was set to 500, Work Order was set to 800, and Elect Connectivity was set to 900. The Element tab is always last.

If Display Priorities are not set, the tables will displayed in the order they are found which usually appears somewhat random. In practice, it is usually good to set tables that are part of every feature (like a Common table or Connectivity table) to a high value, so they will always appear after the feature’s main table. From the Attribute Info Dialog box above, you can also see that the Display Names were also set: POLE = Pole, WORK_ORDER = Work Order, and ELECT_CONNECTIVITY = Elect Connectivity.

Once your Tables have been configured, you can configure the columns for each table. Double-clicking on a table in the list will take you to the Table Attribute page:




This dialog is very similar to the initial dialog only it pertains only to the selected table. It shows all of the columns define for the selected table along with the display settings.

The settings for Attributes are very similar to those of tables. You can set the Display Name, Display Flag, and Display Priority. Name, Type, Size, Decimals, and Key are locked by default and should not be modified.

The Display Name will be the name seen in the Attribute Info dialog. Display Flag can be set to Show, Hide, or Omit (same actions as the Display Flag for Tables). The lower Display Priority values are displayed first. Unlike the tables, if a Display Priority is not specified (or they are all the same), the attributes will be displayed in the order they appear in the .TAB file (instead of a random order).

The Table Attribute page also provides 3 buttons for setting the Display Flags of all attributes in the table with one click of a button: Show All, Hide All, Omit All. If you need to only show a few attributes, it may be quicker to Hide All then set the ones you want to see to Show.

GTConfig also provides some commands to affect the configuration on a grander scale than one table or attribute at a time. Back on the Main Page, the Global Operations section can be used to perform a variety of tasks.



These Global Operations deal with all of the attributes of each table. You can specify a list of attributes in the Attributes prompt (more than one can be specified if you separate them by a space), then the Show, Hide, Omit, and Priority Set button can be used. If the Show button is pressed, each table will be searched for the Attributes specified and their Display Flag will be set to Show. The Hide and Omit buttons can be used in the same way. The Priority value can be set and the Set button can be used to apply this priority to all attributes that are specified (regardless of the table they are in). The Optional Framme button is a quick way to list Framme attributes that are generally optional (RB_LOCK, RB_VERSION, RB_COMPONENT, RB_STATE, MSLINK, RB_OCCURRENCE). These attribute generally have little meaning for GTViewer data, so you can press the Optional Framme button, then Hide or Omit and get rid of all them at once. The Required Framme button populates the Attributes prompt with the required Framme attributes (RB_PRMRY, RB_SCNDRY, RB_FSC). In general, you must keep these attributes, but it is common to Hide them since they are generally of little use to users.

The last 4 buttons in the Global Operations section are: Pretty 0, Pretty 1, Pretty 2, and Clear. These button will apply a template to all of the tables and attributes to “Pretty” up the display using a standard method:

  • Pretty 0 – sets all of the Display Names for tables and attributes to be the same as the actual name.
  • Pretty 1 – sets all of the Display Names for the tables and attributes to be the same as the actual name. All underscore characters ( _ ) are converted to spaces.
  • Pretty 2- sets all of the Display Names for the tables and attributes to be the same as the actual name. All underscore characters ( _ ) are converted to spaces, the first letter of each word is capitalized, and the remainder of the character in the word are set to lower case.
  • Clear – sets all of the Display names for the tables and attributes to blank (meaning that no alternate value is provided).

Once your are finished configuring your data display, you can press the Save button to store the new configuration information. GTConfig provides two of feature that are worthy of mentioning. The Report button will generate a .csv file that contains all of the information in the .TAB file in a easier to use format. You can open the .CSV file up in Excel and view the information in a report format. The Import button is a powerful feature for importing Display settings from other .TAB file. If you import a .TAB it will apply any Display Name, Display Flag, or Display Priority setting for both tables and attribute for any tables and attributes that are found in both the current .TAB file and the one being imported.

One thing that many users forget is that you can have multiple .GTM files define pointing to the same data but can view the data differently with different .TAB files. It is usually a good idea to target the data for its users so that they can get the most out of it.

GTConfig is a powerful tool. It can save a great deal of time and can help improve the usability of the data.




Thursday, September 01, 2005

GTViewer 5.0 to be released in September



GTViewer 5.0 will be released later this month. Beta versions are available today.

GTViewer 5.0 is the 6th major version of GTViewer since its creation in 2000. If you are wondering how there are 6 versions when the version is only 5.0, there was a Version 1.1.

New versions of GTVx and Pocket GTViewer will follow.

A short list of the new functionality found in GTViewer 5.0 is listed below:

Usability Enhancements
  • Attribute Info Dialog: Resizable and Preview Tab for Linked Raster Files
  • Auto-Scroll while Measuring
  • Stop View Refresh with Right-Mouse click
  • Right-Mouse Menu: Integrates feature selection for Attribute Info and speeds display of associated files, like details, internal worlds, and scanned images
  • Fit command adds Fit Highlighted Elements and Fit Selected Elements
    Accelerator keys provide an alternative way to perform common tasks (especially useful for laptop)
  • One-Click retrieval of Linked files in Attribute Info mode
    Query enhancements: Number of allowed queries increased from 50 to 100 per dataset and Query Menu Grouping simplifies query access
  • Two new coordinate readout modes for display location in latitude and longitude

Security Enhancements

  • Optional Disclaimer Dialog requires the user to accept the disclaimer before opening data
  • Optional Auto-Timeout automatically ends application after a specified amount of time

Printing Enhancements

  • Print dialog has interactive support for border information
    Border field tokens for date, time, x, y, user, and data set description
  • Customizable Overview window allowing user-specified size, shape, and content.

New User Settings

  • Maximize Initial View
  • Open Last File
  • Hide Locate XY query
  • Reverse Mouse Wheel Zoom direction

Style Manager

  • Interactive tool for changing the way GTViewer displays elements; define, Edit, or delete Style Rules and Mapping
  • Change up to 28 symbology parameters including color, weight, line style, symbol, font, fill, scale, priority, etc.
  • Navigate existing mappings easily with cross-reference info.
  • Import and Export Style information.
  • Facilitates the Symbology definition for data converted with FME.

Redline Enhancements

  • Interactively place hyperlinks as redlines
  • Hyperlink can jump to an area in the data, external files, and now URLs
  • Four new Dimension Element styles

Geocoding

  • Find a specific address from street segments with address range information
  • Address location is interpolated from available information

Display Enhancements

  • Layered Symbol Support
  • Priority Display support for Highlighted Elements
  • Default Symbology can now be default for data with no defined symbology

Customizability Enhancements

  • 60+ new methods
  • Data Monitor support (similar to that found in GTVx)
  • Support for Launching and running GTViewer from stand-alone apps (opposed to running as external apps inside GTViewer)

Miscellaneous

  • GPS Interface enhancements
  • Feature Counting enhancements

Monday, August 29, 2005

Attribute Info and Zoom (and a peak at GTViewer 5.0)

GTViewer provides the Attribute Info and Zoom commands for reviewing feature attributes and navigating the view. These two commands have a great deal of overlap in their overall functionality and with the upcoming GTViewer 5.0, the difference between these two commands will blur even further. The Attribute Info and Zoom commands will be discussed in detail by this blog posting so that they can be fully utilized by the users; also, the new functionality they will offer in GTViewer 5.0 will be introduced.


Traditionally, the Attribute Info command has been used to select a feature and retrieve tabular information and linked files. However, the command also provides the ability to zoom in, zoom out, and go back to the previous view.


The Zoom command has traditionally been solely for navigation by providing the ability to center the view on a mouse click and providing the ability to zoom in, zoom out, and go back to the previous view.

The only difference between the Attribute Info and Zoom commands is that the click will retrieve feature attribute in one and center the view in the other. Both command can Zoom In, Zoom Out, and go to the Previous view.

Use either of the command is very simple. Once in the selected mode, a single click of the left mouse button (or pressing the stylus to the screen) with no dragging of the cursor will result in the action specific to the active command:

  • The Zoom command will center the view on the point clicked on.
  • The Attribute Info command will retrieve tabular information and linked files for the feature under the click. If more than one feature is present at the click location, a popup list will allow the user to select the specific feature to review.

The different navigation actions are interpreting from the movement of the cursor (by a mouse or stylus). The diagram below shows the action that will be taken by the cursor action in both Attribute Info command and Zoom command.

To perform a navigation action, click the left mouse button (or press the stylus on the screen) and drag the cursor in a direction. Releasing the mouse button (or lifting the stylus) will initiate the navigation action. If the Center mark is the click-down location, the quadrant the cursor is dragged into determines the navigation action:

  • Zoom In - Drag Down and Right – The area inside the box you draw with the cursor (between the click-down location and the current location) will be fit to the current view size. The smaller the box you draw, the more zooming will be performed. The cursor will change to a Plus sign “+” when in Zoom In mode.
  • Zoom Out - Drag Up and Right - the farther you drag, the more you zoom out). The cursor will change to a minus sign “-“ when in Zoom Out mode and the farther you drag the cursor in this mode, the larger the minus sign cursor appears and the more you will zoom out.
  • Previous View - Drag Up and Left – The View/Location History command can be used to see what path the user has taken to get to the current view. Each previous view command executed, will step back through this list until it is at the first view when the dataset was opened. The cursor will change to a left facing arrow when in Previous View mode.
  • Cancel - Drag Down and Left – In case you start a zoom out, zoom in, or previous view, you can change your mind and stop the action before the view is manipulated. You can also press the Esc button to cancel an action that has begun. The cursor will revert back to the default Northwest arrow when the Cancel is mode is active.

While this concept of dragging the cursor into the different quadrants to perform a specific action may at first seem unnecessarily complicated and may be somewhat different from other applications you have used, it has proven to be much more efficient than other techniques and is very easy to get used to. It may not be readily obvious that the benefit of the modes combined into a single command is that you do not have to continuously change your mode to perform a range of navigation functions. For example, if you had a different commands for Zoom In, Zoom Out, Previous View, and Window Center (4 buttons on the toolbar), imagine how many times you would have to change modes to navigate to a specific feature. Each time you change modes, you must travel back to the toolbar, find the button to press, then go back to the view where you want to perform the action, then go back to change the mode again, and again. With the navigation modes all combined into one command, the user never has to go back to the toolbar to change modes and is immediately able to perform the navigation operation without any additional interaction with the software.

The Zoom mode is a nice all-in-one tool for navigating the view. If you use the Attribute Info mode, you trade the Window Center for a Feature Review while still maintaining the ability to Zoom In, Zoom Out, and go to the previous view. For me, this mode has always been the ultimate multi-function mode since you never have to change mode to review attributes and navigate. In fact, the Zoom mode could be done away with completely with minimal loss to the application’s functionality. However, GTViewer 5.0 will provide some new functionality to breathe a little life into the Zoom mode and it may be the ultimate mode for the future.

GTViewer 5.0 provides a subtle yet dramatic change to way you can perform basic tasks in GTViewer. The right-mouse menu has always been available to provide a quick popup menu of commonly used commands right at the mouse cursor.

Now, the right-mouse menu will search for any features present at the click and will pre-pend any features found to the beginning of the right-mouse menu. Also, if any feature has a linked file associated with it, the linked file will also be displayed under the feature in the right-mouse menu. By select a feature in the menu, the Attribute Info dialog will be displayed. By selecting a linked file, the associated file will be launched immediately (without going through the Attribute Info dialog, selecting the Link tab, and activating the link).

With the enhanced right-mouse menu, it no longer matters what mode you are in if you want to review a feature or see a linked file. So, you can stay in Zoom mode and perform all of the navigating and reviewing you want with more navigation actions than the Attribute Info mode can provide and still maintain the ability to review a feature without changing modes.

The Attribute Info command has also been enhanced for GTViewer 5.0. It now provides the ability to jump directly to a linked file without going through the Attribute Info dialog. If a feature has a linked file associated with it, you can launch the linked file by holding in the Ctrl key when the left-mouse button is clicked on the feature. If more than one detail is available, a pick list will be provided.

Both of these enhancements in GTViewer 5.0 provide even more flexibility to the way you operate in GTViewer. By making information easier to get to and optimizing the user workflow to perform common tasks, GTViewer again caters to the user’s need for a more productive environment.

Tuesday, August 23, 2005

Dimension Elements in GTViewer and GTVx

GTViewer and GTVx both support the drawing of Dimension Elements. These elements are exactly what you might imagine; they show a length and a reference line to help clarify dimensionality. The example below shows two dimension elements:

The Dimension Elements can automatically compute the length as they are drawn or you can enter any text you want to display for the dimension value. The Dimension Element tool is found under Draw/Dimension in GTViewer and is also on the toolbar:


Activating the Dimension Element mode will display the following dialog box:

Font and Size both deal with the Dimension Text characteristics. Color applies both to the reference line and the text. Weight applies only to the reference line. The Dimension Text can be manually entered or the Automatic Text option can be used to compute the displayed length based on the length of the reference line drawn.

Text Orientation and Terminator Orientation both relate to the appearance of the Dimension Element. Text Orientation specifies how the Dimension Text will appear relative to the Reference line. There are currently 4 different options:

The Terminator Orientation specifies how the arrow heads on the end of the reference line will appear. There are currently 6 different options:

The Dimension Element properties can be changed after placement by selecting the element and pressing the Properties button on the Redline Toolbar. Several Keys can also be used to adjust the appearance of a Dimension element if it is selected:

  • The Enter key will iterate through the Terminator orientation.
  • The Space Bar will iterate through the Text Orientations.
  • The Plus and Minus keys will scale the Text and the Terminator Arrows without affecting the length of the line.
  • The standard redline scaling, rotating, moving can be done with the Shift-Arrow Keys and the Ctrl-Arrow Keys.

If using the Automatic Text mode, the Text will be fixed after the placement, so that you can adjust the reference line without changing the text. If you do want to recomputed the text, just select the Properties and check the Automatic Text button and say OK. This action will update the text to the new computed length.

The Automatic Text mode’s Unit comes from the Master unit defined for the data and the Format droplist on the Dimension Element Dialog box can be used to specify how many numbers appear after the decimal point.

Friday, August 19, 2005

Pocket GTViewer version 4.0.x.6 is Available


Pocket GTViewer version 4.0.x.6 is now available. This version contains significant enhancements to the External Application Interface (especially for supporting Visual Studio .NET Smart Device Applications), performance enhancements for large "Shape with Holes" elements, and additional GPS support.

-----------
04.00.00.06 - 08/19/05
-----------

- CHG - Shape with Hole drawing has been optimized to provide significantly better
performance when viewing large shapes up close.

- NEW - Info Exhange interface adds new Instruction: ChangeColor

- NEW - TrimbleSupport flag added to Additional Properties section. When set to 0,
the NMEA receiver modes with Lat/Long coordinate projections will work without
the GPS Components installed.

-----------
04.00.00.05 - 07/06/05
-----------

- CHG - NMEA Receiver Setup will now go up to COM16 (instead of COM8).

- FIX - Links on features with repeating components would double the entries on the
Link Tab.

- NEW - Links can now use URL addresses.

- FIX - Reference elements could miss some of the tabular records associated with the feature.

- FIX - Launch with Point mode did not scale the reference point for HiRes screens.

- CHG - Evaluation Timeout extended

- NEW - External App modes can now store a bitmap of the current view before launching.

- FIX - External App Launch Immediately Mode did not handle the SetAppMode instruction from external applications.

- FIX - All mouse button events are absorbed after External Apps are run. Sometimes
a mouse up event was getting carried back after an external app was started in
modes 1 or 2 then the NextMode was set to Attribute Info (causing an unexpected
feature review).

- NEW - Info Exhange interface adds new Instruction: HighlightAdd, HighlightColor, HighlightClear, PB (Add to Point Buffer), ClearPB, DrawPBLineStr32, DrawPBShape32, ExportByFilterId, ClearAll

- NEW - Info Exchange interface adds new exchange values: ~BMP_FILE, ~RNG

Thursday, August 18, 2005

COGNET GIS Advisor - August

Check out the latest COGNET GIS Advisor Newsletter:



August 18, 2005 - Vol. 1, Issue 4

Feature Article: Can Pocket GTViewer Be a Usable Viewing Platform by Joey Rogers of GTI

Sunday, August 14, 2005

Creating Extract Files (.GTX)

An Extract File, or .GTX file, is a single, self-contained file that can be used with GTViewer, Pocket GTViewer, GTVx, and GTWeb Server. For more information on what Extracted Data is, see the Unextracted versus Extracted Data posting.

There are many different ways to create extract files (.GTX), so many that users may not be aware of them all. This posting will cover each different approach and provide general information on the Extract options.

GTViewer provides two methods for creating extracts. The first method I will describe is probably the most commonly used of all the methods. The Extract Data command found on the toolbar and the menu item under Tools/Extract Data actives the Extract Data mode which allows the user to drag a fence in the current view. This fence is always a rectangle and once placed, the user will see the familiar Extract Data dialog:


This interactive method or performing an extract allows the user to define several settings. The most important item here is the Output File which will specify the file to store the extracted information into. This file is the .GTX file.

The Description field is the name that is associated with the extract. By default, the name is the same as the parent dataset with the “(Extract)” text appended to the end. You can change this description to anything you want and it always appears in the File/Properties information as shown below:




The Filter Preset Support options determine what information will be extracted. If you have Preset Filters defined in your data and you support them in your extract, then all graphics necessary to support the Presets will be extracted. This method will probably include data that is not currently displayed and you may wish to add Presets to make sure that you include all of the data you want in your extract if some features normally default to not be displayed. If you select to extract only Displayed Graphics, then only the graphics currently displayed will be extracted (this does include features that are not currently displayed because of minimum and maximum threshold, but it does not include any features that are explicitly turned off). Extracting only displayed items is a very easy way to reduce the size of the extract, but make sure that you are not going to need a query or tabular information on one of the features that is not displayed since it will not get extracted.

The Data Support options allow the extract to include or not include Attribute Info data and/or Queries. If you choose not to support Attribute Info, you will not be able to review attributes on any feature. If you do not support Queries, then no queries will be available. If you do support Attribute Info and/or Queries, only the records that are associated with the extract area are stored in the extract file.

The Passcode Protection options allow a degree of security to be place on the .GTX file.
A Passcode (up to 10 digits) can be assigned to the .GTX file and every time the file is opened, the user must enter the Passcode to gain access to the file. Two more options are available to provide more control over how the .GTX file is used. The Days before Active setting allows a number of days to be specified. No password will be required until the number of days from the creation date of the extract is greater than the Days before Active value has been reached. This parameter allows .GTX files to have an expiration date, just set the Days before Active to 30, and don’t give out the passcode with the .GTX file. After 30 days, the file becomes useless without the Passcode. The Inactivity Timeout setting allows a time in hours to be specified of allowable inactivity. If the application is inactive for at least this period of time, the Passcode must be re-entered to gain access to the .GTX file again. This setting is designed to prevent unauthorized access for Pocket GTViewer in case the device is lost or stolen. Since the Window CE devices do not close the application when powered off, the file does not get reopened when started up again, so the Inactivity Timeout can provide an extra layer of security.

GTViewer provides a second approach to creating extract files. If you need extracts to have a different shape than a rectangle, you can draw a session graphic (redline) shape around the area you wish to extract. If this shape is selected, the Tools/Extract Data By Shape menu option is enabled and when selected, the standard Extract Data dialog is displayed. This method of extraction can be very useful if you are wanting to create extracts of Circuits whose bounding rectangle is significantly larger than a carefully placed shape around the data. For example, if the circuit is “L” shaped, a rectangular extract will include a significant about of data that does not relate to the circuit; however, a shape around the circuit’s path can considerably reduce the size of the extract.

GTVx supports the same two extract techniques as GTViewer. The ExtractData and ExtractByShape methods are provided to perform these tasks. ExtractData provides the standard rectangular fence extraction and ExtractByShape will use a selected Shape. The same Extract Dialog found in GTViewer is also used by GTVx.

GTWeb provides a command in the Client’s Right Mouse menu to extract the current view. When activated by a client, the GTWeb Server will create a .GTX file for the client’s current view and send it down to the client.

The GTViewer SDK provides an ActiveX control called GTExtractX that is very similar to the GTVx interface, except there is no GUI required and the user has parametric control over all of the settings instead of the Extract Dialog.

Last, but not least, GTData provides the GTPack and GTExtract utility for creating .GTX files. These utilities provide command-line utilities for the creating of extract file. See the previous blog posting for more information on these utilities and their differences.

A few other points about Extract files:
  • You can make extracts from and extract.
  • Currently, an extract file can be up to 2G in size.
  • Extracts always contains a session, but you can create sessions from Extract files.
  • Extract files can be used directly by GTViewer, Pocket GTViewer, GTVx, GTWeb Server, GTRead, GTExtractX, GTPack, GTExtract, Pocket GTReport.
  • Extract files are completely self-contained with the exception of the optionally used TrueType Fonts, Raster files, and external detail files.

Friday, August 05, 2005

Printing with Custom Overview Maps in GTViewer

GTViewer has for some time had the ability to show an Overview Map in the upper left corner of a print. Traditionally, this Overview Map has been the same as the Overview category which is also used by the Overview Window (see previous blog posting for more detail on the Overview Window). The print below show the default Overview Map in the upper corner of the plot with the Red box indicating the printed view:


A recent feature added to GTViewer allows the user to create his or her own Overview Map for printing. While the generic Overview Map is often adequate for providing a quick reference to the printed data’s location in relationship to the entire data set, the ability to define the Overview Map adds a whole new level of sophistication to your prints. Look at the print below and see how useful the Overview Map can be when the area it displays is explicitly specified:


It is very easy to define your Overview Map for Prints. Under the File menu in GTViewer, the Set View As Print Overview option will mark the active View as the Overview Map. The active view’s window shape, data extents, and display filters are all used in the creation of the printed Overview Map. Once the Overview Map view is set, create a second view of your data with Window/New Window and navigate to the area you want to print. When you print the second view, GTViewer will use the first view (the one set as the Print Overview) as the printed Overview Map. Make sure you select the Overview option when printing and select the Overview Map size (Small, Medium, or Large).

A not so obvious use of this custom Overview Map is to combine drawings of different items. For example, if you have a detail file, you can set its view as the Overview Map and then print another view showing a Geographic view. The resulting print shows the detail file as the Overview map:

Thursday, August 04, 2005

The Data Monitor in GTVx

The Data Monitor is a very powerful part of GTVx that has been somewhat under publicized since its introduction almost two years ago. The Data Monitor is not an application or a command; it is, instead, a very flexible toolkit providing a set of methods and events for creating an application that can track and/or monitor a few to a large number of items. You may say that you can do this already with session graphics (redlines) in GTVx today, and you probably can to some extent. The Data Monitor was designed to take you past some of the limitations redlines pose in a dynamic environment and provide a richer feature set specifically for items that are not permanent or are constantly changing. Redlines were meant to be stored while Data Monitor items are not stored since they are derived for some existing set of information; thus, Data Monitor performance in regard to adding, deleted, and manipulating is somewhat greater than that of redlines and better support an environment of many constantly changing items for a large number of items.

What can the Data Monitor be used for? Ideally, the Data Monitor can be used with information that has many items with geographical positions, data that changes frequently (either moved, added, or deleted), and data that is temporary (session based versus long term). There are a few applications that should immediately spring to mind:

  • Lightning Strike Monitor – lightning strikes are many, constantly accumulating, and have little meaning after time. The strikes can be represented as Data Monitor Items that can be numerous and while they don’t move, their importance decays with time and can be reflected by their symbology.
  • Outage Management – show calls or trouble facilities in relationship to the GIS data. Calls are session oriented as they are constantly added and eventually deleted. Data Monitor Items can show both call locations, suspected facilities, and duration of outage (by symbology), and other information as tooltips.
  • Vehicle Tracking - show trucks or crews in relationship to the GIS data. The trucks can be moving so their position can change frequently. Trucks can be represented as Data Monitor Items and can carry information such as the crew information, next destination, and status in the form of a tooltip.

These are just a few examples of what the Data Monitor can be used for. Many of the Data Monitor features directly support these types of application:

  • A Data Monitor Item can be a bitmap image, a line, or a shape.
  • A Data Monitor Item can have a user-defined tooltip that displays just by hovering the cursor over the item. Tooltips can be modified when necessary to provide up to date information about the item.
  • Tooltips can be processed by the Data Monitor or Tooltip events can be fired letting the developer show or use the tooltip information.
  • A Data Monitor Item’s display characteristics are zoom level dependent. This feature is ideal for providing overall views of all data items with one set of display characteristics while providing a completely different display when viewing the items up close.
    Data Monitor Items fire events when the cursor hovers over them and when they are selected.
  • Data Monitor Items can be part of select sets and method are provided to select, unselect, and fence them for selection.


There are many useful application of the Data Monitor. Several examples are shown below:









Monday, August 01, 2005

Capturing Feature Events in your Code with GTVx

GTVx has a simple yet power mechanism for allowing features selected in the view to be processed by your code. It may not be clear how to use this functionality at first glance, so this blog entry will attempt to clarify this process.

The process of capturing a feature in your code involves two things: activating the feature capture mode and catching an event that is fired by GTVx when a feature is captured.

The method to activate the feature capture mode is (not too surprisingly) called: ActivateFeatureCaptureMode It takes two parameters: ID and FitlerString.

The ID parameter is the sometimes confusing to developers, but it simply provides a developer-defined id that will appear in any feature captured event fired while in this mode (the uses for this id should become clearer when we look at the Event).

The FilterString parameter is a comma-delimited string of <category Id>:<filter id> pairs used to restrict which features can be selected. The filter id can be an asterisk “*” to indicate that all filter ids in the specified category are allowed. This parameter can be very important for custom applications; for example, if you have a pole inspection application, you only want the user to be able to select poles, so you only give it the pole’s category id/filter id pair. If you did not restrict select to just poles, your code will have to determine if the feature can be processed or not and tell the user that he or she can’t selected that features. The FitlerString can be an empty string which means the user can select anything in the view. This unrestricted access is usually not desired, but is available (and is unfortunately used too much in applications). Two other options are the <SessionPriority> token that will look to see if a session graphic has the same linkage as a regular feature that was selected; if so, the session graphics is always returned. The Session Priority feature is very useful if your application places session graphics on top of regular graphics to indicate something; with the session priority, you will always know you are getting the session graphic if one exists. Here are some examples on how the feature capture mode can be activated:

GTVX1.ActivateFeatureCaptureMode 1, ""

Any feature can be selected in the view.

GTVX1.ActivateFeatureCaptureMode 1, "2:7"

Only features in Category 2 with FilterId 7 can be selected.

GTVX1.ActivateFeatureCaptureMode 1, _
"2:7, 2:10, 2:20, 3:10"

Only features in Category 2 with Filter Id 2, 10, or 20 or in Category 3 with Filter Id 10 can be selected.

GTVX1.ActivateFeatureCaptureMode 1, "2:*, 3:*"

All features in Categories 2 and 3 can be selected.

GTVX1.ActivateFeatureCaptureMode 1, _
"2:7, 3:10, <SessionPriority>"

Features in Category 2 with Filter Id 7 or in Category 3 with Filter Id 10 can be selected. However, if a session graphic has the same linkage as one of these features, it will be returned instead.

The second part of capturing features is an Event that is fired by GTVx when a feature is selected in the view while the feature capture mode is active. The FeatureCaptured event looks like the following:

Private Sub GTVX1_FeatureCaptured(ByVal id As Long, _
ByVal categoryId As Long, _
ByVal offset As Long)

.
.
.

End Sub

The FeatureCaptured event has 3 parameters: Id, CategoryId, and Offset. The Id is the same value specified in the ActivateFeatureCaptureMode. There is only one FeatureCaptured event in your code, so you must use this Id value to tell how the feature is to be handled. It may be that you only have one ActivateFeatureCaptureMode in your code and there is only one thing for this event to do; however, it is usually the case that you capture different features for different reasons and need some way to see how the capture mode was started. For example, if you had an inspection application that has a Pole Inspection mode and a Valve inspection mode. You might have something like this:

Private Sub PoleInspectionCommand_Click()

GTVX1.ActivateCaptureFeatureMode 1, "2:3"

End Sub

Private Sub ValveInspectionCommand_Click()

GTVX1.ActivateCaptureFeatureMode 2, "7:7"

End Sub


Private Sub GTVX1_FeatureCaptured(ByVal id As Long, _
ByVal categoryId As Long, _
ByVal offset As Long)

If mode = 1 Then ' Pole Mode
.
.
.
ElseIf mode = 2 Then ' Valve Mode
.
.
.
End If

End Sub


Note that the PoleInspection activated the capture mode with the id set to 1 and the Valve Inspection activated the capture mode with the id set to 2. Then in the FeatureCaptured event, the id is checked to see if it is 1 or 2. If 1, the PoleInspection code is executed and if 2, the Valve Inspection code is executed. In this example, it would be possible to tell how to handle the captured feature by the feature’s characteristics (since you can get filter id from Category and Offset). However, if your two modes were Edit Pole and Delete Pole, you can tell so easily.

The CategoryId and Offset values are the standard keys to looking up an element in the GTViewer data. Most element related function take these values as inputs. You can also refer to a previous blog entry on determining a feature’s keys from Category Id and Offset.

It should also be pointed out that Capturing Features in GTViewer is very similar to this process. Events are handled slightly differently in GTViewer, so there are some minor coding differences, but the process is the same.

Thursday, July 28, 2005

GTViewer – More than a Viewer

Names have a funny way of becoming misleading, especially for software. In the beginning, GTViewer was a “Viewing” product and was aptly named. Now, however, GTViewer has grown and evolved beyond just being a viewer to include a variety of other capabilities, yet its name has not change to describe all of its talents. There are 4 different aspects to GTViewer:



Viewing is the foundation of GTViewer and from this aspect all of the others are possible. Viewing entails the graphical display of geospatially related graphics: Streets, buildings, conductors, mains, transformers, valves, terminals, etc. Viewing is in a seamless map environment that is easy to display what you want to see and easy to go where you need to go. Viewing GIS data is more than simply looking at maps; the database information behind the graphics is just as important and is readily available. Intelligent features are “smart” because of this tabular data and without access to it you are really not viewing GIS data.





Redlining goes hand in hand with Viewing; however, Redlining is a distinct aspect of GTViewer. Redlining allows a non-destructive mechanism for marking on top of your GIS data. Redlining includes more than just the basic drawing tools (lines, circles, shapes, text, etc.); more sophisticated tools are also available like dimensioning, symbols, and hyperlinks. Redlining is not just graphical either; you can add tabular data to your drawings and link them to other files such as photos or documents. Redlines also provide an easy method for GTViewer users to share information in a geospatial manner.




Analysis is a step above Viewing. Instead of just looking at the data as it comes from your GIS, GTViewer can help you analyze the data to see what it means. GTViewer provides two very power tools for analyzing data: Thematic Queries and Feature Counting. Thematic Queries allow you to view all features that match a specified criteria. For example, you can show all cast iron main, all wooden poles, all valves from a particular manufacturer, etc. Combined with GTViewer’s fast display and Emphasize mode, patterns in your GIS data become apparent and provide decision making information. Feature Counting allows point and linear features to be counted within a polygon. A polygon can be an existing feature (such as municipal boundary or tax district boundary) or drawn as a Redline. Feature Counting provides both graphical and tabular results to help you make the most of your data.




Applications is the most powerful aspect of GTViewer. With Applications built on top of GTViewer, you are not limited to what GTViewer provides off-the-shelf. Applications can be used for Inspection, Inventory, or other Data Collection. Even more power from your GIS data is liberated by applications that perform complicated tasks like network tracing, such as outage analysis, value isolation, and load computation. Applications can leverage all of GTViewer’s other aspects, Viewing, Redlining, and Analysis, to implement complete Engineering and Design workflows. GTViewer can be the basis of any application that can use your GIS data.





GTViewer is more than just a viewer. It is a powerful Viewing tool, but is has many other aspects that you can exploit. Redlining and Analysis are just the beginning of what GTViewer can do for you while Applications built on top of GTViewer open the door to opens the door to anything you can imagine with GIS data.

Tuesday, July 26, 2005

Overview Maps

I have seen several Overview Maps created by users lately and all of them have some common problems. I hope this blog entry will help provide information for building better more useful Overview Maps.

The Overview Map is the overall view of the data seen in the Overview Window. GTViewer, Pocket GTViewer, and GTVx all support an Overview Map. See previous blog entry for more info on the Overview functionality.

Here are some key facts about the Overview Window:


  • The Overview Category defines what is in the Overview Window. The Overview Category type is set to 1 in the .GTM file.
  • All contents of the Overview category are shown in the Overview Window. Display Filters will affect the display in the active view, but not in the Overview Window. If you are turning items off with the filter ids in the Overview Category, you probably have these features in the wrong category.
  • The Overview should be simple and have as few elements as possible while still providing “macro” reference information. This goal is sometimes hard to meet depending on the setup of your original data; however, some effort spent here will make your data look better and make the Overview more useful.
  • The Overview Window always uses a Red rectangle to show where the current view is. So, if your Overview Category contains a lot of red, it is hard to find the indicator. Thick styles can also make it difficult to find the indicator. One solution here is to use the [Overview] style definition to make the Overview Window use weight 0, style 0, and gray colors for all elements:

    [Overview]
    Style=0
    Weight=0
    ColorValue=120120120

  • The data range used by the Overview Window is the range provided by the Range or RangeFile entry in the .GTM file. The range defined here should closely bound the data (at least what is in the Overview category) so that there isn’t too much empty space around the data in the Overview window.

Thursday, July 21, 2005

The Roundtrip with GTFormatInfo

Today, there are many different ways to get data collected by GTViewer, GTVx, or Pocket GTViewer back to your GIS. The approach that probably comes to most users’ minds is Safe Software’s FME using the GTViewer Reader. This approach is easy to use and is the most flexible in supporting graphic and tabular information. However, it is not the only solution. GTRead and GTVx can also read collected data and provide a flexible mechanism for processing the information; however, this blog entry is going to be on a tool provided by GTData called GTFormatInfo which requires no programming or additional software.

First, how do you collect data with GTViewer or Pocket GTViewer? This job usually requires an external application like the demo Pole Test/Inspection app delivered with Pocket GTViewer or the Pole and Valve Inspection demos available for GTViewer and GTVx. These data collection apps are easy to implement and are generally just a variation of the templates GTI provides.

The data collections apps generally result in session graphics (redlines) that include embedded tabular data. Let’s say for example, you are using the Pole Inspection app and visit 50 poles. The external app stores the collected data on the redline marks used to indicate that a pole has been visited. These redlines are part of a .GTX extract file or they can be exported as a .GTG file (from a .GTM, GTS, or .GTX file). Either a .GTG or .GTX file is the input file to either FME or GTFormatInfo.

The GTFormatInfo utility is used to extract tabular data embedded on session graphics data in a .GTG file or a .GTX file. The embedded tabular data is applied to user provided templates converting a graphical .GTG or .GTX file into an ASCII file such as an SQL script containing update or insert statements. The GTFormatInfo utility could also be used to create reports or format input for a custom application. The point is, you do not have to be a programmer to access the data contained in the redline elements.

The GTFormatInfo utility is really just a text replacement tool, but it has the ability to select items from the embedded tabular data in the redline graphics to replace tokens with in a template file. You can provide 3 template files: Header File, Entry File, and a Footer File. The Header File is prepended to the output file, and the Footer File is appended to the output file. The Entry File will be written once for each element containing session graphics with embedded data. In the Entry File, you can place special tokens that will be replaced with attributes from data embedded on the session graphics. A token is specified in the following format:

<%ATTR:table.attribute%>

Where table is a table in the embedded data and attribute is an attribute within that table.

If you wanted to create SQL insert statements, an Entry File template might look like the following:

INSERT
INTO COLLECTED_DATA( IPID, DATE, TYPE )
VALUES (<%ATTR:EDIT.IPID%>,'<%ATTR:EDIT.DATE%>',

'<%ATTR:EDIT.TYPE%>');

So if you had 3 session graphics each with embedded data containing a table called Edit with attributes IPID, DATE, and Type, then you would get three records in the output file like this:

INSERT
INTO COLLECTED_DATA( IPID, DATE, TYPE )
VALUES (10023,'7/21/2005',

'PRIVATE');

INSERT
INTO COLLECTED_DATA( IPID, DATE, TYPE )
VALUES (10025,'7/21/2005',

'PUBLIC');

INSERT
INTO COLLECTED_DATA( IPID, DATE, TYPE )
VALUES (10037,'7/21/2005',

'PRIVATE');

The Header and Footer Files are optional but they could be added to make the data more easily work with another application. For example, you might add a Footer File that contains:

commit;
exit;


How you collect and get data back to your GIS will undoubtedly be depended on many different things. There are many tools available to help with this process. GTFormatInfo is a simplistic approach to the problem, but it may be quite usable in many situations.