Difference between revisions of "Location Table"

From truxwiki.com
Jump to navigation Jump to search
Line 1: Line 1:
This is where Truxton stores geographic coordinates.
+
This table holds geographic coordinates gleaned from loaded media.
  
 +
=SQL=
 
<source lang="SQL">
 
<source lang="SQL">
 
CREATE TABLE "Location"
 
CREATE TABLE "Location"
Line 17: Line 18:
  
 
The <code>Altitude</code> is the number of meters above ground.
 
The <code>Altitude</code> is the number of meters above ground.
 +
 +
=Columns=
 +
==<code>ID</code>==
 +
A globally unique identifier for this record.
 +
 +
==<code>FileID</code>==
 +
The globally unique identifier of the file from whence this information came.
 +
This corresponds to the <code>ID</code> column of the <code><nowiki>[</nowiki>[[File Table|File]]<nowiki>]</nowiki></code> table.
 +
 +
==<code>MediaID</code>==
 +
The identifier of the media from whence this data came.
 +
This corresponds to the <code>ID</code> column of the <code>[Media]</code> table.
 +
 +
==<code>Latitude</code>==
 +
The latitude portion of the WGS84 coordinate.
 +
 +
==<code>Longitude</code>==
 +
The longitude portion of the WGS84 coordinate.
 +
 +
==<code>Altitude</code>==
 +
The altitude portion of the coordinate in meters.
 +
 +
==<code>LocationTypeID</code>==
 +
The type of coordinate. This links to the <code>ID</code> column of the <code>[LocationType]</code> table.
 +
 +
==<code>When</code>==
 +
The date/time associated with this location.
 +
 +
==<code>Label</code>==
 +
The name of the location.

Revision as of 05:29, 27 January 2024

This table holds geographic coordinates gleaned from loaded media.

SQL

CREATE TABLE "Location"
(
  "ID" uuid NOT NULL,
  "FileID" uuid NOT NULL,
  "MediaID" uuid NOT NULL,
  "Latitude" double precision DEFAULT 0 NOT NULL,
  "Longitude" double precision DEFAULT 0 NOT NULL,
  "Altitude" double precision DEFAULT 0 NOT NULL,
  "LocationTypeID" smallint DEFAULT 0 NOT NULL,
  "When" timestamp without time zone NOT NULL,
  "Label" text DEFAULT ''::text NOT NULL
);

The Altitude is the number of meters above ground.

Columns

ID

A globally unique identifier for this record.

FileID

The globally unique identifier of the file from whence this information came. This corresponds to the ID column of the [File] table.

MediaID

The identifier of the media from whence this data came. This corresponds to the ID column of the [Media] table.

Latitude

The latitude portion of the WGS84 coordinate.

Longitude

The longitude portion of the WGS84 coordinate.

Altitude

The altitude portion of the coordinate in meters.

LocationTypeID

The type of coordinate. This links to the ID column of the [LocationType] table.

When

The date/time associated with this location.

Label

The name of the location.