source: josm/trunk/src/org/openstreetmap/josm/data/gpx/GpxConstants.java@ 12220

Last change on this file since 12220 was 12186, checked in by michael2402, 7 years ago

See #14794: Add javadoc for all gpx classes.

  • Property svn:eol-style set to native
File size: 6.0 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.gpx;
3
4import java.util.Arrays;
5import java.util.Collection;
6import java.util.Collections;
7import java.util.List;
8
9import org.openstreetmap.josm.Main;
10import org.openstreetmap.josm.data.Bounds;
11
12/**
13 * Constants for GPX handling.
14 */
15public interface GpxConstants {
16
17 /** GPS name of the element. This field will be transferred to and from the GPS.
18 * GPX does not place restrictions on the length of this field or the characters contained in it.
19 * It is up to the receiving application to validate the field before sending it to the GPS. */
20 String GPX_NAME = "name";
21
22 /** GPS element comment. Sent to GPS as comment. */
23 String GPX_CMT = "cmt";
24
25 /** Text description of the element. Holds additional information about the element intended for the user, not the GPS. */
26 String GPX_DESC = "desc";
27
28 /** Source of data. Included to give user some idea of reliability and accuracy of data. */
29 String GPX_SRC = "src";
30
31 /**
32 * Prefix used for all meta values.
33 */
34 String META_PREFIX = "meta.";
35 /**
36 * A constant for the metadata hash map: the author name of the file
37 * @see GpxData#get(String)
38 */
39 String META_AUTHOR_NAME = META_PREFIX + "author.name";
40 /**
41 * A constant for the metadata hash map: the author email of the file
42 * @see GpxData#get(String)
43 */
44 String META_AUTHOR_EMAIL = META_PREFIX + "author.email";
45 /**
46 * A constant for the metadata hash map: a link to a page about the author
47 * @see GpxData#get(String)
48 */
49 String META_AUTHOR_LINK = META_PREFIX + "author.link";
50 /**
51 * A constant for the metadata hash map: the author field for the copyright information in the gpx file
52 * @see GpxData#get(String)
53 */
54 String META_COPYRIGHT_AUTHOR = META_PREFIX + "copyright.author";
55 /**
56 * A constant for the metadata hash map: the license of the file
57 * @see GpxData#get(String)
58 */
59 String META_COPYRIGHT_LICENSE = META_PREFIX + "copyright.license";
60 /**
61 * A constant for the metadata hash map: the year of the license for the file
62 * @see GpxData#get(String)
63 */
64 String META_COPYRIGHT_YEAR = META_PREFIX + "copyright.year";
65 /**
66 * A constant for the metadata hash map: a description of the file
67 * @see GpxData#get(String)
68 */
69 String META_DESC = META_PREFIX + "desc";
70 /**
71 * A constant for the metadata hash map: the keywords of the file
72 * @see GpxData#get(String)
73 */
74 String META_KEYWORDS = META_PREFIX + "keywords";
75 /**
76 * A constant for the metadata hash map: the links. They are stored as list of {@link GpxLink} objects
77 * @see GpxData#get(String)
78 */
79 String META_LINKS = META_PREFIX + "links";
80 /**
81 * A constant for the metadata hash map: the name of the file (stored in the file, not the one on the disk)
82 * @see GpxData#get(String)
83 */
84 String META_NAME = META_PREFIX + "name";
85 /**
86 * A constant for the metadata hash map: the time as string
87 * @see GpxData#get(String)
88 */
89 String META_TIME = META_PREFIX + "time";
90 /**
91 * A constant for the metadata hash map: the bounding box. This is a {@link Bounds} object
92 * @see GpxData#getMetaBounds()
93 */
94 String META_BOUNDS = META_PREFIX + "bounds";
95 /**
96 * A constant for the metadata hash map: the extension data. This is a {@link Extensions} object
97 * @see GpxData#addExtension(String, String)
98 * @see GpxData#get(String)
99 */
100 String META_EXTENSIONS = META_PREFIX + "extensions";
101
102 /**
103 * A namespace for josm GPX extensions
104 */
105 String JOSM_EXTENSIONS_NAMESPACE_URI = Main.getXMLBase() + "/gpx-extensions-1.0";
106
107 /** Elevation (in meters) of the point. */
108 String PT_ELE = "ele";
109
110 /** Creation/modification timestamp for the point.
111 * Date and time in are in Univeral Coordinated Time (UTC), not local time!
112 * Conforms to ISO 8601 specification for date/time representation.
113 * Fractional seconds are allowed for millisecond timing in tracklogs. */
114 String PT_TIME = "time";
115
116 /** Magnetic variation (in degrees) at the point. 0.0 <= value < 360.0 */
117 String PT_MAGVAR = "magvar";
118
119 /** Height, in meters, of geoid (mean sea level) above WGS-84 earth ellipsoid. (NMEA GGA message) */
120 String PT_GEOIDHEIGHT = "geoidheight";
121
122 /** Text of GPS symbol name. For interchange with other programs, use the exact spelling of the symbol on the GPS, if known. */
123 String PT_SYM = "sym";
124
125 /** Type (textual classification) of element. */
126 String PT_TYPE = "type";
127
128 /** Type of GPS fix. none means GPS had no fix. Value comes from list: {'none'|'2d'|'3d'|'dgps'|'pps'} */
129 String PT_FIX = "fix";
130
131 /** Number of satellites used to calculate the GPS fix. (not number of satellites in view). */
132 String PT_SAT = "sat";
133
134 /** Horizontal dilution of precision. */
135 String PT_HDOP = "hdop";
136
137 /** Vertical dilution of precision. */
138 String PT_VDOP = "vdop";
139
140 /** Position dilution of precision. */
141 String PT_PDOP = "pdop";
142
143 /** Number of seconds since last DGPS update. */
144 String PT_AGEOFDGPSDATA = "ageofdgpsdata";
145
146 /** Represents a differential GPS station. 0 <= value <= 1023 */
147 String PT_DGPSID = "dgpsid";
148
149 /**
150 * Ordered list of all possible waypoint keys.
151 */
152 List<String> WPT_KEYS = Collections.unmodifiableList(Arrays.asList(PT_ELE, PT_TIME, PT_MAGVAR, PT_GEOIDHEIGHT,
153 GPX_NAME, GPX_CMT, GPX_DESC, GPX_SRC, META_LINKS, PT_SYM, PT_TYPE,
154 PT_FIX, PT_SAT, PT_HDOP, PT_VDOP, PT_PDOP, PT_AGEOFDGPSDATA, PT_DGPSID, META_EXTENSIONS));
155
156 /**
157 * Ordered list of all possible route and track keys.
158 */
159 List<String> RTE_TRK_KEYS = Collections.unmodifiableList(Arrays.asList(
160 GPX_NAME, GPX_CMT, GPX_DESC, GPX_SRC, META_LINKS, "number", PT_TYPE, META_EXTENSIONS));
161
162 /**
163 * Possible fix values.
164 */
165 Collection<String> FIX_VALUES = Collections.unmodifiableList(Arrays.asList("none", "2d", "3d", "dgps", "pps"));
166}
Note: See TracBrowser for help on using the repository browser.