Showing posts with label Where Am I. Show all posts
Showing posts with label Where Am I. Show all posts

Thursday, August 13, 2015

GTViewer Add-On Apps Revisited / Query Builder Update (version 1005)


Six sample GTViewer Add-On Apps were introduced with GTViewer version 14.  Many of you have not tried them yet for various reason.  Some of the tools are novelties, users haven't found the need for them, or users just haven't had the time to try them.

The sample add on apps are:

  • Query Builder
  • Feature Tooltip Builder
  • GTSpot Importer
  • Show Google Maps
  • Where Am I?
  • Search Redlines

I am making this post for a couple of reasons.  First, there is an update to the Query Builder that contains a few fixes.   You can get it from:

ftp://gtweb.mobi/demos/GTV_QueryBuilder_1007.zip     (password:  gtviewer)


Second, I don't think enough people out there realize how useful these tools can be.   They are more than just samples.  For example, nobody has made more Query Definition files that I have; however, over the last couple of years of exclusively using the Query Builder to create query definition files, I don't even remember the syntax of the definition files (nor do I need to).   Granted, the Query Builder may seem a little quirky at first, but it does what it does, and it is a lot easier to use a GUI to create a query than do it old way (find a similar query definition file, make a copy, open in Notepad, open up GVData.doc, try to figure out which entries you need, compile query, see if it works, rinse, repeat).  So, if you are still using Notepad as your Query Builder, give the Query Builder a try.

The Feature Tooltip Builder is another under utilized app.   Creating Feature Tooltips is not really hard, but it is very tedious and you may have to do a lot of them.  Also, if you get something wrong in the definition, they just don't do anything and then you have to sift through the logfile to see what is wrong.  Feature Tooltips can also add a lot of value to your data in terms of easily seeing useful information, making this information available to your users is really what this is all about.     So, if you are not using Feature Tooltips, start using them.  If you aren't using the Feature Tooltip Builder, start using it to create them.

Show Google Maps has always been one of the more popular Add-Ons.  Probably because it is so simple in what it does (open up Google Maps and show the same area you are looking at in GTViewer).   However, I use it for a different purpose.  If you are configuring your Coordinate System, it is often difficult to know if you have it correct, but with this Add-On, you can just find an area in your data that is somewhat recognizable (funny looking intersection, water body, river, etc.), then run Show Google Maps.  If the center of what is in the view in GTViewer isn't what you are looking at in Google Maps, then something is wrong with the Coordinate System setup.   Generally, the Coordinate System is either right or really wrong and this method will help determine which category you are in.

Where Am I was so popular that it was just incorporated directly into GTViewer and GTWeb. There may still be users who want to use this app (source code is available) to do very specific or complex Where Am I functionality, but it's usefulness has probably usurped by GTViewer.   A good question would be "Where is the Where Am I Builder?".   This tool doesn't exist yet, but it might one day.   One hack that may help you out in the meantime is that the Feature Tooltip Builder can help you define the difficult to create parts of the syntax (Features Strings, Expressions).   It will also let you pick a boundary feature, and you can see what values are populated, etc.    So, just build a Feature Tooltip of the shape you want to use with Where Am I and borrow (cut and paste) the parts of the definition that apply.

The GTSpot Importer it only useful to those who have GTSpot, but you can use it with our test server to see if it would work for you.

Last but not least, Search Redlines is probably only useful to users with a lot of redlines (session graphics), and those redlines need to have text or embedded data in them to search.  Don't forget that anything highlighted can be easily converted to Session Graphics (Tools/Convert Highlighted to Session Graphics).  Highlight/Thematic Queries and Feature Counting highlight things that you might want to search too.   Also, Dynamic Graphics can be converted to Session Graphics (Tools/Dynamic Graphics to Session Graphics).  Granted, this is only what is in your current view, but GTDGExport is delivered with GTData and it can create a .GTG file for you whole dataset using a DG Action (you can import a .GTG file into Session Graphics using Draw/Import).   Lastly, FME can easily create .GTG files from many different sources, and you can embed data on the graphics (which is also searched by Search Redlines).









Tuesday, September 17, 2013

Add On Applications for GTViewer 14



GTViewer has supported External Applications from its beginning. These custom apps can be written in VB6, VC++, VB.NET, or C# and will extend GTViewer’s functionality to solve problems specific to your workflow.   External Apps have access to GTViewer’s extensive API (over 400 methods and events) to perform a vast array of tasks.  External Apps appear as if they are part of GTViewer’s interface and show up as menu items and/or on ToolBoxes.   Some examples of External Apps include Pole Inspection, Pole Top Inventory, Joint Use Identification, Upstream/Downstream Network Tracking, Gas Valve Isolation, Loop Makeup, Fiber OTDR, Outage Analysis, and many more.

Traditionally, these External Apps have been specified in your dataset (in the .GTM File) and when a particular dataset is opened in GTViewer, the External Apps are available.   Over the years, there has been an accumulation of External Apps that are generic in nature and could readily apply to any dataset.  For example, the Dynamic Graphics interface (which is an External App) can be used with any dataset, but you have to add its specification to each dataset’s .GTM file before you want to use it.  This task is a trivial, but it inspired a new feature in GTViewer 14 called Add On Apps.

Add On Apps are exactly like any other External Application with one exception; their specification is made at the product level and not in the dataset.   Once an Add On is configured, it is available to all datasets opened in GTViewer without any modification to their .GTM file.  On a technical level, the Add On App has a specification file placed in a in the user’s configuration file directory for GTViewer (%UsersData%/Graphics Technologies Inc/GTViewer/AddOns).  The specification file contains the entry that would normally be placed in the [External Applications] section of the .GTM file.  The installation for an Add On App can also place the specification file in the appropriate directory and the Add On App will be immediately available to GTViewer with no other modification necessary.

Since Add On Apps will be available to all datasets in GTViewer, they should provide generic functionality that applies to all datasets or at the very least perform tests to verify that the functionality they perform is applicable.  GTI has 6 sample Add On Apps available with the release of GTViewer 14:  Show Google Maps, Feature Tooltip Builder, Query Builder, Search Redlines, Where Am I, and GTSpot Importer.  A description of each is given below:



  • Show Google Maps – takes the center point of the active view, converts it to latitude/longitude, and opens a URL to Google Maps centered on the same point.  This application has no interface, and it is also available as sample code.



  • Feature Tooltip Builder – assists in the creating, editing, and testing of Feature Tooltip definitions in GTViewer.  Feature Tooltips show a tooltip for a feature when the mouse hovers over it.  The tooltip contains whatever information was specified in the definition using any of the feature’s tabular attribute values.  While not terribly hard to create, a tooltip definition is prone to error and is tedious to specify especially if you need to create a large number of them.  The Tooltip Builder allows you to select a feature in the map view and all of its attributes are shown to the user so they can point and click to build the desired tooltip.  The tooltip can be tested immediately, and its definition can be copied and pasted into the .GTM file to make it permanent.


  • Query Builder –assists in the creation of a Query Definition File for GTQuery (which compiles the definition into a .qry file and is used by GTViewer for locate, thematic, graphic offset, and connectivity queries).   The Query Definition File has long been veiled in a cloud of mystery because of it minimal documentation and its constantly changed to support new functionality.  However, the Query Builder simplifies the process of defining a Query Definition File and makes it unnecessary to find sample definition files or scour the documentation or blog for information on the many different entries.  Using the Query Builder is simple.  The user selects a feature in the map view and its graphic and tabular information are loaded to help guide the query creation in a point and click fashion.  The end result is a Query Definition File that can be compiled with GTQuery.


  • Search Redlines – provides a search tool for finding any redline text or any string contained in a redline element’s embedded data.  If you have a large amount of redline data, this tool can help you easily find elements similar to the way you find features with a Locate Query.  The search can be limited to redlines in the active view and also provides a variety of text comparison methods (begins with, ends with, contains, and exact match).


 
  • Where Am I? –shows the user a list of all polygons contain the point click with the mouse.  By default, it will show polygons containing the point using the polygon’s Filter Group Name and Filter Name as an identifier.   This app can also be configured to show only certain polygons and a specific attribute from a polygon’s associated tabular data (instead of the filter information).   Selecting an item in the list of polygons will locate it in the view.  You can also show the polygon’s Attribute Information, and copy the list of polygons to the clipboard.

 
  • GTSpot Importer - connects to a GTSpot Server and loads all GTSpot records in a dataset’s area.  It then displays the results as Data Monitor symbols in GTViewer and a tabular list of GTSpot records (Category, Note, Date, Time, User, etc.).  Clicking on a record will locate the item in the map view and display its thumbnail image (if available).  Clicking on a Data Monitor symbol will find the record in the tabular list, and clicking on the image thumbnail will display a full size version.

     

To use any of the Add On Apps, you can download them from the GTI ftp site.  All apps have the zip password: gtviewer