Difference between revisions of "Location Table"

From truxwiki.com
Jump to navigation Jump to search
(Created page with "This is where Truxton stores geographic coordinates. <syntaxhighlight lang="SQL"> CREATE TABLE "Location" ( "ID" uuid NOT NULL, "FileID" uuid NOT NULL, "MediaID"...")
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is where Truxton stores geographic coordinates.
+
This table holds geographic coordinates gleaned from loaded media.
  
<syntaxhighlight lang="SQL">
+
=SQL=
CREATE TABLE "Location" (
+
<source lang="SQL">
    "ID" uuid NOT NULL,
+
CREATE TABLE "Location"
    "FileID" uuid NOT NULL,
+
(
    "MediaID" uuid NOT NULL,
+
  "ID" uuid NOT NULL,
    "Latitude" double precision DEFAULT 0 NOT NULL,
+
  "FileID" uuid NOT NULL,
    "Longitude" double precision DEFAULT 0 NOT NULL,
+
  "MediaID" uuid NOT NULL,
    "Altitude" double precision DEFAULT 0 NOT NULL,
+
  "Latitude" double precision DEFAULT 0 NOT NULL,
    "LocationTypeID" smallint DEFAULT 0 NOT NULL,
+
  "Longitude" double precision DEFAULT 0 NOT NULL,
    "When" timestamp without time zone NOT NULL,
+
  "Altitude" double precision DEFAULT 0 NOT NULL,
    "Label" text DEFAULT ''::text NOT NULL
+
  "LocationTypeID" smallint DEFAULT 0 NOT NULL,
 +
  "When" timestamp without time zone NOT NULL,
 +
  "Label" text DEFAULT ''::text NOT NULL
 
);
 
);
</syntaxhighlight>
+
</source>
 +
 
 +
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><nowiki>[</nowiki>[[Media Table|Media]]<nowiki>]</nowiki></code> table.
 +
 
 +
==<code>Latitude</code>==
 +
The latitude portion of the [https://en.wikipedia.org/wiki/World_Geodetic_System#WGS84 WGS84] coordinate.
 +
 
 +
==<code>Longitude</code>==
 +
The longitude portion of the [https://en.wikipedia.org/wiki/World_Geodetic_System#WGS84 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.
 +
It should contains one of [[Location_Types|these]] values.
 +
 
 +
==<code>When</code>==
 +
The date/time associated with this location.
 +
 
 +
==<code>Label</code>==
 +
The name of the location.

Latest revision as of 07:26, 3 February 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. It should contains one of these values.

When

The date/time associated with this location.

Label

The name of the location.