Tuesday, September 13, 2011

Should I Upgrade GTViewer to a newer Version?

I frequently see customers running older versions of GTViewer. Granted, there is an update to GTViewer on a fairly regular schedule, so it would be impossible to be on the latest version all the time. If you haven't upgraded GTViewer in a while, it might be time to take a look at what you missing out on.

There are many reasons customers stay on older versions of GTViewer. The main reason is that it does what they want and “if it ain’t broke, don’t fix it.” However, the current version of GTViewer is 10 (with 11 around the corner) and there have been significant new features added in the last few years. If you are currently on Version 5 or Version 7 (there was not a version 6), then you should probably take a look at what is new in the last several major versions. Even if you are on versions 8 or 9, it would be worth looking at what is currently available.

The list of enhancements since GTViewer version 8 was released is lengthy (539 items in the Readme.txt), but I am restricting my list below to new features that are visible, offer something that is substantially new, and will be beneficial to many users.

GTViewer Version 8:

  • Features Tooltips – Feature Tooltips are pretty much exactly what their name says. You can hover the mouse cursor over a feature and see its attributes in a tooltip without having to select the feature or change modes. Unfortunately, you have to define which features can have tooltips and what these tooltips will contains, so many users may not be aware that this feature exists. However, it is a very powerful tool that can provide a great increase in user productivity without much effort.

  • GPS Reference Point – The GPS Reference Point came from Pocket GTViewer. It is simply a marker you can place in the view, and the GPS Indicator will point (and/or draw a line) to the marker wherever it may be. The GPS Reference Point has evolved somewhat from what it started out as in Pocket GTViewer. You can place one when you locate a feature with a Query, you can Right Click and place one, or you can use the GPS Reference Point dialog to place one. You can also automatically fit the Reference Point and the GPS Indicator providing a “poor mans” navigation tool (and is surprisingly useful when trying to get from Point A to Point B and you don’t have sophisticated enough data to support our street routing applications).

  • Enhanced Redline editing – GTVx had more sophisticated redline editing capabilities than GTViewer for several years, but the best of these features (Delete Vertex, Break at Vertex, Add Vertex) were brought over to GTViewer to give more control over the redlines. Simply select a redline and right click on it to access the new features.

GTViewer Version 9:

  • Favorites – Favorites were a much requested feature and have turned out to be a very useful addition to GTViewer. Think of them as Bookmarks in your Internet Browser. You can create a Favorite and it will store your Display Settings and current location along with a user provided name. Then simply select the named Favorite from the Favorites menu to return to that location and display settings. Favorites also allow the administrator to define a static set of Favorites in the .GTM file that will be made available to everyone.
  • Applications Menu – Prior to GTViewer Version 9, all custom applications were placed under the Query menu. The Applications menu was added to provide an alternate location for your custom applications, and it is often very useful when the custom application doesn’t fall under the “Query” category. You can now place a custom applications under the Query menu, the Applications menu, or both.

  • ToolBoxes – Truth be told, Framme Field View supported a feature to create Palettes which assign Queries or Applications to buttons on floating panels. The desire to have such constructs undoubtedly came from Microstation and Framme with their plethora of tool palettes. When upgrading customers from Field View to GTViewer, some users expressed the desired to have their Palettes (obviously they weren't used to seeing so much of the map at one time, ha ha). So, to make everyone happy, GTViewer got a shiny new set of ToolBoxes (which is what we call them). You define them in the .GTM file and they can activate Queries and launch custom applications just like Field View, but we didn’t stop there. ToolBoxes can activate Display Presets, activate GTViewer Commands (toggle raster, toggle emphasize mode, set the active mode, fit, start GPS, and much more), Toggle Feature Display (which turns on or off sets of categories or features), modify the background color, change the current style map and def files, and individually control the display of non-category raster files. On top of that, one or more of the above actions can be strung together to form complex actions tied to a single button click. The buttons are also able to change color based on their state, so Display actions will be one color when its items are displayed, and another when they are not. The same for the GPS Tracking, Raster Display, and Emphasize Mode making the ToolBoxes more tightly integrated into GTViewer. As it turns out, ToolBoxes have been a very useful feature in GTViewer, and we see new and creative uses for them all the time.

  • Custom Print Labels – GTViewer has always had standard labels that the user can specify for the print border (including date, time, filename). There is also a Note field the user can use to add any other information to the border. You can now have up to 10 custom label prompts on the Print Dialog. They are defined in the .GTM file with the Name and a Default Value. They can also be set to remember the last value entered as well.

  • Hatch Fills – Style Definitions can now specify a Fill Style for fillable elements (shapes, ellipses, circles). The Fill Style can be the default solid that it has always been or Downward Hatch, Cross Hatch, Diagonal Hatch, Upward Hatch, Horizontal Hatch, and Vertical Hatch. Hatch Fills are special in that you can see what is underneath them.

  • Custom Attribute Info Tabs – Sometimes a feature will have a dozen tabular components with the important information spread across several records. The Attribute Info dialog will allow you to easily flip through the different records by going through the tabs; however, wouldn’t it be nice if you could pick out the important information and put it on the first tab? That is what a Custom Attribute Info Tab does. For a feature, you must define a list of attributes (from any of the feature’s associated records) and they will appear on a synthesized tab that always appears first. All of the important information can be made available at a glance, while the complete records are still available on the other tabs.

GTViewer Version 10:

  • Dynamic Graphics –This feature is probably the single biggest addition to GTViewer since it was created 10 years ago. Dynamic Graphics is composed of two distinct components: Dynamic Highlighting and Dynamic Labeling. Dynamic Highlighting allows the user to specify rules for highlighting graphics in the view using one or more of the feature’s tabular attributes to determine the highlight style (color, weight, style, fill). This highlighting can be used to emphasize certain features (such as all gas mains of a certain size or pressure, primary conductor by phase, etc.), or it can be used to render an alternate view that is independent of the GIS’s defined symbology. The second component, Dynamic Labeling, allows the user to specify rules for labeling features using one or more of the feature’s tabular attributes (both in the criteria and the label itself). These labels can be used to augment the display with additional labels that were not defined in the GIS or with labels that are specific to a task. Dynamic Labels can also take into consideration the part of a feature that is visible in the current view and adjust the labels position accordingly.

  • Extensive Command-Line options – GTViewer has had minimal command-line option support up until this version. In the past, you could specify a .GTM, .GTX, or Session file (.GTS) to start up with, but that was it. We had multiple requests for the ability to integrate GTViewer with various other systems (work order management, ticketing systems, etc.). These systems could launch an external application and supply information on the location via command-line parameters. So a variety of command-line options were added to GTViewer allowing you to locate on an X/Y coordinate or a latitude/longitude coordinate, run a query with provided prompt information, set a GPS Reference Point, activate a Display Preset, set the Emphasize state, activate a Favorite, Start the GPS, and set the active mode. GTViewer will also respond to the command-line options even if it is already running, so a nice integration is now available with other systems with very minimal effort (and no custom coding).

  • Expression support in Custom Attribute Info Tabs and Feature Tooltips –The Dynamic Graphics addition to GTViewer included an extremely powerful expression evaluator (which can process rules on the fly using feature attribute values to determine what a label will be or if something will be highlighted). Consequently, this expression evaluator can be used for other things such as allowing you to define expressions in the Custom Attribute Info Tabs or in Feature Tooltips. This subtle leap in capability now allows you to do formatting of the data you want to display in a much more sophisticated fashion. Instead of just listing a single attribute on a line with its values, you can now build a string to display by concatenating one or more attributes and constants together and checking to see if something is blank or if it meets a certain value.

  • Custom Raster – While not currently in widespread use, this is an interesting feature that allows images to be embedded in the main geographic view. These images could be detail drawing or any image to enhance the usability of your data.

GTViewer Version 11: (available before the end of the year)

  • Rotated Views– (Available now in the latest Version 10 updates.) We have been asked about rotating the view in GTViewer almost from the beginning. There are a couple of specific uses for this feature that we tried to address. First, data may have streets at let’s say a 45 degree angle, but you want to print this data with the streets at right angles. You can now do this by rotating the view 45 degrees and printing. Second, GPS Tracking has been available in GTViewer for some time; however, users want the tracking to work like it does with a handheld navigation GPS where the map is rotated so the current heading is always at the top of the map. This feature is now available as well.

There are many new features that I didn't list above. Many of those that I left out were to help out a customer with a specific problem; however, it is very common for one of these enhancements to be useful to someone else (more times than not it seems). See the current GTViewer Readme.txt for the comprehensive list of enhancements.

Tuesday, September 06, 2011

GTWeb Client is now available from Apple's App Store



Okay all you Apple Fan Boys (and Girls), GTWeb is now available from Apple's App Store. It will run on any iPhone, iPad, or iPod Touch running iOS 4.0 or higher.

If you have access to one of these Apple devices, you can go to the App Store on your device and search for GTWeb. Feel free to install it and play with our Demo dataset (electric, gas, fiber data). We have TIGER data (for Madison County, Alabama) available as well.

Unless you are in the Huntsville area, you won't be able to use the GPS features
in GTWeb with these sample datasets, but that is the only limitation.

If you want to see your own data on GTWeb, contact us and we will arrange a demo.

We have a variety of Video Demos available, and we will be happy to answer any questions you may have.

Don't forget that we have GTWeb clients for Android and BlackBerry devices too.


Tuesday, August 30, 2011

GTWeb Demos



We have several posts on the various GTWeb Clients that are now available. To simplify finding more information on the particular flavor of GTWeb you are looking for, this post will serve as a jumping off point:

GTWeb on the iPhone    **Newest**
GTWeb on the iPad
GTWeb on the iPod Touch

GTWeb on Android Phones
GTWeb on Android Tablets (Honeycomb)

GTWeb on BlackBerry

GTWeb on the Desktop (HTML5 compatible Broswers)

Friday, August 26, 2011

GTWeb Client running on the iPad



Here is another video of the GTWeb Client running on Apple's iOS. This time it is running on the iPad. The iPad's larger screen size provides a few extra features not seen when running on the iPhone such as Attribute Info being inset in the Map view and more commands on the Toolbar.

Here is a video demo of GTWeb on the iPad:

http://gti-us.mobi/video/ipad/gtweb-ipad.html

If you are on an iPad, you can view the video here.

Also check out our other videos of the GTWeb Client running on iOS, Android, Honeycomb, and BlackBerry.


Tuesday, August 16, 2011

Preview: GTWeb Client running on iOS (iPhone, iPad, iPod)



Here is a preview video of our latest GTWeb Client running on Apple's iOS (iPhone, iPad, iPod):

http://gti-us.mobi/Video/ios/GTWeb-ios-hires.html








Also check out our other videos of the GTWeb Client running on Android, Honeycomb, and BlackBerry.


Tuesday, July 19, 2011

GTech Loader versions 9.0.0.2 and 10.0.0.2 are Available



GTech Loader versions 9.0.0.2 and 10.0.0.2 are available.

The GTech Loader now supports G/Technology versions 9 and 10. GTech Loader version 9 is for G/Technology version 9 and its relational spatial geometry format while GTech Loader version 10 is for G/Technology version 10 and its Oracle Spatial geometries. Both use the same configuration file format and migrating from one version to the other is trivial.

Both versions of the GTech Loader have an upgraded interface to more closely match GTI's Oracle Spatial Loader's interface.

Version 9.0

-----------
09.00.00.02 - 07/19/11
-----------

- FIX - #6806 - Delete buttons on the Category and Group lists were not clearing the sublists.

- NEW - #6808 - Connection Configuration dialog can now save the current settings to a Connection .ini file used with the command-line mode.

- CHG - #6811 - The Save As toolbar icon was changed to Save. The Save As functionality is now under the File menu.

- NEW - #6812 - MRU List keep the last 5 most recently used files under the File menu.

- NEW - #6813 - Main Dialog is now resizable.

- NEW - #6814 - New and About added to Toolbar.

- NEW - #6815 - File and Help menu added. File includes: Open, Save, Save As, and Exit.

- NEW - #6816 - Cancel button has been added.


-----------
09.00.00.01 - 07/4/11
-----------

- FIX - #6471 - Feature Name was being carried over as Feature Legend Entry name.

- CHG - #6472 - Filter descriptions will now be regenerated the first time the filterId is used for each run.

- FIX - #6494 - Legend leaf node without a parent (level greater than 0) are now included. These items were previously ignored as being invalid.

- FIX - #6521 - Lpad and Rpad functions were not handling the pad string correctly when it contained more than 1 character.

- FIX - #6526 - Expression Evaluator was not handling nested expressions correctly if functions with more than one parameter were used as a parameters.

- CHG - #6528 - Concat function will now support up to 10 parameters.

- FIX - #6534 - Expression containing internal parentheses and commas in literal strings could cause problem with the expression parsing.


Version 10.0

-----------
10.00.00.02 - 07/19/11
-----------

- FIX - #6817 - Fix for loading settings file.

-----------
10.00.00.01 - 07/15/11
-----------

- NEW - #6792 - Support for G/Technology version 10 and Oracle Spatial Geometries.

- NEW - #6793 - Status Listbox has been split into two tabs. One shows the regular status (as in previous verions) and the other shows only errors.

- NEW - #6800 - New and About added to Toolbar.

- NEW - #6801 - File and Help menu added. File includes: Open, Save, Save As, and Exit.

- NEW - #6802 - Main Dialog is now resizable.

- NEW - #6803 - Cancel button has been added to stop a conversion.

- NEW - #6804 - New log file is created with a .error extension that only show errors that occurred during a conversion.

- NEW - #6805 - Delete buttons on the Category and Group lists were not clearing the sublists.

- NEW - #6807 - Connection Configuration dialog can now save the current settings to a Connection .ini file used with the command-line mode.

- NEW - #6809 - MRU List keep the last 5 most recently used files under the File menu.

- CHG - #6810 - The Save As toolbar icon was changed to Save. The Save As functionality is now under the File menu.

Friday, July 15, 2011

GTViewer version 10.0.0.14 is Available



GTViewer version 10.0.0.14 is available.

-----------------------
10.00.00.14 - 07/15/11
-----------------------

- NEW - #6784 - GetCoodinateFactors method added.

- NEW - #6787 - If you set ShowRasterStatus to 1 in the Additional Properties section of the .GTM file, the raster filename will be displayed in the status bar when it is being initialized.

- NEW - #6789 - External Apps using the External Type can now use token as parameters: %cenX%, %cenY%, %zoom

- NEW - #6791 - Rendering Raster message added to status bar.

- FIX - #6794 - Fixes to the Session Links had broken people using then them when session links were not working correctly. Additional logic has been added to work the old way if the new way doesn't find a session link entry.

- NEW - #6797 - Setting added to Options/Settings to prevent multiple RasterPaths from being searched.

- NEW - #6798 - AddLocationHistory method added.

Thursday, July 14, 2011

Creating GTViewer Data with Embedded Data Using FME

In my last post, I covered programmatically embedding data into Session Graphics with GTViewer and GTVx. This post will also cover Embedded Data, but it will use FME to create it instead of VB6 or VB.NET.

The GTViewer Writer Plug-In for FME can easily create embedded data in GTViewer Data. You must expose two Format Attributes in the destination GTViewer Writer: gti_embeddedData and gti_embeddedDataType.

There is currently only 1 valid Embedded Data Type for GTViewer data, so you can set gti_embeddedDataType to a Constant 1. The gti_embeddedData attribute is then set to the string you want to embed. The \t\a\v format for embedded data that I described in the previous post, can also be used here to format the embedded data so that the Attribute Info dialog in GTViewer and GTVx will recognize the embedded data as if it came from a database.

For an example, I will take a TIGER street file and convert it to the GTViewer format. Instead of letting FME create tabular data in the GTViewer format and link it to the graphic elements it creates (which is the default and is usually the desired process), I will delete the tabular attributes from the destination and use only embedded data.


The StringConcatenator transformer (shown above) is used to build the \t\a\v string. There are many ways you could go about building this string in FME, but this approach seemed the easiest and my visual for a blog posting. In the screenshot below, I simply build the embedded data string using constants and attribute values from the TIGER data. One item to note is that the backslash (\) is an escape operator in this FME transformer, so you need to use two backslashes to represent one (\\), and \t becomes \\t, and so on.

You can convert the data to the GTViewer format and open it up in GTViewer. Then review one of the streets:

If you look on the Element Tab for the reviewed street, you will see the Embedded Data property is set to the string we created with FME. Also note that the Attribute Info tab has a red drum indicating that it is Embedded Data instead of Linked Data.

This example is somewhat contrived since if you were really converting street data, you would almost definitely be using Linked data (the default that the GTViewer FME Writer Plug-in provides); however, there are other cases where embedded data might be very useful.



Programmatically Creating Session Graphics with Embedded Data

When drawing session graphics in GTViewer or GTVx, it is very simple to added embedded data. This is also true if you are using the GTDataObjects, the GTV .NET Controls, or GTCreate (but the syntax is slightly different than what I will show in this post).

Creating Session Graphics in GTViewer or GTVx uses a standard process. First set the Drawing Properties to your desired values, then draw the session graphics element (redline) with one of the Draw methods. The newly created session element will use the Drawing Properties you set.

There are two kinds of Drawing Properties that can be set. First, there are the Current Drawing Properties such as Filter Id, Color Id, Style Id, Weight, Fill, and Extended Style. These properties are set with methods like SetCurrentFilterId, SetCurrentColor, SetCurrentStyle, SetCurrentFill, and SetCurrentExtendedStyle. These properties will remember the value you set until you change them. So, you can set your filter id, color, and weight to specific values and all session elements that you create with the Draw methods will use these properties. You can also set these properties before each call to a Draw method if you choose (it will take slightly longer performance-wise if you set every property before each draw, but probably not enough to worry about).

Instance Drawing Properties are the second kind of Drawing Property. These properties will only be applied to the next session graphic created with a Draw method, then they reset themselves to a neutral state. There are really just two Instance Properties: Linkages and Embedded data. Linkages are two 32 bit integer keys on an element that will be automatically be used to look up records in the tabular data. Embedded Data is a string that is embedded on the session graphics element (and the data is available without going to the database and is also portable if you export the session graphics as a .gtg file).

Embedded Data has both a Type value and a string data value. Currently, the Embedded Data Type must always be set to 1. The Embedded Data String value can be any string value (size is not restricted, but their may be practical limits). However, if the string follows a specific format, it will be interpreted as tabular data and will work seamlessly with the Attribute Info functionality in GTViewer and GTVx. This format is called the \t\a\v format. Not a very catchy name, but it is what it is:

{\tTableName{\aAttrName\vValue}} 

You must have one record (table) specified with \t followed by the table name. You then need 1 or more attribute/value pairs where each pair is \a and the attribute’s name followed by \v and the value. In this format notation, the curly braces mean that that the enclosed portion can repeat, so you can have one or more attribute/values pair per table, and you can have one table or more tables. An example is shown below:

\tPole\aPole_Number\v1234\aHeight\v45\aClass\v1

Would represent:

Table: Pole

Attr 1: Pole_Number=1234

Attr 2: Height=45

Attr 3: Class=1

The following VB6 code is for GTViewer. It will create a filled circle in the center of your view and embed some data on it:

Dim cenX As Double
Dim cenY As Double

viewObj.GetViewCenter 1, cenX, cenY

docObj.SetCurrentFill True
docObj.SetCurrentFilterId 0
docObj.SetCurrentColor docObj.GetNearestColor(255, 0, 0)
docObj.DrawSetData 1, "\tMyTable1\aMyAttr1\vMyValue1\aMyAttr2\vmyValue2\tMyTable2\aMyAttr3\vMyValue3\aMyAttr4\vmyValue4"

docObj.DrawCircle32 1, cenX, cenY, 25

viewObj.RefreshView
This code is for GTViewer, but you can swap the viewObj and docObj with GTVX1 and it will work with GTVx as well. The embedded data contains two tables with two attributes on each table, so if you review the circle in GTViewer, it will show you something like this:

There are a few things to note in the above screenshots. First, the Red Drums on the tabs mean the data is Embedded Data and not retrieved from the database (they show as Blue Drums). The Table Names show on the tab. The first table name will show on the right mouse menu when you review one of the session graphics with embedded data. The Element tabs show the first few characters of the embedded data on the Embedded Data line.

The next example uses VB.NET and GTVx to illustrate something a little more realistic than the first example.

Imports GTVXLib
Imports System.Text


Public Class Form1

Dim docObj As AxGTVXLib.AxGTVX
Dim appObj As AxGTVXLib.AxGTVX
Dim viewObj As AxGTVXLib.AxGTVX

Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

AxGTVX1.OpenFile("l:\electgasdemo\electgas.gtm")
AxGTVX1.SetHideRaster(1)

docObj = AxGTVX1
viewObj = AxGTVX1
appObj = AxGTVX1

End Sub


Private Sub ButtonPlaceMarker_Click(sender As System.Object, e As System.EventArgs) Handles ButtonPlaceMarker.Click

Dim cenX As Double
Dim cenY As Double

viewObj.GetViewCenter(1, cenX, cenY)

docObj.SetCurrentFill(True)
docObj.SetCurrentFilterId(0)
docObj.SetCurrentColor(docObj.GetNearestColor(255, 0, 0))

Dim data As New StringBuilder

data.Append("\t")
data.Append("Marker")
data.Append("\a")
data.Append("Time")
data.Append("\v")
data.Append(Now.ToLongTimeString)
data.Append("\a")
data.Append("Data")
data.Append("\v")
data.Append(Now.ToLongDateString)
data.Append("\a")
data.Append("User")
data.Append("\v")
data.Append(Environment.GetEnvironmentVariable("USERNAME"))

docObj.DrawSetData(1, data.ToString)

docObj.DrawCircle32(1, cenX, cenY, 25)

viewObj.RefreshView()

End Sub

End Class


The screenshots below show the demo app running after a marker has been placed followed by the Attribute Info dialog you get when reviewing the session graphics.





There are a few items to note in the above demo app. Again the DocObj and ViewObj are just used to simpify moving the code between GTViewer and GTVx. Since these objects are set to the AxGTVX1 object, the same code will work the same in GTVx and GTViewer. I used a StringBuilder to compose my embedded data. You can just as easily use a regular String instead. I think breaking the lines up with the StringBuilder makes it easier to read as well as being theoretically faster when running (versus just using the immutable String type). This example only uses one Table in the embedded data (the first example used 2).

I hope this helps to clarify using embedded data.