Friday, September 30, 2005
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
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
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
Monday, September 19, 2005
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 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
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:
- 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.
ActiveX=Valve Isolation Trace|1|GTV_ElectGasDemos.ValveIsolation|
ActiveX=Highlight By Phase|1|GTV_HiliteByPhase.UserControl1|
ActiveX=Pole Inspection/New Pole|1|GTV_PoleInspection.UserControl1|
Wednesday, September 07, 2005
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:
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 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:
- 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
- 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
- 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
- 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.
- Interactively place hyperlinks as redlines
- Hyperlink can jump to an area in the data, external files, and now URLs
- Four new Dimension Element styles
- Find a specific address from street segments with address range information
- Address location is interpolated from available information
- Layered Symbol Support
- Priority Display support for Highlighted Elements
- Default Symbology can now be default for data with no defined symbology
- 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)
- GPS Interface enhancements
- Feature Counting enhancements