Wednesday, March 22, 2006

Using the LineGeneralizer in FME to reduce the number of points in a Polygon

GTViewer and Pocket GTViewer both set an artificially low maximum number of points that can be used in certain elements. These element types include:
  • Line String Elements
  • Shape Elements
  • Shape With Holes Elements
  • Complex Line String Elements
  • Complex Shape Elements
  • Complex Shape With Holes Elements.
The maximum point count is kept low to force the use of smaller elements to improve display performance and to reduce the amount of memory resources required to render the element. Pocket GTViewer runs on devices with severely limited resources and strict attention must be paid to this hardware limitation if high performance is to be maintained on the handheld platforms. The desktop version of GTViewer is forced to comply with this low maximum too because one data set is desired for use between the desktop and the handheld platforms, plus what runs faster on the handheld will also run faster on the desktop.

Currently, the maximum number of points is set to 12,000 and is sometimes too low to accommodate certain elements. Some polygons may contain 50,000 or more points for seemingly trivial features. There are various ways to deal with this problem when converting data for GTViewer. The GTShapeConv utility can decompose one of these elements into a group of elements with fewer points and this is generally the ideal solution, but it becomes a problem when you do this with large polygons. The polygon element will be broken down into a group of independent line strings that together will look like the polygon. The problem with this solution is that the converted element is no longer a polygon and can’t be filled.

If you are using Safe Software’s FME to convert your data to the GTViewer format, a clever transformer called the LineGenerlizer can be used to thin out the number of points in a linestring or polygon. By simply placing this transformer between your source and destination and configuring its parameters, the number of points in the elements will be reduced and fit into the elements without breaking them up.





A variety of parameters are available to generalize the element. I will leave it up to the user to look at the FME documentation for more details. However, I will discuss how to determine if you have satisfactorily adjusted the parameters enough to get all of the large polygons small enough to fit in to the maximum allowed number of points. When you run FME to convert your data, you will get warning messages like the following for elements that contained more than the maximum allowed points:

Shape with Holes contains more than the maximum number of points (20094, Max: 12000). Converted as a group of linestrings.
Shape with Holes contains more than the maximum number of points (12374, Max: 12000). Converted as a group of linestrings.
Shape with Holes contains more than the maximum number of points (24081, Max: 12000). Converted as a group of linestrings.

For generalizations using the Douglas algorithm, you can increase the generalization tolerance until you no longer get these warnings.

Not only will this process reduce the number of points in the elements enough to generate the appropriate elements, the reduction in points further improves performance, reduces the overall data size, and you probably will not be able to tell the points were removed in the first place.

Wednesday, March 15, 2006

GTViewer 5.0.x.12 is Available



Version 5.0.x.12 of GTViewer is available.

-----------------------
05.00.00.12 - 03/15/06
-----------------------
- FIX - With Session Links, if you browse to file that is at the same level as the .GTM file and the relative path mode is used, the first character of the detail

filenames get removed after the path is adjusted.

- NEW - Filter Threshold section added to Element tab in Attribute Info Dialog.

- NEW - Data Id now added to element attributes on Element tab in Attribute Info Dialog.

- FIX - The Text property for Text elements on the Element tab in the Attribute Info Dialog was display negative numbers for single character text as the character id for values over 127.

- FIX - Saving Character to .GTS session files with ASCII values greater than 127 would get their character value inverted.

- FIX - The Print to Scale dialog was not showing the units on the Scale Selection.

- CHG - For DGN Exports, groups of text elements are no longer converted as orphaned cells. Text Node element are now used instead of orphaned cells when all internal group elements are text elements.

- FIX - ElementGetPointList was not returning values for Type 114 Shape With Holes elements.

- NEW - New Methods:

long ElementGetPartCount(long id);

Wednesday, March 08, 2006

How to Make Your Toolbar Buttons Larger in GTViewer

Some time ago, a feature was added to optionally increase the size of the toolbar buttons in GTViewer. Originally, this feature was intended to make it easier to select the buttons when using Tablet PC or any other laptop with a stylus or pen. The buttons are only slightly larger, but the size difference does make selecting the individual buttons much easier since the target area is larger.

The screenshots below illustrate the different sizes of the buttons; the top uses the regular sized buttons and the bottom uses the larger buttons. The Zoom command is activated in both screenshots and can be used to more easily compare the size difference:



With the lackluster success of Tablet PC in the marketplace, this option was never integrated into the user interface, but it can still be used by setting a registry entry. Find the HKEY_CURRENT_USER folder, then Software, then Graphics Technologies Inc, and finally GTViewer. Under GTViewer there will be a Settings folder.



Add an entry to this folder called BigButton Flag. Make it a String value and then set it to 1 (setting it to 0 will be the regular sized buttons):



Run GTViewer and you should see the larger buttons.

You can also create a .reg file like the one shown below and run it:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Graphic Technologies Inc\GTViewer\Settings]
"BigButtonFlag"="1"

GTSmartClient - Press Release

Today, GTI announces a new product called GTSmartClient:

Press Release - GIS Cafe

Press Release - Directions Magazine

Tuesday, February 28, 2006

Street Navigation and Routing in GTViewer using MapPoint

Street Navigation and Routing capabilities are common tasks required by many GTViewer users. In its simplest definition, Street Navigation is determining a list of directions to get from Point A to Point B where Points A and B are street addresses (such as 123 Main St., Anytown, AL). Directions are presented as a list of turns and distances to travel to get you from the starting address to the destination. Street Routing is a step of above Street Navigation, while the two tasks are similar, Street Routing takes a list of addresses and finds the best order to visit each address providing the optimal (or near optimal) list of directions that minimize the distance and time required to visit all addresses.

While most GIS data does provide extensive landbase information (roads edges, street center-lines, etc.), this data generally does not provide enough information to perform viable Street Navigation or Street Routing. Many datasets even have well connected street centerline data, but do not contain one-way street information, road class, construction information, or any number of other attributes that could affect navigation decisions. So, the question arises, do you want to try to use your GIS’s landbase information even though it does not contain sufficient information to perform usable navigation and routing, or do you look to a 3rd party source of data to help? More and more users are turning to 3rd party data to solve this problem. Detailed street data that contains enough information to provide navigation and routing is very difficult to create and even more difficult to maintain. However, 3rd party data is available for these specific tasks. Microsoft’s MapPoint application is one such source of this data and is the topic of today’s blog posting. MapPoint provides good street data, good routing tools, and can be easily integrated into other applications (in this case, GTViewer).

MapPoint provides an extensive API for accessing its functionality. Similarly, GTViewer provides a similar style of API for extending its own functionality and integrating it with other applications. By creating an external application for GTViewer, the MapPoint functionality can be embedded into GTViewer and the MapPoint functionality becomes accessible inside GTViewer. One might ask the question, why bother integrating this functionality into GTViewer when MapPoint itself provides a user-friendly interface for performing Street Navigation and Routing (plus much more). An overwhelming opinion on this matter is that users do not want to switch to a different application to do this, user do not want to be trained on another application, and MapPoint’s many features that are not applicable may be confusing to the user. Also, running MapPoint as a separate application forgoes the tight integration you can achieve by embedding MapPoint inside GTViewer, such as clicking on a feature in GTViewer’s view to obtain an address for MapPoint to use, or clicking on an address in MapPoint and locate on it in GTViewer.

A Street Routing application is now available for GTViewer. This application integrates MapPoint with GTViewer to provide Street Navigation and Street Routing to GTViewer users. With the Street Routing application installed, you can select it from the Query menu in GTViewer and get the following dialog:



The Street Routing dialog provides three 3 methods for entering an address. The first, Find Place or Address, allows the user to key in a complete address, such as 123 Main St. Anytown, Alabama. Pressing the Find button will then search the MapPoint database for any matching address and present them to the user. The second method, Find Address, allows the user to enter the address components (Street Name, City, State, Zip Code). Pressing the Find button will search the MapPoint database and present any matching addresses:






The third method is the Get Address from Map option which allows an address to be acquired directly from a feature in GTViewer. Pressing this button activates a mode in GTViewer that allows the user to select features with addresses (the feature list must be configured in advance along with the table and fields that contain the address information). Once a feature containing an address is selected in GTViewer, the address information is sent directly to the Street Routing application.

Select and Address in GTViewer:






If the selected address is found, it is located in the MapPoint view and automatically added to the Route.



To perform Street Navigation, you need at least two addresses in the Route List. Any address in the Matching Addresses list can be added to the Route List (by double-clicking or pressing the Add button). The Delete button can also be used to remove any selected address from the Route List. The first address in the Route list is always the starting point and the last item in the list is the destination. You can have any number of items in the Route List. The Move Up and Move Down buttons can be used to reorder the items in the Route List while the Clear Route button will reset the list.

The Compute Route button is enabled when 2 or more items appear in the Route List. Pressing this button will cause MapPoint to generate a directions list to navigate from the starting address, through any intermediate addresses (waypoints), to the destination address.

In the following example, 4 addresses appear in the Route List:



A closer view of the graphical representation of the directions is shown below. The numbered squares correspond to the items in the Route List:



The Directions List provides summary information of the trip along with a detailed turn-by-turn description of how to get from the starting address, through the waypoints, to the destination address:



If a Route List has 4 or more addresses, you also have the option to Optimize the route. The Starting Address and Destination Address will stay the same, but any waypoints will be ordered such that you have the best route for the given address list.

In the trivial example shown above, Optimize still reduces the distance and driving time by change the order of the waypoints:





For more complex routes that cover a larger distance, the optimization can make a dramatic reduction in both time and distance. Optimizing a route is a non-trival problem that MapPoint handles automatically.

A more complex route is show below with a estimated travel time of 30 minutes and a distance of 13.4 miles:



Original Route List


Optimizing the route reduces the estimated travel time to 16 minutes (almost half the original) and a travel distance of 6.9 miles.


Optimized Route List


The Street Routing app has a few other features as well. Clicking on any address in the Route List will locate on that item in both the MapPoint view and in GTViewer. There is also an Import and Export capability for the Routes. So, if you have a file that contains a list of addresses (this file can be created in various ways from manually typing in a list with notepad or from an outage system’s output), press the Import Route button, select the file, then optimized and create a direction list. You can also export any Route list to a file with the Export Route button.

All GTViewer users do not need Street Navigation and Street Routing capabilities, so the additional cost of MapPoint is not justified; however, there are always times when this functionality is crucial to your operation, such as when visiting crews are helping with storm damage and are unfamiliar with the area. Using an application dedicated to Street Navigation and Routing, like MapPoint, is generally a better solution than trying to force your existing GIS’s landbase data to work at a crippled or inadequate level. By integrating MapPoint with GTViewer you get the best of both worlds.

Friday, February 24, 2006

Printing to Scale vs. Standard Printing in GTViewer

GTViewer and GTVx both provide sophisticated printing functionality. Most users have probably used the Standard Print command many times, but they may not be familiar with the Print to Scale command. This blog entry will discuss the differences between standard printing and printing to scale and show how they are different from one another.

The Standard Print command (File/Print or the printer icon on the toolbar) has two options for determining what information will be printed: the Default mode and the Full Page mode. The Default mode will print only what is contained in the Active View, while the Full Page mode will contain what is in the active view plus whatever else can be included to fill up the printable area on the paper. Since the Active View is generally not the same proportions as the printable area on the paper, there will usually be wasted space on the print; Full Page mode simply utilizes all of this wasted space while still including the information in the Active View.


Standard Print – Only what is in the Active View (default mode)


Standard – Active View plus additional area to fill page (Full Page mode)


While all Standard Prints have a scale, this value is just the computed scale required to fit the desired information on the printed page. The Print to Scale command provides the user with the ability to specify exactly what scale features will have when they come out on paper. For example, you might specify that the scale is 1 in = 50 ft (or 1 inch on the print will represent 50 feet in the real world). A scale might also be a ratio like 1:10000 (or 1 unit on the paper represents 10000 of those units in the real world).

By selecting the File/Print to Scale command in GTViewer, you get the following Print to Scale Dialog:

Using the Default Scales (based on the data’s minor and major units):


Using Custom Scales (defined as Ratios in the .GTM file):


From the Print to Scale dialog, you specify both the Scale you want and the Paper Orientation (Portrait or Landscape). A default Scale selection is provided (the first 7 scale options) and these scales can be configured in the .GTM file (two versions are shown above). The 8th scale option is a custom scale and allows the user to key in any scale value.

After selecting the scale and orientation, press okay and you are returned to the Active View with a “Cookie-Cutter” attached to the cursor. The Cookie-Cutter is a rectangle that can be moved around the view; all data inside the rectangle will be printed at the specified scale.

Cookie-Cutter:


Print to Scale – 1 in = 100 ft / Portrait


The Cookie-Cutter provides an easy way to see select the exact area you want to print at the selected scale. Also, with the Cookie-Cutter active, the user can also use a variety of key commands to change the scale and/or orientation and to see a print preview.


Key Commands for Cookie-Cutter:

  • L – Set to Landscape Orientation
  • P – Set to Portrait Orientation
  • + (plus) or . (period) – Set to next larger scale
  • - (minus) or , (comma) – Set to next smaller scale
  • Esc – Cancel Print to Scale Mode
  • Shift-P – Print Preview

Once the Cookie-Cutter contains the area you want to print, click the mouse button and you will be taken to the regular Print Dialog.

More Examples are shown below:

Print to Scale – 1 in = 200 ft / Portrait


Print to Scale – 1 in = 500 ft / Landscape



Also, for more information, see Printing with Custom Overview Maps in GTViewer to see what else can be done with printing in GTViewer.

Wednesday, February 15, 2006

How do I Zoom thee? Let me count the ways...




Okay, I am a day late for my Valentine's Day title, but here it is anyway. :)

I like to add blog postings on topics that not only show the features of the GTViewer product family, but I also like share answers to commonly asked questions that I get from days to day from the users base.

Today’s topic is about all of the different was to zoom in and out of your data. This list has grown over the years because everyone seems to have a different way they want to zoom, so here goes:

  • The obvious number one option is the Zoom command on the toolbar or View/Zoom. The Zoom command allows the user to zoom out by dragging the cursor up and right and to zoom in by dragging the cursor down and right. The zoom command also provides previous view functionality (drag up and left) and and Center View with a click (which can also be used to pan and will be described in a future blog posting "How do I Pan thee? Let me count the ways...".
  • The number two option is the Attribute Info command? What? Yes, the Attribute Info command. The Attribute Info command uses the same gestures as the Zoom command except the click with no drag will review a feature (under the click) instead of a Center View on the click.
  • The number three option (and my personal favorite) is the Mouse Wheel. Roll the mouse wheel away from you, and the view zooms out. Roll the mouse wheel toward you, and the view zooms in. It does not matter which mode you are in except for Magnify where the mouse wheel changes the size of the magnify box (for this case use the keyboard----see option 5 and 6 below).
  • Hold the boat! Option 3 sounds like the deal for you and could potentially be your favorite Zooming method, but the logic seems all backwards to you. You may want to roll the mouse wheel away to zoom in and vice versa. Well, that is okay (wrong, ha ha, but okay), you just have to change the direction of the zoom for the mouse wheel under Options/Settings/Mouse Wheel Increment. Making the increment negative will reverse the direction of the zoom. You can also change how much it zooms here too as its name implies.
  • The next option is for the keyboard fans out there. The '+' and '-' keys on the top of the keyboard and on the number pad both provide zoom in and zoom out functionality in any mode. Again, a ways to zoom in and out without changing modes (see previous 2 options for more methods that don’t change the mode).
  • Ack!!! My computer doesn't have a Plus and Minus Key!!!! And I want to use the keyboard! I don’t have a mouse and that pad thingee is too difficult to use!!! (This is me mocking myself; I am not making fun of any users out there). Most laptops actually do have the plus and minus keys, but it takes a function key or some additional key to get to it to work (thus defeating the ease of use option and usually making it a two-handed job). So I agree, the plus and minus keys are not the best choice for laptops (and GTViewer is supposed to be a mobile application isn't it???). There is a nice alternate solution here, the Comma ',' and Period '.' keys can also be used to zoom in and out. They share with the '<' and '>' keys, which makes the key functionality easier to remember, but they work if the shift is pressed or not.
  • This is probably enough for the zoom list, but there are yet even more ways to zoom in and out. The Fit will zoom all the way out. The Magify mode will zoom in to the magnified zoom level if you double click the mouse (very nice feature if you haven’t tried it). And last but not least, the Good Ol' Locate XY will let you set the zoom level to whatever you want. O, I guess I forgot that Queries will zoom into a predefined zoom level too. I am sure there are more, but I won’t go any farther.

How do I Zoom thee? Let me count the ways...

I zoom thee to the depth and breadth and height

My data can reach, when feeling out of sight

For the ends of a View are an ideal time to Fit.

I zoom thee to the level of everyday's

Most queried need, by sun and laptop.



Thanks Elizabeth Barrett Browning

GTViewer 5.0.x.11 is Available



Version 5.0.x.11 of GTViewer is available.

-----------------------
05.00.00.11 - 02/15/06
-----------------------

- NEW - Addition Logging information for the Data Extraction process.

- FIX - The Extract Process was suffering problems when source files are very large .gtx files using Non-Graphic Framme Keys.

- CHG - The Coordinate Readout Pane in the status bar was widened.

Wednesday, February 08, 2006

The Dynamic Display in GTViewer

Since the GTViewer Data format was designed to support data from different GIS sources (ESRI, Smallworld, Intergraph, etc.), it has always provided a variety of tools to manage the view in a dynamic fashion. For some GIS data, like Smallworld, it is common place for feature symbology to be dynamic and change as the view scale changes; however, for CAD based systems like FRAMME, the symbolgy is instance based and does not readily support dynamic styles. From GTViewer’s perspective, the source of the GIS data is irrelevant, so the dynamic style concept it uses with Smallworld can also be used with FRAMME data or any other GIS data source giving the user a much richer viewing experience. GTViewer provides two mechanisms to support Dynamic Display capabilities: Dynamic Style Rules and Display Threshold. These two approaches will be discussed in detail below.

In GTViewer, Dynamic Style Rules provide for different symbology (color, linestyles, weight, symbol characters, scale, etc.) as the view scale (zoom level) changes. Features viewed from far out can use one symbology while using a different symbology when viewed close up. The Dynamic Style Rules associate a named Style Definition with a particular feature for a particular zoom level range; there can be any number of Style Rules applied to feature as long as the zoom level ranges do not overlap (so only one style rule is in effect for a feature at any given zoom level). For example, a simple Dynamic Style Rule may define something like the following:

For Zoom Levels 0 to 2500, use Style Definition: Switch – Large
  • ColorValue=2550255
  • Scale=5.0

For Zoom Levels 2500 to Max, use Style Definition: Switch – Small

  • ColorValue=127640
  • Scale=1.0

The screenshot below shows the “Switch – Large” style rule in action. It causes the switch features (the Circled “S”) to be displayed much larger and in a brighter color (magenta) so that the features can be easily identified from far out. This sample data is from FRAMME which could not support this ease-of-viewing functionality. The Style Definition can be used to change the feature in a more dramatic way, such as changing the symbol character, rotating, offsetting, or any other number of characteristics (see the Style Manager for more info).

When zoomed in closer to the features, a different style rule is used with the switches:



Filter and Category Display Thresholds are also nice features for creating Dynamic View characteristics. Generally, Display Thresholds are used to boost performance by reducing the number elements drawn for each view update; however, Display Thresholds have a very nice side-effect of decluttering a view automatically as the user zooms in or out. Category Display Thresholds define a maximum and minimum zoom level for each Category of data in GTViewer. The Category will only be rendered when the view’s zoom level is within the Category’s Display Threshold range. So, if a category contains features that are only useful (or clearly visible) when the view is zoomed into, then it is always a good idea to set a maximum Category Display Threshold that will turn the Category off when zoomed out past a certain level. This idea is carried one step farther with Filter Display Thresholds. Each Feature Component in a Category has its own independent minimum and maximum Display Filter Threshold. A Filter Display Threshold is always superseded by its parent Category Display Threshold; however, if your Category contains a large display range, then Filter Display Thresholds can make a substantial difference in the usability of the data.

The following screenshot shows data with all features turned on as it would be in the original GIS:



The next screenshot uses Filter Display Thresholds to turn off all features that clutter the view or are not big enough to be of use. This example goes to the extreme by turning off most features to make a point, but as the user moves in closer, more features can be turned on automatically:



Both Dynamic Style Rules and Display Thresholds can be used in GTViewer to ensure that the users have the most usable view of the GIS data without any effort on their part. The users do not have to concern themselves with turning on and off features to get an unclutter view of the data and the symbology can automatically adjust to be provide the most useful display. The Dynamic Display characteristics are common to some GIS systems and GTViewer will carry these characteristics forward; however, the viewing requirement for mobile users or for specific applications may have different needs than the original GIS system, so alternate Dynamic Display characteristics can be provided on a user-class basis. Also, for GIS systems that never supported dynamic display characteristics in the first place, these features can provide an even richer viewing experience making the data more useful and the users more productive.

Wednesday, February 01, 2006

Update Available for the GTViewer Reader/Writer in FME



The latest FME Beta (build 2561 and later) from Safe Software includes an update to the GTViewer FME Reader/Writer Modules. This update includes several fixes and some minor new features. List of all updates below.

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.


-----------
01.00.00.10 - 01/11/06
-----------

- FIX - Shape With Hole Elements (Donuts) were not converted correctly. Internal polygons were not being closed.

-----------
01.00.00.09 - 11/01/05
-----------

- FIX - If no tabular attributes are present on a feature, then no database record is written. Previously, an empty record with key information was written.

- NEW - IndexGraphics entry in the GtiParameters.txt. If set to 0, the .gtg files will not be generated.

-----------
01.00.00.08 - 10/12/05
-----------

- NEW - The gtiParameters.txt directive file was added. It currently supports the EmbeddedAttribute entry which will automatically embed an attribute on a converted element element. This embedded information can be used for various things, such as tiling the data that was not originally tiled. It is also the same as setting the gti_embeddedData to the source attribute and the gti_embeddedDataType to 1 for all destination datasets.

-----------
01.00.00.07 - 10/5/05
-----------

- NEW - The Destination Dataset attributes are used to filter the attributes written to the output feature tables. Previously, all available attributes were written.

-----------
01.00.00.06 - 10/4/05
-----------

- FIX - The \xd\xa character was filtered out of attribute values, but \xd and \xa were not filtered out individually. This caused a problem with the table merge at the end of the conversion since there were blank lines in the temporary files.

- FIX - Preloaded .TAB files were using the feature name as the temporary table names. This was a problem fixed in an earlier version by placing a ~ in front of the temporary name, but it wasn't added to name for preloaded table information. This is only a problem if the feature name and the dataset name are the same.

Friday, January 27, 2006

GTViewer version 5.0.x.10 is Available



Version 5.0.x.10 of GTViewer is available.

-----------------------
05.00.00.10 - 01/27/06
-----------------------

- FIX - The RasterFileList file was not trimming the filenames in the list and would not correctly identify the raster type if the filename had spaces at the end.

- NEW - ExternalSessionsOnly flag can be set in the Additional Properties section of a .GTM file to allow GTViewer and GTVx to only use .GTS session files with .GTX files and not use the internal session in the .GTX file.

- CHG - The New Session Dialog's Browse button will default to showing both .GTM files and .GTX files by default instead of just .GTM files.

- NEW - Save As now supports Extract files (.GTX) and will create a .GTS session file of the current session. The new session file will be external to the .GTX.

- NEW - Session Modified Indicator on the Status bar. The asterisk in the 3rd pane on the status bar indicates that the current session has been modified and the session will need to be saved. The session is modified by changing the view, display filters, or redlines.

- FIX - Right Mouse Feature selection (for Attribute Info) was not filtering out features whose category was turned off by thresholds.


Thursday, January 26, 2006

Justification Codes for Text and Symbols

The GTViewer data format supports justified display for both Text and Symbol elements. This functionality is sometime confusing because of the number of codes used to specify the justification instructions. This posting will help clarify these different codes.

  • 0 – Default (Bottom Left)
  • 1 to 99 – Ignored, same as default (Bottom Left)
  • 100 – Bottom/Left
  • 101 – Center/Left
  • 102 – Top/Left
  • 103 – Bottom/Center
  • 104 – Center/Center
  • 105 – Top/Center
  • 106 – Bottom/Right
  • 107 – Center/Right
  • 108 – Top/Right
  • 163 – Bottom/Left
  • 165 – Bottom/Center
  • 167 – Bottom/Right
  • 171 – Base/Left
  • 173 – Base/Center
  • 175 – Base/Right
  • 181 – Center/Left
  • 183 – Center/Center
  • 185 – Center/Right
  • 201 – Top/Center
  • 203 - Top/Center
  • 205 – Top/Right
The following diagram will show how codes 100 through 108 will affect a text element. The Red Circle is the Origin for the text element when draw for each of the justification codes:

The codes 163 through 205 are similar to the 100 through 108 series. The difference is that these value correspond to the Smallworld justification codes (plus 150). There is also the addition of the Base Line justifications (171,172,173) that adjust the origin to 1/3 from the bottom of the text box.

For Text Elements, the justification can be specified as part of the element or as a Style Rule. For Symbol Elements, the justification is always specified with a style rule.

Tuesday, January 24, 2006

Thursday, January 19, 2006

The Mysterious addprop.ini File

Most people are unaware of the addprop.ini file and how it can be used with GTViewer, GTVx, and Pocket GTViewer. The addprop.ini file is a feature originally intended for development and debugging, but it has found many uses in the real world. The .GTM file ends with a section called [Additional Properties]. This section can contain a variety of different entries (usually items that do not fit in other sections). You can look at the GTVConfig.doc to see a complete list of entries supported by the [Additional Properties] section, but here is a quick list:

Measure Charactistics

  • MeasureFactor
  • MeasurePrecision
  • MeasureUnitLabel
  • LatLongFlag
  • MeasureDegreeFactor

Menu Hiding

  • LocateXYMenu
  • EditPasscode

View Restrictions

  • MinZoomLevel

Default Symbol Definition

  • DefaultSymbolCharId
  • DefaultSymbolFont
  • DefaultSymbolMode
  • DefaultSymbolLengthMult
  • DefaultSymbolJustification
  • DefaultSymbolScale

Timeout Properties

  • ApplicationTimeout
  • ApplicationInactivityTimeout

Reference Point Properties

  • RPCol
  • RPStyle
  • RPWeight
  • RPPos
  • RPProp

Non-Category Raster File Definition

  • Raster
  • RasterPC

Session Link Definitions

  • SessionLink

GPS Indicator Properties

  • GPSIndicatorSize
  • GPSIndicatorWeight
  • GPSIndicatorColor
  • GPSHeadingColor
  • GPSRefHeadingColor

External App Definitions for Pocket GTViewer

  • ExternalApp
  • DefaultApp
  • AutoStartApp
  • ResetExternalApps
  • ExtAppFiles
  • AllowClearAll

Some of these entries apply only to the desktop versions (GTViewer and GTVx), some apply only to the handheld version (Pocket GTViewer), and some apply to all platforms.

Since Pocket GTViewer only reads Extract Files (.GTX), the entries that are specific to this platform (such as ExternalApp) cannot be changed. Originally, if you wanted to change one of these entries, you had to modify the .GTM file and re-extract the data to create a new .GTX file with the updated entries. While this procedure was a little effort, it was possible. On the support side here at GTI, if a user sent a .GTX file to illustrate a problem he or she was experiencing, there was not a way to modify the settings to see if they just needed to make a minor change to these entries. So, the addprop.ini file was introduced to provide a mechanism for changing the entries in the [Additional Properties] section in a .GTX file. If a file called addprop.ini is found in the same directory as the product (PGTViewer.exe) or in the same directory as the .GTX file being viewed, the contents of the addprop.ini file were appended to the [Additional Properties] section when the .GTX file is opened. If an addprop.ini file exists both with the .GTX file and with the product, the one with the .GTX file is always used first. So, the addprop.ini file can be used to easily modify these settings.

Another problem the addprop.ini file addresses is when a user has a set of .GTX files that were generated in the past, but now the user wants to take advantage of a new feature added to Pocket GTViewer or use a feature that was not previously being used (such as ExternalApp). The addprop.ini once again can be used to supplement the [Additional Properties] section without modifying any of the .gtx files.

The use of the addprop.ini file has grown beyond its original intended use. Many users use the addprop.ini file to manage all of their external applications and never include this information in their .GTM file.

Some of the entries in the [Additional Properties] section are now specifically for the addprop.ini file, such as ResetExternalApps. This entry will clear any ExternalApp settings that were already defined in the .GTX file and new entries can then be provided in the addprop.ini file.

Since the addprop.ini worked so well for Pocket GTViewer, the same functionality was added to GTViewer and GTVx.

Sessions 102 - New Feature

In a recent posting (Sessions 101), the many different aspects of sessions were reviewed. One key item it discussed was creating a session file (.GTS) from an Extract File (.GTX) instead of a .GTM file. Traditionally, the session for an Extract file (.GTX) has been stored internally (in the .GTX file along with the data), to keep the dataset and the session in a single file. Many users expressed the desired to keep their data as single Extract file to simplify data management, so the Session File (.GTS) was extended to work with a .GTX file as well as a .GTM file. With this change, multiple users could have their own session (or multiple session) with a single Extract File (.GTX file). This feature has worked very well with one exception; it is sometimes confusing to a user that they need to create a session from a .GTX file (with File/New) rather than just open it with File/Open (which will open the internal session). With the latest version of GTViewer (version 5.0.x.10) and GTVx (version 5.0.x.5), a new feature was added to make the process of using .GTS session files with a .GTX file easier and less confusing.

In the .GTM file (remember that a .GTX file is made from a .GTM file), you can add a new entry to the [Additional Properties] section called ExternalSessionsOnly. If this entry is set to 1, the internal session in a .GTX file will not be accessible to GTViewer or GTVx. If this option is set, there can be no mistake of opening a .GTX with it internal session instead of creating an external session. If the user opens a .GTX with File/New, it will simply create a new session and when the user exists, it will ask if they want to save it (just like it does when a .GTM file is opened).

Tuesday, January 10, 2006

GTData 5.0.0.2 is Available



Version 5.0.0.2 of GTData is available. This version includes 3 new utilities:
  • GT2Shape will convert a .GTG file to a setup of Shapefiles.
  • GTThesh will adjust the maximum display thresholds in a filter file (.flt) based on the average size of the graphics associated with each individual filter id.
  • GTCleanFlt will reset the custom setting in a filter file (.flt).
-----------
05.00.00.02 - 01/10/06
-----------

- NEW - GTPack, GTExtract - now display an error message when using invalid or corrupt query files (.qry).

- NEW - GTThresh, GTCleanFlt, GT2Shape - New utilities have been added.

- NEW - GTShapeConv - Will now use a .shx file is present.

- FIX - GTShapeConv - Actual Range was not correctly displaying the range for certain elements types.

- CHG - GTShapeConv - Polygons now default to Shape Elements and Polylines now default to line or linestring elements. The ShapeFlag=0 will force polygons to lines and ShapeFlag=1 will force linesstrings to shape element (closing if necessary).

- NEW - GTShapeConv - TextFlag will now work with Polygon and Polyline types. The first point is used as the text origin.

- NEW - GTShapeConv - Will now assume the DbfFilename entry is the same as the ShapeFilename entry with .dbf instead of .shx.

- NEW - GTShapeDbfConv - Will now format Float type to be regular number (no scientific notation) and Date types according to the machines current locale.

GTI's 10 Year Aniversary

GTI is celebrating its 10 year aniversary.

Press Release


Monday, January 09, 2006

GTVx 5.0.x.4 is Available



Version 5.0.0.4 of GTVx is available.

-----------------------
05.00.00.04 - 01/09/06
-----------------------

- FIX - The Query Locate was not considering style rules that might alter the location of the element (such as a long piece of text that is center or right justified).

- NEW - The OptionalFlag has been added the Category sections of the .GTM file.

- FIX - The ExportSessionGraphics and ExportSessionGraphicsEx methods now will verify that an existing file is deleted before a new file is written. On Novell servers, the delete happens after the writting of the new file.~


GTViewer 5.0.x.9 is Available



Version 5.0.0.9 of GTViewer is available.

-----------------------
05.00.00.09 - 01/09/06
-----------------------

- FIX - The tabs on the GPS Info dialog did not show the correct text from the resource file.

- FIX - The Query Locate was not considering style rules that might alter the location of the element (such as a long piece of text that is center or right justified).

- NEW - The OptionalFlag has been added the Category sections of the .GTM file.

- FIX - The ExportSessionGraphics and ExportSessionGraphicsEx methods now will verify that an existing file is deleted before a new file is written. On Novell servers, the delete happens after the writting of the new file.

- NEW - New Doc Object Methods:
  • boolean ActivateInfoDialog(long mode, long categoryId, long offset);
  • boolean GetAttributeData(long mode, long dataId, VARIANT* linkageList, long linkageCount, VARIANT* attrList, VARIANT* valueList, long* count);

Thursday, December 22, 2005

Happy Holidays - Looking Forward to 2006

The Holiday season and end of the year activities has slowed down the routine postings, but rest assured, the regular postings will resume in January.

There are many exciting things GTI has in store for 2006:

Pocket GTViewer 5.0 will be release early in the year. This version of Pocket GTViewer will contain a significant amount of new functionality, plus support for Windows Mobile 5.0.

GTViewer will provide an import and export capability via Safe’s FME Enablement. This functionality will allow redlines to be imported and exported in GTViewer to and from any FME support format as long as FME is installed on the same machine as GTViewer.

A new product called GT/Field will allow users to create data collection and inspection apps for GTViewer and Pocket GTViewer using a GUI interface (no coding or development required).

Thursday, December 08, 2005

Automated Vehicle Location in GTViewer using APRS

Years ago when the Global Positioning System (GPS) was just beginning to make its impact on GIS, I would opine that, “GPS was a solution in search of a problem.” Obviously, today GPS is the solution to many GIS and non-GIS problems and is used daily in hundreds of different applications. And since I consider myself a knowledgeable person in the GIS industry, I thought I already knew about all of them. But recently while making arrangements to create a sample dataset for a potential client, I was surprised to learn something new about the use of the Global Positioning System (GPS).

Apparently, there is widespread use of GPS within the amateur or ham radio community which includes businesses, utilities, and municipalities. My understanding is that ham radios can be a more reliable form of communications than other radio-based systems- especially under emergency conditions.

Briefly stated, vehicles with ham radios and certain GPS devices can transmit data such as their GPS coordinates, estimated speed, bearing, and more. This is accomplished through the Automatic Position Reporting System (APRS). APRS is a system developed by Bob Bruninga which uses amateur radio to transmit position reports, weather reports, and messages between users. This data are received and eventually collated and stored within a central database. This database is available and accessible through the internet. Vehicles transmitting this data are displayed as icons with their call signs next to them on web-based, interactive maps. If you are interested in APRS and want to know more about it, please visit http://web.usna.navy.mil/~bruninga/aprs.html .

If you are looking for a specific vehicle and you know its call sign, you can enter the call sign and the vehicle’s position will be automatically generated and displayed for you on a map on the web site. This intrigued me and I wondered if I could develop an application which would query the database, receive the data, and display the location and data on a map within GTViewer. The result was a small, customized .ocx application I wrote that works within the standard GTViewer product as an external application. Using the Data Monitor toolkit functionality within GTViewer was straightforward and a lot of fun.

The results of my application as you can see are simple but as you might imagine you could get carried away and practically create your own Automatic Vehicle Location system.

As these screenshots illustrate, you don’t necessarily need the power of GTVx to create customized and functional applications. Many of them could be designed simply as external applications using your own data and GTViewer right out of the box!











Wednesday, December 07, 2005

GTViewer 5.0.x.8 is Available



Version 5.0.0.8 of GTViewer is available.

-----------------------
05.00.00.08 - 12/08/05
-----------------------
- CHG - Evaluation Timeout extended.
- FIX - Overview Map did not display elements whose priority was not 1.
- FIX - Style Manager did not like Filter Id greater than the max (500).
It will now semi-ignore them.
- FIX - Label in View Extents was Xhigh Ylow when it should have said Xhigh Yhigh.

- FIX - The Smallworld Justification codes were conflicting with the Microstation codes, so the Smallworld justification values are shifted by 150 so that they do not overlap.
- NEW - Shapefile Export has been added under Draw/Export.
- FIX - Fit Session Graphics was not adjusting for deleted redline elements.
- NEW - New Methods:


Doc Object:
boolean SetIndicatorRefHeadingDisplay(long mode);

boolean SetIndicatorRefHeading(double bearing);
boolean GetGpsInfo(VARIANT* attrList, VARIANT* valueList, long* count);
boolean SetIndicatorDisplay(boolean value);
boolean SetIndicatorPosition(long mode, double x, double y);
boolean GetIndicatorPosition(long mode, double* x, double* y);
boolean GetIndicatorDisplay();
boolean SetIndicatorHeadingDisplay(long mode);
boolean SetIndicatorHeading(double bearing);
boolean DeleteSessionGraphicByKey(long key1, long key2);
double GetElementLength(long categoryId, long offset);
long GetAddElementRedrawMode();
boolean SetAddElementRedrawMode(long value);

App Object:
long GetAppHandle();
boolean GetSize(long* xSize, long* ySize);
boolean GetPosition(long* x, long* y);

View Object:
long GetViewHandle();

boolean SetAddElementRedrawMode(long value);
boolean IsIndicatorInView();
boolean GetSize(long* xSize, long* ySize);
boolean GetPosition(long mode, long* x, long* y);

Dialog Object:
boolean SetPosition(long x, long y);

long GetDialogHandle();
boolean GetPosition(long mode, long* x, long* y);

Friday, December 02, 2005

Sessions 101 and New versus Open in GTViewer and GTVx

GTViewer and GTVx both offer the same two dialogs for New and Open and there is sometimes confusion about what the difference between these two commands. The differences are minor, but there are some differences. This blog posting will try to clarify these two commands and explain how a Session relates to them.

GTViewer and GTVx are session based. When you are viewing your GIS data, you are always in a session. The session information is separate from the GIS data in that it contains only the user-specific information such as the current view extents, display filter settings, and redlines. The GIS data is generally represented by a .GTM file (unextracted GTViewer data), and the session it uses is a .GTS file. A single .GTM file can have any number of sessions created against it, and these sessions can all be open simultaneously by one or more users.

This separation between the GIS data and the session info is straightforward until you consider an Extract File (.GTX) which contains both the GIS data and the session information in a single file. The .GTX file was initially designed to be single-user since its primary purpose was to provide data for Pocket GTViewer (a single-user environment). However, user affinity for managing their data with a single, self-contained .GTX file on the desktop guided product development to support simultaneous users each with their own session from a single .GTX file. By extending the .GTS session file to support .GTX files as well as .GTM files, multi-user support is provided for both .GTM and .GTX files. For more info, see: Unextracted versus Extracted Data, Creating Extract Files

This convoluted introduction to sessions is the key to understanding the difference between New and Open.

  • You will always be in a session if you are viewing GIS data from a .GTM file or a .GTX file.
    If you are using a .GTX file in single-user mode, the session information is embedded in the .GTX file (along with the GIS data, but only the session information is modifiable by the user).
  • If you use File/Open to open a .GTX file, the embedded session is used.
  • If you use File/Open to open a .GTM file, a new session is created using the .GTM file as the source. When you exit the session, you will be asked if you want to save the session. The session will be saved as a .GTS file.
  • If you use File/New and specify a .GTX file, a new session is created. When you exit the session, you will be asked if you want to save the session as a .GTS file.
  • If you use File/New and specify a .GTM file, a new session is created. When you exit the session, you will be asked if you want to save it or not.
  • With a .GTM file, File/Open and File/New are identical.
  • Double-clicking a file in the File Exploring is identical to File/Open.
  • Select a file from the Most Recently Used (MRU) list under the File menu is identical to using File/Open.
  • The File/Open command does provide a fancier dialog for creating a session. A history of the last ten source files is listed along with their descriptions (from inside the .GTM or .GTX files). You can select a file in the history list to create a session from or you can browse for a source file. (The Browse button will also take the path typed into the prompt as a starting point to speed along browsing)

The difference between File/New and File/Open are really pretty trivial; however, know the differences between the two command can help you get even more use out of your data, especially if you are wanting to share a .GTX file amongst multiple users. I have noticed from observing users that the File/New command is sometimes never used. There is nothing wrong with this approach, but the File/Open’s history list is sometimes very useful if you deal with several different datasets.

Creating sessions from .GTW and .GTG files is also supported, but this will be another blog posting at a later date.

See Also: Sessions 102

Thursday, December 01, 2005

GTVx 5.0.0.3 is Available



Version 5.0.0.3 of GTVx is available.

-----------------------
05.00.00.03 - 12/01/05
-----------------------

- FIX - If a font character contains a single polygon stroke, it could appear to dissappear at certain zoom levels (when the polygon points all end up at the same point). If this condition occures, the points of the characters polygon are spread so that they are not all in the same spot.

- NEW - New properties for SetDataProperty and new entries for Additional Properties section of GTM file:
  • GPSIndicatorColor
  • GPSHeadingColor
  • GPSRefHeadingColor
  • GPSIndicatorWeight
  • GPSIndicatorSize
- NEW - New Methods:
  • boolean SetIndicatorRefHeadingDisplay(long mode);
  • boolean SetIndicatorRefHeading(double bearing);


Tuesday, November 29, 2005