Surface Mapping to KML Overview

I’m programming the next step of the SMS application now. The goal is to go from the database that I made earlier to a KML track. With the exception of generating the KML data, all modules are working at the moment. I will be upgrading the database side from SQLCE 3.5 to 4.0, then combining the the several scattered modules into a smaller program. Currently, the different applications I have made will be repeating tasks if I continue with my current code. The programs and functions are listed below:

SMSDatabse – Original Program, reads in SMS text files, removes entries with invalid data, then stores to a database

SMStoCSV – New Program, reads files from database made by SMSDatabase, scans for valid data at 10 min. intervals, then outputs a CSV or stores in a database

SMStoKML – New Program, uses output of SMStoCSV to generate a KML ship track

Seeing each programs function broken down, it’s obvious that the 1st and 2nd programs are doing duplicate steps and storing unnecessary data. The better solution would be to merge the CSV function from the 2nd program into the 3rd as an option of either KML or CSV. Then merge what remains of the 1st and 2nd together, making a program that reads SMS files directly for 10 min. intervals to store in a database. Additionally, a record of which files have been scanned in needs to be kept. I plan on using a database of only file names or another unique identifier to keep track of what has been done. I will be posting updates as I work through each of these steps.