ezgpx.complex_types package

Submodules

ezgpx.complex_types.bounds module

This module contains the Bounds class.

class ezgpx.complex_types.bounds.Bounds(minlat: Latitude, minlon: Longitude, maxlat: Latitude, maxlon: Longitude, tag: str = 'bounds')[source]

Bases: object

boundsType: Two lat/lon pairs defining the extent of an element.

Args:

minlat (Latitude): Minimum latitude. (in degrees). minlon (Longitude): Minimum longitude (in degrees). maxlat (Latitude): Maximum latitude (in degrees). maxlon (Longitude): Maximum longitude (in degrees). tag (str, optional): XML tag. Defaults to “bounds”.

maxlat: Latitude
maxlon: Longitude
minlat: Latitude
minlon: Longitude
tag: str = 'bounds'

ezgpx.complex_types.copyright module

This module contains the Copyright class.

class ezgpx.complex_types.copyright.Copyright(author: str, year: int = None, license: str = None, tag: str = 'copyright')[source]

Bases: object

copyrightType: Information about the copyright holder and any license governing use of this file. By linking to an appropriate license, you may place your data into the public domain or grant additional usage rights.

Args:

author (str): Copyright holder. year (int, optional): Year of copyright. Defaults to None. license (str, optional): Link to external file containing

license text. Defaults to None.

tag (str, optional): XML tag. Defaults to “copyright”.

author: str
license: str = None
tag: str = 'copyright'
year: int = None

ezgpx.complex_types.email module

This module contains the Email class.

class ezgpx.complex_types.email.Email(id: str, domain: str, tag: str = 'email')[source]

Bases: object

emailType: An email address. Broken into two parts (id and domain) to help prevent email harvesting.

Args:

id (str): identifier (half of email address). domain (str): Domain (half of email address). tag (str, optional): XML tag. Defaults to “email”.

domain: str
id: str
tag: str = 'email'

ezgpx.complex_types.extensions module

This module contains the Extensions class.

class ezgpx.complex_types.extensions.Extensions(values: dict = None, tag: str = 'extensions')[source]

Bases: object

extensionsType: You can add extend GPX by adding your own elements from another schema here.

Args:

values (dict, optional): Extension content. Defaults to None. tag (str, optional): XML tag. Defaults to “extensions”.

tag: str = 'extensions'
values: dict = None

ezgpx.complex_types.gpx module

This module contains the Gpx class.

class ezgpx.complex_types.gpx.Gpx(version: str, creator: str, metadata: Metadata = None, wpt: list[Wpt] = None, rte: list[Rte] = None, trk: list[Trk] = None, extensions: Extensions = None, tag: str = 'gpx')[source]

Bases: object

gpxType: GPX documents contain a metadata header, followed by waypoints, routes, and tracks. You can add your own elements to the extensions section of the GPX document.

Args:

version (str): Version number. Defaults to “1.1”. creator (str): Name or URL of the software that created your

GPX document. This allows others to inform the creator of a GPX instance document that fails to validate. Defaults to “ezGPX”.

metadata (Metadata, optional): Metadata about the file.

Defaults to None.

wpt (list[Wpt], optional): A list of waypoints.

Defaults to None.

rte (list[Rte], optional): A list of routes.

Defaults to None.

trk (list[Trk], optional): A list of tracks.

Defaults to None.

extensions (Extensions, optional): You can add extend GPX by

adding your own elements from another schema here. Defaults to None.

tag (str, optional): XML tag. Defaults to “gpx”.

creator: str
extensions: Extensions = None
metadata: Metadata = None
rte: list[Rte] = None
tag: str = 'gpx'
trk: list[Trk] = None
version: str
wpt: list[Wpt] = None

ezgpx.complex_types.metadata module

This module contains the Metadata class.

class ezgpx.complex_types.metadata.Metadata(name: str = None, desc: str = None, author: Person = None, copyright: Copyright = None, link: list[Link] = None, time: datetime = None, keywords: str = None, bounds: Bounds = None, extensions: Extensions = None, tag: str = 'metadata')[source]

Bases: object

metadataType: Information about the GPX file, author, and copyright restrictions goes in the metadata section. Providing rich, meaningful information about your GPX files allows others to search for and use your GPS data.

Args:

name (str, optional): Name of the GPX file. Defaults to None. desc (str, optional): Description of the contents of the GPX

file. Defaults to None.

author (Person, optional): Person or organization who created

the GPX file. Defaults to None.

copyright (str, optional): Copyright and license information

governing use of the file. Defaults to None.

link (list[Link], optional): URLs associated with the location

described in the file. Defaults to None.

time (datetime, optional): Creation date of the file.

Defaults to None.

keywords (str, optional): Keywords associated with the file.

Search engines or databases can use this information to classify the data. Defaults to None.

bounds (str, optional): Minimum and maximum coordinates which

describe the extent of the coordinates in the file. Defaults to None.

extensions (Extensions, optional): You can add extend GPX by

adding your own elements from another schema here. Defaults to None.

tag (str, optional): XML tag. Defaults to “metadata”.

author: Person = None
bounds: Bounds = None
copyright: Copyright = None
desc: str = None
extensions: Extensions = None
keywords: str = None
name: str = None
tag: str = 'metadata'
time: datetime = None

ezgpx.complex_types.person module

This module contains the Person class.

class ezgpx.complex_types.person.Person(name: str = None, email: Email = None, link: Link = None, tag: str = 'author')[source]

Bases: object

personType: A person or organization.

Args:
name (str, optional): Name of person or organization.

Defaults to None.

email (Email, optional): Email address. Defaults to None. link (Link, optional): Link to Web site or other external

information about person. Defaults to None.

tag (str, optional): XML tag. Defaults to “person”.

email: Email = None
name: str = None
tag: str = 'author'

ezgpx.complex_types.pt module

This module contains the Pt class.

class ezgpx.complex_types.pt.Pt(lat: Latitude, lon: Longitude, ele: float = None, time: datetime = None, tag: str = 'pt')[source]

Bases: object

ptType: Geographic point with optional elevation and time. Available for use by other schemas.

Args:

lat (Latitude): Latitude of the point (in degrees). lon (Longitude): Longitude of the point (in degrees). ele (float, optional): Elevation of the point (in meters).

Defaults to None.

time (datetime, optional): Time that the point was recorded.

Defaults to None.

tag (str, optional): XML tag. Defaults to “pt”.

ele: float = None
lat: Latitude
lon: Longitude
tag: str = 'pt'
time: datetime = None

ezgpx.complex_types.ptseg module

This module contains the Ptseg class.

class ezgpx.complex_types.ptseg.Ptseg(pt: list[Pt] = None, tag: str = 'ptseg')[source]

Bases: object

ptsegType: An ordered sequence of points (e.g.: for polygons or polylines).

Args:
pt (list[Pt], optional): Ordered list of geographic points.

Defaults to None.

tag (str, optional): XML tag. Defaults to “ptseg”.

pt: list[Pt] = None
tag: str = 'ptseg'

ezgpx.complex_types.rte module

This module contains the Rte class.

class ezgpx.complex_types.rte.Rte(name: str = None, cmt: str = None, desc: str = None, src: str = None, link: list[Link] = None, number: int = None, type: str = None, extensions: Extensions = None, rtept: list[Wpt] = None, tag: str = 'rte')[source]

Bases: object

rteType: Route - an ordered list of waypoints representing a series of turn points leading to a destination.

Args:

name (str, optional): GPS name of route. Defaults to None. cmt (str, optional): GPS comment for route. Defaults to None. desc (str, optional): Text description of route for user. Not

sent to GPS. Defaults to None.

src (str, optional): Source of data. Included to give user some

idea of reliability and accuracy of data. Defaults to None.

link (list[Link], optional): Links to external information

about the route. Defaults to None.

number (int, optional): GPS route number. Defaults to None. type (str, optional): Type (classification) of route.

Defaults to None.

extensions (Extensions, optional): You can add extend GPX by

adding your own elements from another schema here. Defaults to None.

rtept (list[Wpt], optional): List of route points.

Defaults to None.

tag (str, optional): XML tag. Defaults to “rte”.

cmt: str = None
desc: str = None
extensions: Extensions = None
name: str = None
number: int = None
rtept: list[Wpt] = None
src: str = None
tag: str = 'rte'
type: str = None

ezgpx.complex_types.trk module

This module contains the Trk class.

class ezgpx.complex_types.trk.Trk(name: str = None, cmt: str = None, desc: str = None, src: str = None, link: list[Link] = None, number: int = None, type: str = None, extensions: Extensions = None, trkseg: list[Trkseg] = None, tag: str = 'trk')[source]

Bases: object

trkType: trk represents a track - an ordered list of points describing a path.

Args:

name (str, optional): GPS name of track. Defaults to None. cmt (str, optional): GPS comment for track. Defaults to None. desc (str, optional): User description of track.

Defaults to None.

src (str, optional): Source of data. Included to give user some

idea of reliability and accuracy of data. Defaults to None.

link (list[Link], optional): Links to external information

about track. Defaults to None.

number (int, optional): GPS track number. Defaults to None. type (str, optional): Type (classification) of track.

Defaults to None.

extensions (Extensions, optional): You can add extend GPX by

adding your own elements from another schema here. Defaults to None.

trkseg (list[Trkseg], optional): A Track Segment holds a list

of Track Points which are logically connected in order. To represent a single GPS track where GPS reception was lost, or the GPS receiver was turned off, start a new Track Segment for each continuous span of track data. Defaults to None.

tag (str, optional): XML tag. Defaults to “trk”.

cmt: str = None
desc: str = None
extensions: Extensions = None
name: str = None
number: int = None
src: str = None
tag: str = 'trk'
trkseg: list[Trkseg] = None
type: str = None

ezgpx.complex_types.trkseg module

This module contains the Trkseg class.

class ezgpx.complex_types.trkseg.Trkseg(trkpt: list[Wpt] = None, extensions: Extensions = None, tag: str = 'trkseg')[source]

Bases: object

trksegType: A Track Segment holds a list of Track Points which are logically connected in order. To represent a single GPS track where GPS reception was lost, or the GPS receiver was turned off, start a new Track Segment for each continuous span of track data.

Args:
trkpt (list[Wpt], optional): A Track Point holds the

coordinates, elevation, timestamp, and metadata for a single point in a track. Defaults to None.

extensions (Extensions, optional): You can add extend GPX by

adding your own elements from another schema here. Defaults to None.

tag (str, optional): XML tag. Defaults to “trkseg”.

extensions: Extensions = None
tag: str = 'trkseg'
trkpt: list[Wpt] = None

ezgpx.complex_types.wpt module

This module contains the Wpt class.

class ezgpx.complex_types.wpt.Wpt(lat: Latitude, lon: Longitude, ele: float = None, time: datetime = None, magvar: Degrees = None, geoidheight: float = None, name: str = None, cmt: str = None, desc: str = None, src: str = None, link: list[Link] = None, sym: str = None, type: str = None, fix: Fix = None, sat: int = None, hdop: float = None, vdop: float = None, pdop: float = None, ageofdgpsdata: float = None, dgpsid: DgpsStation = None, extensions: Extensions = None, tag: str = 'wpt')[source]

Bases: object

wptType: wpt represents a waypoint, point of interest, or named feature on a map.

Args:

lat (Latitude): Latitude of the point (in degrees). lon (Longitude): Longitude of the point (in degrees). ele (float, optional): Elevation of the point (in meters).

Defaults to None.

time (datetime, optional): Creation/modification timestamp for

element. Date and time in are in Univeral Coordinated Time (UTC), not local time! Conforms to ISO 8601 specification for date/time representation. Fractional seconds are allowed for millisecond timing in tracklogs. Defaults to None.

magvar (Degrees, optional): Magnetic variation at the point

(in degrees). Defaults to None.

geoidheight (float, optional): Height (in meters) of

geoid (mean sea level) above WGS84 earth ellipsoid. As defined in NMEA GGA message. Defaults to None.

name (str, optional): The GPS name of the waypoint. This field

will be transferred to and from the GPS. GPX does not place restrictions on the length of this field or the characters contained in it. It is up to the receiving application to validate the field before sending it to the GPS. Defaults to None.

cmt (str, optional): GPS waypoint comment. Sent to GPS as

comment. Defaults to None.

desc (str, optional): A text description of the element.

Holds additional information about the element intended for the user, not the GPS. Defaults to None.

src (str, optional): Source of data. Included to give user some

idea of reliability and accuracy of data. e.g.: “Garmin eTrex”, “USGS quad Boston North”… Defaults to None.

link (list[Link], optional): Link to additional information

about the waypoint. Defaults to None.

sym (str, optional): Text of GPS symbol name. For

interchange with other programs, use the exact spelling of the symbol as displayed on the GPS. If the GPS abbreviates words, spell them out. Defaults to None.

type (str, optional): Type (classification) of the waypoint.

Defaults to None.

fix (Fix, optional): Type of GPX fix. Defaults to None. sat (int, optional): Number of satellites used to calculate

the GPX fix. Defaults to None.

hdop (float, optional): Horizontal dilution of precision.

Defaults to None.

vdop (float, optional): Vertical dilution of precision.

Defaults to None.

pdop (float, optional): Position dilution of precision.

Defaults to None.

ageofdgpsdata (float, optional): Number of seconds since

last DGPS update. Defaults to None.

dgpsid (DgpsStation, optional): ID of DGPS station used in

differential correction. Defaults to None.

extensions (Extensions, optional): You can add extend GPX by

adding your own elements from another schema here. Defaults to None.

tag (str, optional): XML tag. Defaults to “wpt”.

ageofdgpsdata: float = None
cmt: str = None
desc: str = None
dgpsid: DgpsStation = None
ele: float = None
extensions: Extensions = None
fix: Fix = None
geoidheight: float = None
hdop: float = None
lat: Latitude
lon: Longitude
magvar: Degrees = None
name: str = None
pdop: float = None
sat: int = None
src: str = None
sym: str = None
tag: str = 'wpt'
time: datetime = None
type: str = None
vdop: float = None

Module contents