[Loadstone] file formats

Shawn Kirkpatrick shawn at loadstone-gps.com
Wed Nov 11 01:39:34 GMT 2009

There's really no need to repost loadstone's own documentation. The file 
file_formats comes with the loadstone source code and I think there's a link 
to it on the documentation page. Anyone writing loadstone tools should 
really read this file and know exactly what format the files they want to 
work with are in.

On Tue, 10 Nov 2009, Josh wrote:

> Hi,
> I found a .txt file explaining how the files in loadstone like databases .txt databases and checkpointshave to be formatted. I'll paste it here because its not too long.
> Text databases
> Location: importexport directory
> These files are textual representations of Loadstone databases used for
> exchanging data with the point share exchange or editing on a pc. These files
> will contain one or more database tables in the form:
> table,tablename
> column-name1,column-name2,...
> column-data1,column-data2,...
> (blank line)
> Where tablename is the name of a database table, column-name is the name of a
> column from that table, and column-data is the data from the column. The order
> of columns in a table does not matter as long as the column data is appropriate
> for the column name. When exporting the order of columns is determined by the
> database engine and may change so it should not be counted on. Each table
> should end with a blank line. If the data is of type char then it must be
> enclosed in quotes and not excede the maximum column length.
> Database tables:
> table point
> id unsigned integer (unique point id)
> name char(75) (point name)
> latitude integer (point latitude)
> longitude integer (point longitude)
> accuracy unsigned tinyint (point accuracy)
> satellites unsigned tinyint (number of satellites at the time of entry)
> priority tinyint (bit field used for point flags)
> userid unsigned smallint (id of user entering the point)
> The point table is the most important and most often used table. It contains
> all the information for a point in Loadstone. The id field is a unique id for
> this point and userid. When a point is entered on the phone the id is created
> using a unix timestamp of the current time. If creating points manually you
> must insure that the point id will be unique to the userid being used and
> won't clash with future ids. Starting from 1 (the id can't be 0) should insure
> the id won't collide with future ids. The id is the one field of a point that
> does not get changed once the point is created.
> The latitude and longitude fields are integers representing standard wgs84
> latitude/longitude values with 7 decimal places but with the . character
> removed. To convert back to a real number devide the value by 10000000.0. To
> convert a real number to an integer the number should be padded to 7 decimal
> places and then the . removed. The value may also be multiplied by 10000000
> but this may result in mathematical errors.
> The accuracy field is multiplied by the user range error setting to determine
> the point's accuracy in metres. If the accuracy of a point isn't known then
> this should be set to 1. If accuracy is 0 then the value 50 will be used.
> The satellites field is mainly for informational purposes and should between 0
> and 12.
> The priority field contains bit flags that control aspects of the point. The
> bits have the following meanings:
> bit 0 (1) mark point as private
> bit 1 (2) mark point as restricted
> bit 2 (4) mark point as deleted
> Other bits should be set to 0.
> The userid field is the unique id of the user entering the point. This is a
> crc16 of the username entered in the username setting. The value 0 is reserved
> for use by the point share exchange. The value for the current username can be
> found in the about screen.
> Checkpoint files
> Location: checkpoints directory
> These files store lists of checkpoints saved with the save checkpoints option.
> When Loadstone starts it will load the checkpoints file named "default" if it
> exists. These files consist of one or more lines of the form:
> latitude,longitude,"name",accuracy,satellites,priority,userid,id,"comment"
> The descriptions for these fields are the same as for text databases. The
> format is almost the same as the format for a text database except there's no
> column header and the order of the fields is fixed. The latitude/longitude
> fields can be either integers or real numbers with real numbers being
> prefered. The comment field is a quoted string with a maximum length of 75
> characters.
> Josh
> My email address is: jkenn337 at gmail.com . www.satogo.com Get klango at www.klango.net it's free! Get NVDA www.nvda-project.org it's free! Grab Ubuntu at www.ubuntu.com it's free! and www.twitter.com/jkenn337 follow-me-on-twitter.

More information about the Loadstone mailing list