
Export2iGO Version 3.2.0.0
==========================

Export Speed Camera Files to iGO 2006SE Plus Text Format
========================================================


Licence Agreement
=================

This software is provided by the author and contributors "As is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the author or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.


Introduction
============

This utility is primarily designed to convert speed camera files in Generic Ascii format to the iGO 2006SE Plus text format.

However it will also import speed camera files in the TomTom OV2 format and convert these to the Generic Ascii format required for further conversion to the iGO 2006SE Plus text format.

It will also import speed camera files already in the iGO 2006SE Plus text format and convert these to Generic Ascii for conversion back to the iGO 2006SE Plus text format. This effectively allows the user to modify an iGO 2006SE Plus text file and add or remove camera categories as required.


Installation
============

No installation is required, just unzip the folder to any suitable location and start the Export2iGO application. No files are copied to any other locations.

After starting Export2iGO select the required interface language by means of the drop-down "Select Language" list box. If the required language is not shown in this list then a new language file can be created. See "Multiple User Interface Language Files" below for further information.


Demonstration Mode
==================

Export2iGO first starts in demonstration mode. This uses a set of demonstration files and folders which can be used for experimentation and to find out how the application works.

The demonstration speed camera files don't represent actual speed camera sites and are not on any roads. If you wish to view the locations in iGO then enter the point N52.00000, E0.00000 into "Coordinates Input" and tap "Done". Zoom in or out if required and the speed cameras should appear in a straight line stretching northwards.

When finished with demonstration mode uncheck the "Demonstration mode" check box and the application will use the normal working files and folders.


Quick Start Guide
=================

Download the required speed camera files in Generic Ascii format categorised by type and zoned by speed. See "Generic Ascii File Format" below for further information. 

Otherwise download in TomTom ov2 format categorised by type and zoned by speed and convert to Generic Ascii format. See "Import of TomTom OV2 Binary Files" below for further information.

Files already in the iGO 2006SE Plus text format can also be imported in order to add or remove camera categories as required. See "Import of iGO 2006SE Plus Text Format Files" below for further information.

Copy all of the Generic Ascii speed camera files to the "asc" subfolder. See "File Naming Conventions" below for further information.

Start the Export2iGO application.

Deselect the "Demonstration mode" checkbox (if not previously deselected).

The "Speed Camera Files (Unclassified)" list box on the right should now show all of the "asc" subfolder speed camera file names.

Select the "Classify Files" button to automatically classify and transfer the speed camera file names into the "Speed Camera Type" list boxes on the left.

If any speed camera file names still remain in the "Speed Camera Files (Unclassified)" list box, or the classification isn't as required, then select the incorrectly classified file names and use the respective "Add" ( < ) or "Remove" ( > ) buttons to adjust accordingly.

The automatic classification can be modified by means of the "Auto" checkboxes for each "Speed Camera Type" list box or by editing the "Settings.ini" file. See "Settings Initialisation File" below for further information.

Select the "Export" button to export the speed cameras from the files in the "Speed Camera Type" list boxes on the left. The speed cameras will be exported in iGO 2006SE Plus text format to the "SpeedCamText.txt" file in the "txt" subfolder. No speed cameras will be exported from any files remaining in the "Speed Camera Files (Unclassified)" list box on the right.

Since iGO supports multiple speed camera text files, check the "iGO\POI\Speedcam" folder on the iGO SD Card for any existing text files. These will be combined by iGO with any new file added to this folder. Delete any that would create duplicate speed cameras. See "Multiple Speed Camera Files" below for further information.

Copy the "SpeedCamText.txt" file to the "iGO\POI\Speedcam" folder on the iGO SD Card.

Start iGO and the "SpeedCamText.txt" file will be read automatically and the speed cameras transferred into the "speedcam.spdb" database file in the same folder. Don't delete the original "SpeedCamText.txt" file or else iGO will update the "speedcam.spdb" database file again and remove all the speed cameras that were in that particular file. See "Multiple Speed Camera Files" below for further information.

Check in the iGO Settings > General Settings > Alerts that the "Enable Safety Cameras" option is enabled. This option is only visible after a first GPS fix has been obtained in order to disable safety camera warnings for countries where it's illegal.


Multiple User Interface Language Files
======================================

The user interface language "ini" files are located in the "lang" subfolder. To create a new language file, copy an existing language file and save it in the "lang" subfolder with the name of the new language. For example, a new Esperanto language file could be named "Esperanto.ini". Open the new language file in a text editor and translate all of the text in inverted commas. The new language will appear in the "Select Language" list box the next time Export2iGO is started.


Import of TomTom OV2 Binary Files
=================================

Download the required speed camera files in TomTom OV2 format categorised by type and zoned by speed. Copy the OV2 files to the "import\ov2" subfolder and start Export2iGO. Ensure that the "Demonstration Mode" checkbox is unchecked and select the "Import Files" button to open the "Import Files" dialogue box. Check that the "Convert all OV2 source files to Ascii" option button is selected. The lefthand side of the dialogue box shows the number of OV2 files in the source "import\ov2" subfolder awaiting conversion. The righthand side shows the number of existing Ascii files in the target "asc" subfolder. Selecting the "Start" button will first delete all files in the target folder and then convert all of the OV2 files to Ascii format and save them in the target "asc" subfolder. The dialogue will then update to show the new status. Selecting the "Finish" button will exit the dialogue and the "Speed Camera Files (Unclassified)" list box will update to show the newly converted speed camera file names.

Alternatively the OV2 files can be converted to Generic Ascii using the "Batch Convert" facility of POIEdit. Then copy the resultant Ascii files to the Export2iGO "asc" subfolder and proceed as normal. POIEdit by Dnote Software is free shareware and the latest version can be downloaded from www.poiedit.com.


Import of iGO 2006SE Plus Text Format Files
===========================================

Download the required speed camera file(s) in iGO 2006SE Plus Text Format. Copy the Text file(s) to the "import\txt" subfolder and start Export2iGO. Ensure that the "Demonstration Mode" checkbox is unchecked and select the "Import Files" button to open the "Import Files" dialogue box. Select the "Convert all Text source files to Ascii" option button. The lefthand side of the dialogue box shows the number of Text files in the source "import\txt" subfolder awaiting conversion. The righthand side shows the number of existing Ascii files in the target "asc" subfolder. Selecting the "Start" button will first delete all files in the target folder and then convert all of the Text files to Ascii format and save them in the target "asc" subfolder. The dialogue will then update to show the new status. Selecting the "Finish" button will exit the dialogue and the "Speed Camera Files (Unclassified)" list box will update to show the newly converted speed camera file names.

All of the information in the iGO Text file(s) will be extracted, including any DirType and Direction fields. This will be saved in the default Generic Ascii File Format (Extended - DirType,Direction) detailed below. Therefore, after further conversion back to the iGO Text format, this information will still be included in the resultant iGO Text file.

Due to the limitations of the iGO Text file format certain information may appear to be missing in the resultant Ascii files. If for instance the following camera files had been used to create the iGO Text file, Fixed_Camera_TBA, Fixed_Camera_VAR and Fixed_Camera, all with no speed value, then these would all appear in the iGO Text file as Type 1 with Zero speed. These would then be extracted by Export2iGO into only one Ascii file named Fixed_Camera_000. However, this file will include all of the speed cameras which were in the original three files. The "_000" extension just signifies that there is no available speed information.

The import of multiple Text files is supported and all of the included speed cameras will then be combined in the resultant Ascii files.


Additional Functions
====================

Normally, with the "Replace" option button selected, the application will overwrite any previous "SpeedCamText.txt" file.

By selecting the "Save File As..." option button the "SpeedCamText.txt" file can be saved with a different name to facilitate the use of multiple speed camera files, one for each country for example.

By selecting the "Append To File..." option button the output can be appended to any existing speed camera text file to create one large file, as opposed to the multiple speed camera file method.

Any file in the "Speed Camera Files (Unclassified)" list box on the right can be renamed by selecting it and then selecting the "Rename File" button.

The Exported Speed Camera results are saved after every export operation to a text file named "Export Results" in the Export2iGO application main folder. This file is overwritten each time and only holds the most recently saved results. By unchecking the "Save export results summary to file" check box the results will no longer be saved to file and any previously saved "Export Results" file will be retained.

After each successful "Export" operation an "Exported Speed Camera Results" summary is displayed in a popup window. This always shows the results of the latest "Export" operation. This is different to the "Export Results" file which may not always show the latest results depending on the setting of the "Save export results summary to file" check box.

The popup "Exported Speed Camera Results" summary window can be disabled by unchecking the "Show results summary after exporting speed cameras" checkbox. In this case the popup results summary window can still be displayed by selecting the "Show Results" button. The "Show Results" button only displays the summary after a successful "Export" operation and is disabled by any subsequent file movement, renaming or classification operations.

By checking the "Demonstration mode" check box the application will use a set of demonstration files and folders which can be used for experimentation and to find out how the application works.

Selecting the "Reload Files" button will clear the list boxes and read in all of the file names and settings again. Essentially the same as restarting the application.


Multiple Speed Camera Files
===========================

Multiple speed camera text files are supported, so if the following files are created and copied to the "iGO\POI\Speedcam" folder on the SD Card iGO will read each one and add all the speed cameras to the iGO "speedcam.spdb" database file.

SpeedCamText_UK.txt
SpeedCamText_FR.txt
SpeedCamText_ES.txt

If one of the files is now deleted, iGO will update the "speedcam.spdb" database to include only the two remaining speed camera text files.

Therefore all of the multiple speed camera text files must remain in the "iGO\POI\Speedcam" folder to remain active.


File Naming Conventions
=======================

In order to classify the speed camera files, and to be able to extract the correct speed limit value, certain naming conventions must be followed.

In order to classify by type an example is shown below of the various names that can be used for a set of generically named speed camera files, although any naming convention is possible providing the "Settings.ini" file is edited accordingly.

In order to extract the speed limit value this should be included as a number in the last three (or two for limits below 100) characters of the speed camera file name.

If the last three (or two for limits below 100) characters of the speed camera file name are non-numeric then no speed limit will be assumed and a value of zero entered in the iGO "SpeedCamText.txt" text file SPEED field. An exception to this rule is where a "Units" name direcly follows the speed limit value. See "Settings Initialisation File (ignoring speed units)" below for further information.

The separator between the name and the numeric speed value isn't specifically required but if included then the underscore "_" should be used.

The names can include spaces but it isn't recommended due to the problem of inadvertently using a double space instead of the normal single space.


Examples of Valid Generic File Names
====================================

[Type1] Fixed Speed Camera (Gatso, Truvelo, Monitron etc.)

With Speed Value:
Fixed_50.asc
Fixed_050.asc
Fixed_120.asc

No Speed Value:
Fixed.asc
Fixed_var.asc
Fixed_tba.asc
Fixed_anything.asc


[Type2] Red Speed Camera (checks passing red light and also speed through green)

With Speed Value:
RedSpeed_50.asc
RedSpeed_050.asc
RedSpeed_120.asc

No Speed Value:
RedSpeed.asc
RedSpeed_var.asc
RedSpeed_tba.asc
RedSpeed_anything.asc


[Type3] Red Light Camera (checks passing red light)

No Speed Value:
RedLight.asc


[Type4] Section Speed Camera (also known as SPECS or Distance cameras)

With Speed Value:
Section_50.asc
Section_050.asc
Section_120.asc

No Speed Value:
Section.asc
Section_var.asc
Section_tba.asc
Section_anything.asc


[Type5] Mobile Speed Camera (regular camera vans and police checks)

With Speed Value:
Mobile_50.asc
Mobile_050.asc
Mobile_120.asc

No Speed Value:
Mobile.asc
Mobile_var.asc
Mobile_tba.asc
Mobile_anything.asc


Settings Initialisation File (automated classification by type)
===============================================================

The settings initialisation file enables automated speed camera classification by type by means of file search patterns.

Standard wild card characters "*" and "?" plus single digit "#" are supported.

Any single character in [charlist] or range, e.g. [A-Z], is supported.

Any single character not in [!charlist] or range, e.g. [!A-Z], is also supported.

The file search patterns are not case sensitive.

The Ascii file name extension ".asc" is required.

Anything on the same line following the ";" character is treated as a comment and ignored.

The type labels [Type1], [Type2], [Type3], [Type4] and [Type5] are required but anything following on the same line is treated as a comment.

The settings initialisation file currently contains file search patterns for two generic naming conventions plus the PocketGPSWorld, GPS Passion and Puntodeinteres speed camera naming conventions.

File search patterns for each type classification in the settings initialisation file can be added, removed or edited as required.


[Type1] Fixed Speed Camera (Gatso, Truvelo, Monitron etc.) 
FSC*.asc
Fixed*.asc
pocketgps_uk_gatso*.asc
RF*.asc
fijos_spain*.asc


[Type2] Red Speed Camera (checks passing red light and also speed through green)
RSC*.asc
RedSpeed*.asc
pocketgps_uk_redspeed*.asc


[Type3] Red Light Camera (checks passing red light)
RLC*.asc
RedLight*.asc
pocketgps_uk_redlight*.asc
RadarsFR*.asc
semaforos*.asc


[Type4] Section Speed Camera (also known as SPECS or Distance cameras)
SSC*.asc
Section*.asc
pocketgps_uk_specs*.asc
RD*.asc
inicio_tramos*.asc
fin_tramos*.asc


[Type5] Mobile Speed Camera (regular camera vans and police checks)
MSC*.asc
Mobile*.asc
pocketgps_uk_*mobile*.asc
pocketgps_uk_temp*.asc
RM*.asc


Settings Initialisation File (extracting embedded cameras)
==========================================================

This section uses search strings to extract embedded speed cameras. If the speed camera description field contains one of the strings below, then it will be exported as that particular type of camera, irrespective of file name. The search strings are not case sensitive. Note that this section does not support wild card characters.

[Fixed] Search strings to extract any embedded Fixed Speed cameras.

[RedSpeed] Search strings to extract any embedded RedSpeed cameras.
RedSpeed

[RedLight] Search strings to extract any embedded RedLight cameras.

[Section] Search strings to extract any embedded Section cameras.

[Mobile] Search strings to extract any embedded Mobile cameras.


Settings Initialisation File (ignoring speed units)
===================================================

This section uses search strings to ignore speed units at the end of file names. For example, with a search string of "kph" in the Units section below, a file named "Fixed_050kph.asc" will be treated as "Fixed_050.asc" for speed derivation purposes.

[Units] Search strings to ignore at the end of speed camera file names.
kph
mph

Although primarily intended to ignore speed units this section can be used to ignore any text directly following the speed limit value.


Settings Initialisation File (configuration settings section)
=============================================================

This enables different Ascii source file structures to be used. See "Generic Ascii File Formats" below for further information.

[Settings]
SourceStructure=2


Settings Initialisation File (editing)
======================================

After editing the file either restart Export2iGO or select the "Reload Files" button to import the revised settings.


1. Generic Ascii File Format (Standard)
=======================================

This is the standard Generic Ascii file format:

[Settings]
SourceStructure=1

File Structure
==============
X,Y,NAME

Field Description
=================
X | horizontal/longitude (E/W) coordinate
Y | vertical/latitude (N/S) coordinate
NAME | Camera Name     (enclosed within text delimiters)

Example Ascii File:

0.11330, 51.49455, "Anyname Speed Camera"
-2.12292, 53.46414, "Anyname Speed Camera"


2. Generic Ascii File Format (Extended - DirType,Direction)
===========================================================

This extended Generic Ascii file format is also supported and is set as the default:

[Settings]
SourceStructure=2

File Structure
==============
X,Y,NAME,DIRTYPE,DIRECTION

Field Description
=================
X | horizontal/longitude (E/W) coordinate
Y | vertical/latitude (N/S) coordinate
NAME | Camera Name     (enclosed within text delimiters)
DIRTYPE | Camera direction type:
        | 0 - all directions     (full 360')
        | 1 - one direction      (see DIRECTION field)
        | 2 - both directions    (DIRECTION + the opposite direction)
DIRECTION | Camera angle         (between 0 and 359 degrees)

Example extended Ascii File:

0.11330, 51.49455, "Anyname Speed Camera", 1, 180
-2.12292, 53.46414, "Anyname Speed Camera", 2, 270


3. Generic Ascii File Format (Extended - Direction,DirType)
===========================================================

This extended Generic Ascii file format is also supported:

[Settings]
SourceStructure=3

File Structure
==============
X,Y,NAME,DIRECTION,DIRTYPE

Field Description
=================
X | horizontal/longitude (E/W) coordinate
Y | vertical/latitude (N/S) coordinate
NAME | Camera Name     (enclosed within text delimiters)
DIRECTION | Camera angle         (between 0 and 359 degrees)
DIRTYPE | Camera direction type:
        | 0 - all directions     (full 360')
        | 1 - one direction      (see DIRECTION field)
        | 2 - both directions    (DIRECTION + the opposite direction)

Example extended Ascii File:

0.11330, 51.49455, "Anyname Speed Camera", 180, 1
-2.12292, 53.46414, "Anyname Speed Camera", 270, 2


iGO Speed Camera File Format
============================

The iGO 2006SE Plus speed camera text file is essentially a "csv" (comma separated variable) file and can have any name provided that it has the ".txt" file extension.

This is the file format:

File Header
===========
X,Y,TYPE,SPEED,DIRTYPE,DIRECTION

Field Description
=================
X | horizontal/longitude (E/W) coordinate
Y | vertical/latitude (N/S) coordinate
TYPE | Camera type:
     | 1 - Fixed Speed Camera    (Gatso, Truvelo, Monitron etc.)
     | 2 - Red Speed Camera      (checks passing red light and also speed through green)
     | 3 - Red Light Camera      (checks passing red light) 
     | 4 - Section Speed Camera  (also known as SPECS or Distance cameras)
     | 5 - Mobile Speed Camera   (regular camera vans and police checks)
SPEED | Speed limit
DIRTYPE | Camera direction type:
        | 0 - all directions     (full 360')
        | 1 - one direction      (see DIRECTION field)
        | 2 - both directions    (DIRECTION + the opposite direction)
DIRECTION | Camera angle         (between 0 and 359 degrees)

Example Text File:

X,Y,TYPE,SPEED,DirType,Direction
0.11330,51.49455,1,50,1,180
-2.12292, 53.46414,1,50,2,270

Currently very few available speed camera databases include the DIRTYPE and DIRECTION information. If any can be found with this information in either of the above extended formats then they can be successfully used provided that the "SourceStructure" setting is edited accordingly.
Otherwise the DIRTYPE and DIRECTION fields are set to zero. This means that speed cameras will be detected from all directions which can give false alarms if passing a camera which is looking in the other direction. However this is better than no warning at all which can occur if the direction information is incorrect.


Revision History
================

Version 1.0 
First version published.

Version 1.1
Added internal "ov2" conversion and removed external GpsBabel utility.

Version 1.2
Mainly cosmetic changes and general code optimisation.

Version 1.3
Added the facility to extract embedded speed cameras by name.

Version 1.4
Replaced "comdlg32.ocx" with file save/open API call to enable full Vista compatibility. 
Import of "ov2" files now independant of regional decimal symbol setting.

Version 1.5
Import of "ov2" files now checks for, and replaces, any invalid characters in the original description. 
Version number added to main window title.

Version 1.6
Additional automated classification entries included in the "Settings.ini" file.
Added single digit "#" wild card option to the automated speed camera classification.
Demonstration mode now uses the main "Settings.ini" file instead of a separate file.

Version 1.7
Added "Auto" checkboxes for each "Speed Camera Type" list box to allow user configuration of automated classification.
Added separate "Start", "Cancel" and "Finish" buttons to the "Import OV2 Files" dialogue, the import operation can now be safely cancelled whilst in progress. Also modified the "Finished" and "Incomplete" graphics plus various other minor cosmetic changes.

Version 1.8
Added "Reload Files" operation after each "Auto" checkbox change.

Version 2.0
Added the Import of iGO 2006SE Plus Text Format files in addition to the Import of TomTom OV2 files.
Default "SourceStructure=2" setting allows DirType and Direction data to be transferred in order to support above operation.
Folder structure modified with an "import" folder now containing the "ov2" and new "txt" import subfolders.
File Import dialogue "Cancel" button now safely cancels operations in progress.

Version 2.1
Functionally identical to version 2.0 but with some code optimisation for improved speed plus a few minor cosmetic changes.

Version 2.2
The "Export Speed Cameras" procedure now correctly reads Ascii files with commas in the description field without giving skipped camera errors.
Speed cameras with coordinates of 0.00000,0.00000, used as comments in "ov2" files, no longer reported as skipped cameras.

Version 2.3
A few minor interface changes. Error handling routine now provides more detailed information.

Version 2.4
Added a progress bar to the "Export Speed Cameras" procedure.

Version 2.5
Theme colours now correctly displayed in both Windows XP and Vista.

Version 3.0
International version with support for editable multiple user interface language files.
Redesigned interface to support longer translated names and phrases.
Control buttons now shown as disabled if that particular option is not available.
Multiple speed camera selections can be made in the list boxes either by dragging with the mouse or by using the mouse in conjunction with the "Shift" and "Control" keys.

Version 3.1
Moved all ReadMe files to a separate folder to provide an area for users to add translated files.
Error when any of the "Auto" checkboxes were clicked with empty file lists corrected.
Improved determination of control button states in accordance with available options. 

Version 3.2
Changed font of the list boxes to make speed camera file names easier to read.
Enabled both single and multiple "drag and drop" of speed camera file names between list boxes.
Any of the "Remove" buttons can now be used to remove selected file names from the "Speed Camera Type" list boxes on the left.


Credits
=======

Credits are due to the creator of Miomap_v3-autovelox_updater-v3.3, which I understand to be Ervius at http://forum.pocketpcitalia.com, for the original idea, the interface basic layout and the config file search pattern method. Credits are also due to Ov2iGo by Nedge2k for the iGO text file format details. Otherwise everything is completely new.


Export2iGO by linknet.


End of Readme.
