TRSfile is a program to deal with large amounts of data that is in the format of Township, Range, Section, Meridian, & State. This information is used to calculate decimal degrees in both Latitude and Longitude.
TRSfile is a Windows program that is based on the program libraries of Martin Wefald. His original work and the DOS program can be seen at his TRS2LL webpage. (Watch out for the Geocities popups!)
TRSfile version is written in Visual Basic and allows the Windows user to have a familiar interface to the program. All input and output can be selected by the mouse and keyboard. Using the TAB key will move logically through the form to the next input box or control. File names for reading and writing data are selected by using standard Windows controls. Users can cut and paste into the form, like other normal Windows programs.
This program covers 17 western states that are described by the program libraries by Martin Wefald. See the coverage and meridian map below.
It is expected that the data input file for TRSfile will be generated by a database program that can write out a comma delimited text file. TRSfile generated a comma delimited text file for the calculated position from the TRS data that can be then read back into the database to update the latitude and longitude fields. Errors are detected and noted in the output files from TRSfile.
TRSfile runs quite fast. For a file with 15,000 data points, a desktop computer with a Pentium 1.6 GHz processor running Windows XP takes about 3 seconds to completely process the data! A laptop computer with a Pentium 133 MHz processor running Windows 95, only takes about 20 seconds to process the same 15,000 lines of data.
TRSfile Opening Screen
Clicking on the "Input File" button brings up a screen similar to that immediately below.
Open input file screen.
The program looks for data files with the extension .TRS. If needed, use the pulldown labeled "Files of Type" and it will be possible to select from any type of file extension (*.*). TRS files are standard ASCII text files that have been formatted correctly so that TRSfile may use them. The extension .TRS was selected to indicate that the file contains this formatted data.
TRSfile after selecting the input file.
Clicking on the "Output File" button brings up a screen similar to that immediately below.
Select output file screen.
TRSfile after selecting input and output files.
TRSfile during file processing.
TRSfile after completing file processing.
Test input data file, viewed in text editor.
The file header in the example reads:
Type,Number,State,County,Meridian,Township,Range,Section,Latitude,Longitude,Error
but could just as well read:
Field 1,Field 2,State,Field 3,Meridian,Township,Range,Section,Latitude,Longitude,Error
Since the Latitude and Longitude are unknown in the input file, the fields can be left blank (as in this example) or can have zeros in those places. The error field should always be left blank in the input file as this is reserved for the output phase. The example file has a couple of errors which will show up after processing (see the error page graphic below).
State abbreviations are preferred over the complete name for the fact that typographical errors are less likely.
Meridians are specified by the full name or by an abbreviation code. The codes for the meridians are as follows:
The meridian value may be omitted and the calculation will proceed, but with possible unexpected results. It will always be better to specify the meridian. (Not including the meridian is like answering the question about a birthday by saying "Wednesday in February". Maybe only 4 or 5 possibilities but not enough information to be specific.)
Townships are always a number followed by either a N or S. Odd townships that are .5 or .75 must be specified by using the decimal value (ex: 17.5N).
Ranges are always a number followed by either a W or E. Odd ranges that are .5 or .75 must be specified by using the decimal value (ex: 21.5E).
Sections are numbered 1 to 36, in a standard township.
Test output data file, viewed in text editor.
The 10th data line has an error and the message "Section out of range (1-36)" is appended to the line in the output file. Section 44 is the 'not valid' data element.
The last data line has an error and the message "Out of Range Error (State, Township, Range, Section, Meridian)" is appended to the line in the output file. This error message is used when general errors occur and the program has a hard time being specific. In this case, inspection of the line reveals that the Range 444E is probably the bad data element. It was probably supposed to be 44E but the "fat finger" struck the data entry person. If the data elements look like they are in the range of possibility, check another authoritative source to see where the error might be. One good authoritative source is the BLM Land Survey Information System website. Another source would be USGS topo maps (or the large number of electronic versions of these maps). From sources such as these, it may be possible to determine that while near state borders that use a common meridian, the data collector entered the wrong state, for instance.
Error codes are as follows:
Test data file "errors only" file, viewed in text editor.
Coverage of TRSfile program, 17 states.
Meridians are color coded.
NO other states, or parts of states, are expected to be available.
CAUTION Large File! 2.0Mb.
Quite a large number of hours of programming have gone into creating a Windows interface for users to manipulate their volumes of data that would take countless hours of manual conversion. If you find this program useful, please consider making a small donation to the programmers to help compensate for this effort. Email Paul to discuss.
Email Paul at
Paul's Home Page
Last Modified: 18 November 2011