com.c5corp.c5gps
Class TrackPoint

java.lang.Object
  extended by com.c5corp.c5gps.GpsType
      extended by com.c5corp.c5gps.GpsPointRecord
          extended by com.c5corp.c5gps.TrackPoint

public class TrackPoint
extends GpsPointRecord

Like a waypoint, a trackpoint describes a location, but is unnamed and in aggregate (a track log) describes a sample of a detailed path. The distance between points is often a matter of meters, and can be considered as a sample of a continuous path. (Unlike a Route, which is made up of sequential waypoints.) Trackpoints are always part of a tracklog - unlike a way point, they don't exist independently of a containing data type. See the TrackLog class. Note: there is no description attribute. However, the TrackLog class has a description attribute to describe the whole track.

Another important matter to note is that all of the C5UTM GpsDataFileType classes and the data classes they encapsulate are intended for use with a relational database application. There are fields in typical GPS data that are ignored by these classes, and often, floating point type numbers are rounded to intergers.

Since:
2.0
Author:
Brett Stalbaum Copyright 2002-2006 see LICENSE.txt and UCSD_LICENSE.txt
See Also:
TrackLog

Field Summary
 
Fields inherited from class com.c5corp.c5gps.GpsType
hdatum
 
Constructor Summary
protected TrackPoint(java.lang.String type, int zoneNum, int easting, int northing, java.util.Calendar date, int altitude, TrackLog parentTrackLog)
          Constructor for TrackPoint accepting a zone, easting, northing, Calendar object, altitude.
protected TrackPoint(java.lang.String type, int zoneNum, int easting, int northing, int month, int day, int year, int hour, int minute, int second, int altitude, int timeZoneOffset, TrackLog parentTrackLog)
          Constructor for TrackPoint accepting a ZoneNum, Easting, Northing, Month, Day, Year, Hour, Min, Second, Altitude, and a time zone offset.
protected TrackPoint(java.lang.String type, int zoneNum, int easting, int northing, int altitude, TrackLog parentTrackLog)
          Constructor for TrackPoint accepting a trackpoint_id, zone, easting, northing, altitude and tracklog id.
protected TrackPoint(java.lang.String type, int zoneNum, java.lang.String zoneChar, int easting, int northing, java.util.Calendar date, int altitude, TrackLog parentTrackLog)
          Constructor for TrackPoint accepting a zone, zone char (as a String), easting, northing, Calendar object, altitude.
protected TrackPoint(java.lang.String type, int zoneNum, java.lang.String zoneChar, int easting, int northing, int month, int day, int year, int hour, int minute, int second, int altitude, int timeZoneOffset, TrackLog parentTrackLog)
          Constructor for TrackPoint accepting a ZoneNum, Easting, Northing, Month, Day, Year, Hour, Min, Sec, Altitude, and a time zone offset.
protected TrackPoint(java.lang.String type, int zoneNum, java.lang.String zoneChar, int easting, int northing, int altitude, TrackLog parentTrackLog)
          Constructor for TrackPoint accepting a trackpoint_id, zone, zone char (as a String), easting, northing, altitude and tracklog id.
 
Method Summary
 int getAltitude()
          returns the TrackPoint altitude
 java.util.Calendar getDate()
          returns the TrackPoint Date
 java.lang.String getDatum()
          returns the TrackPoint datum
 int getEasting()
          returns the TrackPoint easting
 int getNorthing()
          returns the TrackPoint northing
 java.lang.String getType()
          returns the TrackPoint type, which should be "T" for TrackPoint or "N" for a new TrackPoint (implying that this is the first trackpoint that a GPS device recorded after starting up, or losing satellite reception temporarilly.
 UtmCoordinatePairElev getUtmCoordinatePairElev()
          returns a artificial UtmCoordinatePairElev object representation of the point
 int getZone()
          returns the TrackPoint zone number
 java.lang.String getZoneChar()
          returns the TrackPoint zone char (as a String)
 void setAltitude(int altitude)
          sets the TrackPoint altitude
 void setDate(java.util.Calendar date)
          sets the TrackPoint Date
 void setEasting(int easting)
          sets the TrackPoint easting
 void setNorthing(int northing)
          sets the TrackPoint northing
 void setTimeToGmt()
          Coverts the date/time for this TrackPoint to UTC/GMT time
 void setZoneNum(int zoneNum)
          sets the TrackPoint zone number
 void setZoneNum(java.lang.String zoneChar)
          sets the TrackPoint zone char (as a String)acter
 java.lang.String toString()
          override toString()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TrackPoint

protected TrackPoint(java.lang.String type,
                     int zoneNum,
                     int easting,
                     int northing,
                     int altitude,
                     TrackLog parentTrackLog)
Constructor for TrackPoint accepting a trackpoint_id, zone, easting, northing, altitude and tracklog id. This constructor creates a TrackPoint with an interal date/time set to the Epoch date - January 1, 1970 00:00:00.000 GMT All TrackPoints constructors require a reference to the parent TrackLog.

Parameters:
type - the type "T" or "N"
zoneNum - the UTM zone
easting - the UTM easting
northing - the UTM northing
altitude - the altitude
parentTrackLog - the TrackLog containing this
See Also:
getDate(), GpsPointRecord

TrackPoint

protected TrackPoint(java.lang.String type,
                     int zoneNum,
                     java.lang.String zoneChar,
                     int easting,
                     int northing,
                     int altitude,
                     TrackLog parentTrackLog)
Constructor for TrackPoint accepting a trackpoint_id, zone, zone char (as a String), easting, northing, altitude and tracklog id. This constructor creates a TrackPoint with an interal date/time set to the Epoch date - January 1, 1970 00:00:00.000 GMT All TrackPoints constructors require a reference to the parent TrackLog.

Parameters:
type - the type "T" or "N"
zoneNum - the UTM zone
zoneChar - the UTM grid zone designation character (GZD)
easting - the UTM easting
northing - the UTM northing
altitude - the altitude
parentTrackLog - the TrackLog containing this
See Also:
getDate()

TrackPoint

protected TrackPoint(java.lang.String type,
                     int zoneNum,
                     int easting,
                     int northing,
                     java.util.Calendar date,
                     int altitude,
                     TrackLog parentTrackLog)
Constructor for TrackPoint accepting a zone, easting, northing, Calendar object, altitude. This constructor will typically be used when reconstructing a track_point from the C5 Landscape database. (C5UTM) This constructor will most often be used by this the DbTrackPoint java class, which will get an (already) time zone adjusted object from the database. It can be used to consitute a TrackPoint with any arbitrary Caledar object (date/time). The setTimeToGMT() method can convert the interal Calendar object to a GMT representation. All TrackPoints constructors require a reference to the parent TrackLog.

Parameters:
type - the type "T" or "N"
zoneNum - the UTM zone
easting - the UTM easting
northing - the UTM northing
date - a Calendar object representing the date/time
altitude - the altitude
parentTrackLog - the TrackLog containing this
See Also:
setTimeToGmt()

TrackPoint

protected TrackPoint(java.lang.String type,
                     int zoneNum,
                     java.lang.String zoneChar,
                     int easting,
                     int northing,
                     java.util.Calendar date,
                     int altitude,
                     TrackLog parentTrackLog)
Constructor for TrackPoint accepting a zone, zone char (as a String), easting, northing, Calendar object, altitude. It can be used to consitute a TrackPoint with any arbitrary Caledar object (date/time). The setTimeToGMT() method can convert the interal Calendar object to a GMT representation. All TrackPoints constructors require a reference to the parent TrackLog.

Parameters:
type - the type "T" or "N"
zoneNum - the UTM zone
zoneChar - the UTM grid zone designation character (GZD)
easting - the UTM easting
northing - the UTM northing
date - a Calendar object representing the date/time
altitude - the altitude
parentTrackLog - the TrackLog containing this
See Also:
setTimeToGmt()

TrackPoint

protected TrackPoint(java.lang.String type,
                     int zoneNum,
                     int easting,
                     int northing,
                     int month,
                     int day,
                     int year,
                     int hour,
                     int minute,
                     int second,
                     int altitude,
                     int timeZoneOffset,
                     TrackLog parentTrackLog)
Constructor for TrackPoint accepting a ZoneNum, Easting, Northing, Month, Day, Year, Hour, Min, Second, Altitude, and a time zone offset. This constructor is typically used when parsing track log data from a file. The parsing code for this this task is implemented in the TrackLog class. All TrackPoints constructors require a reference to the parent TrackLog.

Parameters:
type - the type "T" or "N"
zoneNum - the UTM zone
easting - the UTM easing
northing - the UTM northing
month - the month
day - the day
year - the year
hour - the hour
minute - the minute
second - the second
altitude - the altitude
timeZoneOffset - an offset from GMT
parentTrackLog - the TrackLog containing this
See Also:
ZoneNum,Easting,Northing,Month#,Day#,Year,Hour,Min,Sec,Altitude

TrackPoint

protected TrackPoint(java.lang.String type,
                     int zoneNum,
                     java.lang.String zoneChar,
                     int easting,
                     int northing,
                     int month,
                     int day,
                     int year,
                     int hour,
                     int minute,
                     int second,
                     int altitude,
                     int timeZoneOffset,
                     TrackLog parentTrackLog)
Constructor for TrackPoint accepting a ZoneNum, Easting, Northing, Month, Day, Year, Hour, Min, Sec, Altitude, and a time zone offset. This constructor is typically used when parsing track log data from a file. The parsing code for this this task is implemented in the TrackLog class. All TrackPoints constructors require a reference to the parent TrackLog.

Parameters:
type - the type "T" or "N"
zoneNum - the UTM zone
zoneChar - the UTM grid zone designation
easting - the UTM easing
northing - the UTM northing
month - the month
day - the day
year - the year
hour - the hour
minute - the minute
second - the second
altitude - the altitude
timeZoneOffset - an offset from GMT
parentTrackLog - the TrackLog containing this
See Also:
ZoneNum,ZoneChar,Easting,Northing,Month#,Day#,Year,Hour,Min,Sec,Altitude
Method Detail

getType

public java.lang.String getType()
returns the TrackPoint type, which should be "T" for TrackPoint or "N" for a new TrackPoint (implying that this is the first trackpoint that a GPS device recorded after starting up, or losing satellite reception temporarilly.

Specified by:
getType in class GpsPointRecord
Returns:
the TrackPoint type

getDatum

public java.lang.String getDatum()
returns the TrackPoint datum

Specified by:
getDatum in class GpsPointRecord
Returns:
the UTM zone

getZone

public int getZone()
returns the TrackPoint zone number

Specified by:
getZone in class GpsPointRecord
Returns:
the UTM zone

getZoneChar

public java.lang.String getZoneChar()
returns the TrackPoint zone char (as a String)

Returns:
the grid zone desgination

getEasting

public int getEasting()
returns the TrackPoint easting

Specified by:
getEasting in class GpsPointRecord
Returns:
the UTM easting

getNorthing

public int getNorthing()
returns the TrackPoint northing

Specified by:
getNorthing in class GpsPointRecord
Returns:
the UTM northing

getDate

public java.util.Calendar getDate()
returns the TrackPoint Date

Returns:
a Calendar representing the date/time
See Also:
Date

getAltitude

public int getAltitude()
returns the TrackPoint altitude

Returns:
the altitude

getUtmCoordinatePairElev

public UtmCoordinatePairElev getUtmCoordinatePairElev()
returns a artificial UtmCoordinatePairElev object representation of the point

Returns:
a UtmCoordinatePairElev object

setZoneNum

public void setZoneNum(int zoneNum)
sets the TrackPoint zone number

Parameters:
zoneNum - the UTM zone

setZoneNum

public void setZoneNum(java.lang.String zoneChar)
sets the TrackPoint zone char (as a String)acter

Parameters:
zoneChar - the UTM grid zone designation

setEasting

public void setEasting(int easting)
sets the TrackPoint easting

Parameters:
easting - the UTM easting

setNorthing

public void setNorthing(int northing)
sets the TrackPoint northing

Parameters:
northing - the UTM northing

setDate

public void setDate(java.util.Calendar date)
sets the TrackPoint Date

Parameters:
date - a Calendar representing the date/time
See Also:
Date

setAltitude

public void setAltitude(int altitude)
sets the TrackPoint altitude

Parameters:
altitude - the altitude

setTimeToGmt

public void setTimeToGmt()
Coverts the date/time for this TrackPoint to UTC/GMT time


toString

public java.lang.String toString()
override toString()

Overrides:
toString in class java.lang.Object