SWITRS crash data is imported incorrectly

SWITRS crash data is imported incorrectly

Issue

The California Highway Patrol (CHP) maintains the crash records that you use as SWITRS data. In January of 1998 they modified the format which had been used for many years. The format was changed to add the century to any dates in the data file. This makes the data y2k compatible. This requires special treatment of SWITRS data by Intersection Magic.

Explanation

Intersection Magic uses a file called an import definition to figure out how to import data from an ascii file like SWITRS. The import definition indicates the column positions where data will occur. Since SWITRS data changed its layout to appear in different columns, old import definitions will no longer work properly with new SWITRS data.

IMPORTANT:

When CHP changed the format of SWITRS data, they modified their entire existing database history to reflect this new format. (we think this was the right move!) What this means is that any data that was sent to you after January 1998 will be in the new format.

For example, if you request 1987 data and receive it next week, it will be in the new y2k compatible format. The only data which will be in the old format is that data which you received prior to January 1998.

Solution

SWITRS users will either have an import definition called swit.imp or swit.iml. If the import definition that you are using is called swit.imp, then it is designed for the old SWITRS format. If you are using one called swit.iml, then it may be either format and you need to check it. To see which one you are using, select Utilities / Database / Import and look at the file name in the import definition button in the dialog box.

To determine if you are using an old or a new swit.iml, you need to open it and look at it. This is done in Utilities / Edit config files / Import definition / Edit. You should see swit.iml as the default. Select ok.
This file contains a line which says either:
Date=@FixField( 13, 8 )
or
Date=@FixField( 11, 6 )
If yours matches the first case, that is the y2k (new) SWITRS format. It can only be used on data received after January 1998. If your import definition matches the second case, it is designed for the old SWITRS format. You will need to obtain an update (swit_up.exe) from Pd’ Programming which contains a new SWIT.IML.
The DATE line is not the only change in this file. While you are free to make the needed changes yourself, please be aware that almost every line of the import definition required a change to accommodate the new format.

Once swit_up.exe is run, it installs a new swit.iml as well as a pr98swit.iml, which is a file which can be used to read pre 1998 data in case the need arises.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
How Can We Improve This Article?