source: extensions/AMetaData/JpegMetaData/TagDefinitions/GpsTags.class.php @ 5222

Last change on this file since 5222 was 5222, checked in by grum, 14 years ago

JpegMetaData class is updated

  • english Tag.po file is (almost) ready to be translated in other lang
  • fixes some bugs on readers & tag definitions
  • Property svn:executable set to *
File size: 11.9 KB
Line 
1<?php
2/*
3 * --:: JPEG MetaDatas ::-------------------------------------------------------
4 *
5 *  Author    : Grum
6 *   email    : grum at piwigo.org
7 *   website  : http://photos.grum.fr
8 *
9 *   << May the Little SpaceFrog be with you ! >>
10 *
11 *
12 * +-----------------------------------------------------------------------+
13 * | JpegMetaData - a PHP based Jpeg Metadata manager                      |
14 * +-----------------------------------------------------------------------+
15 * | Copyright(C) 2010  Grum - http://www.grum.fr                          |
16 * +-----------------------------------------------------------------------+
17 * | This program is free software; you can redistribute it and/or modify  |
18 * | it under the terms of the GNU General Public License as published by  |
19 * | the Free Software Foundation                                          |
20 * |                                                                       |
21 * | This program is distributed in the hope that it will be useful, but   |
22 * | WITHOUT ANY WARRANTY; without even the implied warranty of            |
23 * | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
24 * | General Public License for more details.                              |
25 * |                                                                       |
26 * | You should have received a copy of the GNU General Public License     |
27 * | along with this program; if not, write to the Free Software           |
28 * | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
29 * | USA.                                                                  |
30 * +-----------------------------------------------------------------------+
31 *
32 *
33 * -----------------------------------------------------------------------------
34 *
35 * The GpsTags is the definition of the Gps Exif tags
36 *
37 * -----------------------------------------------------------------------------
38 *
39 * .. Notes ..
40 *
41 * The GpsTags class is derived from the KnownTags class.
42 *
43 * ======> See KnownTags.class.php to know more about the tag definitions <=====
44 *
45 */
46
47  require_once(JPEG_METADATA_DIR."TagDefinitions/KnownTags.class.php");
48
49  /**
50   * Define the tags for GPS
51   */
52  class GpsTags extends KnownTags
53  {
54    protected $label = "Exif GPS tags";
55    protected $tags = Array(
56      /*
57       * tags with defined values
58       */
59
60      // GPSVersionID, tag 0x0000
61      0x0000 => Array(
62        'tagName'     => "GPSVersionID",
63        'schema'      => "GPS",
64        'translatable'=> false,
65        'combiTag'    => 0,
66        'implemented' => true
67      ), // < GPSVersionID
68
69      // GPSLatitudeRef, tag 0x0001
70      0x0001 => Array(
71        'tagName'     => "GPSLatitudeRef",
72        'schema'      => "GPS",
73        'translatable'=> true,
74        'combiTag'    => 0,
75        'implemented' => true,
76        'tagValues.special'   => Array(
77          'N' => "North",
78          'S' => "South",
79        ),
80      ), // < GPSLatitudeRef
81
82      // GPSLatitude, tag 0x0002
83      0x0002 => Array(
84        'tagName'     => "GPSLatitude",
85        'schema'      => "GPS",
86        'translatable'=> false,
87        'combiTag'    => 0,
88        'implemented' => true
89      ), // < GPSLatitude
90
91      // GPSLongitudeRef, tag 0x0003
92      0x0003 => Array(
93        'tagName'     => "GPSLongitudeRef",
94        'schema'      => "GPS",
95        'translatable'=> true,
96        'combiTag'    => 0,
97        'implemented' => true,
98        'tagValues.special'   => Array(
99          'E' => "East",
100          'W' => "West",
101        ),
102      ), // < GPSLongitudeRef
103
104      // GPSLongitude, tag 0x0004
105      0x0004 => Array(
106        'tagName'     => "GPSLongitude",
107        'schema'      => "GPS",
108        'translatable'=> false,
109        'combiTag'    => 0,
110        'implemented' => true
111      ), // < GPSLongitude
112
113      // GPSAltitudeRef, tag 0x0005
114      0x0005 => Array(
115        'tagName'     => "GPSAltitudeRef",
116        'schema'      => "GPS",
117        'translatable'=> true,
118        'combiTag'    => 0,
119        'implemented' => true,
120        'tagValues'   => Array(
121          0x00 => "over the sea",
122          0x01 => "under the sea"
123        )
124      ), // < GPSAltitudeRef
125
126      // GPSAltitude, tag 0x0006
127      0x0006 => Array(
128        'tagName'     => "GPSAltitude",
129        'schema'      => "GPS",
130        'translatable'=> false,
131        'combiTag'    => 0,
132        'implemented' => true
133      ), // < GPSAltitude
134
135      // GPSTimeStamp, tag 0x0007
136      0x0007 => Array(
137        'tagName'     => "GPSTimeStamp",
138        'schema'      => "GPS",
139        'translatable'=> false,
140        'combiTag'    => 0,
141        'implemented' => false
142      ), // < GPSTimeStamp
143
144      // GPSSatellites, tag 0x0008
145      0x0008 => Array(
146        'tagName'     => "GPSSatellites",
147        'schema'      => "GPS",
148        'translatable'=> false,
149        'combiTag'    => 0,
150        'implemented' => true
151      ), // < GPSSatellites
152
153      // GPSStatus, tag 0x0009
154      0x0009 => Array(
155        'tagName'     => "GPSStatus",
156        'schema'      => "GPS",
157        'translatable'=> true,
158        'combiTag'    => 0,
159        'implemented' => true,
160        'tagValues.special' => Array(
161          'A' => "measurement in progress",
162          'V' => "measurement interoperability",
163          'unknown' => "Unknown",
164        )
165      ), // < GPSStatus
166
167      // GPSMeasureMode, tag 0x000a
168      0x000A => Array(
169        'tagName'     => "GPSMeasureMode",
170        'schema'      => "GPS",
171        'translatable'=> true,
172        'combiTag'    => 0,
173        'implemented' => true,
174        'tagValues.special' => Array(
175          '2' => "2-dimensional measurement",
176          '3' => "3-dimensional measurement",
177          'unknown' => "Unknown",
178        )
179      ), // < GPSMeasureMode
180
181      // GPSDOP, tag 0x000b
182      0x000B => Array(
183        'tagName'     => "GPSDOP",
184        'schema'      => "GPS",
185        'translatable'=> false,
186        'combiTag'    => 0,
187        'implemented' => false
188      ), // < GPSDOP
189
190      // GPSSpeedRef, tag 0x000c
191      0x000C => Array(
192        'tagName'     => "GPSSpeedRef",
193        'schema'      => "GPS",
194        'translatable'=> true,
195        'combiTag'    => 0,
196        'implemented' => true,
197        'tagValues.special' => Array(
198          'K' => "kilometers per hour",
199          'M' => "miles per hour",
200          'N' => "knots",
201          'unknown' => "Unknown",
202        )
203      ), // < GPSSpeedRef
204
205      // GPSSpeed, tag 0x000d
206      0x000D => Array(
207        'tagName'     => "GPSSpeed",
208        'schema'      => "GPS",
209        'translatable'=> false,
210        'combiTag'    => 0,
211        'implemented' => true
212      ), // < GPSSpeed
213
214      // GPSTrackRef, tag 0x000e
215      0x000E => Array(
216        'tagName'     => "GPSTrackRef",
217        'schema'      => "GPS",
218        'translatable'=> true,
219        'combiTag'    => 0,
220        'implemented' => true,
221        'tagValues.special' => Array(
222          'T' => "true direction",
223          'M' => "magnetic direction",
224          'unknown' => "Unknown",
225        )
226      ), // < GPSTrackRef
227
228      // GPSTrack, tag 0x000f
229      0x000F => Array(
230        'tagName'     => "GPSTrack",
231        'schema'      => "GPS",
232        'translatable'=> false,
233        'combiTag'    => 0,
234        'implemented' => true
235      ), // < GPSTrack
236
237      // GPSImgDirectionRef, tag 0x0010
238      0x0010 => Array(
239        'tagName'     => "GPSImgDirectionRef",
240        'schema'      => "GPS",
241        'translatable'=> true,
242        'combiTag'    => 0,
243        'implemented' => true,
244        'tagValues.special' => Array(
245          'T' => "true direction",
246          'M' => "magnetic direction",
247          'unknown' => "Unknown",
248        )
249      ), // < GPSImgDirectionRef
250
251      // GPSImgDirection, tag 0x0011
252      0x0011 => Array(
253        'tagName'     => "GPSImgDirection",
254        'schema'      => "GPS",
255        'translatable'=> false,
256        'combiTag'    => 0,
257        'implemented' => true
258      ), // < GPSImgDirection
259
260      // GPSMapDatum, tag 0x0012
261      0x0012 => Array(
262        'tagName'     => "GPSMapDatum",
263        'schema'      => "GPS",
264        'translatable'=> false,
265        'combiTag'    => 0,
266        'implemented' => true
267      ), // < GPSMapDatum
268
269      // GPSDestLatitudeRef, tag 0x0013
270      0x0013 => Array(
271        'tagName'     => "GPSDestLatitudeRef",
272        'schema'      => "GPS",
273        'translatable'=> true,
274        'combiTag'    => 0,
275        'implemented' => true,
276        'tagValues.special'   => Array(
277          'N' => "North",
278          'S' => "South",
279        ),
280      ), // < GPSDestLatitudeRef
281
282      // GPSDestLatitude, tag 0x0014
283      0x0014 => Array(
284        'tagName'     => "GPSDestLatitude",
285        'schema'      => "GPS",
286        'translatable'=> false,
287        'combiTag'    => 0,
288        'implemented' => true
289      ), // < GPSDestLatitude
290
291      // GPSDestLongitudeRef, tag 0x0015
292      0x0015 => Array(
293        'tagName'     => "GPSDestLongitudeRef",
294        'schema'      => "GPS",
295        'translatable'=> true,
296        'combiTag'    => 0,
297        'implemented' => true,
298        'tagValues.special'   => Array(
299          'E' => "East",
300          'W' => "West",
301        ),
302      ), // < GPSDestLongitudeRef
303
304      // GPSDestLongitude, tag 0x0016
305      0x0016 => Array(
306        'tagName'     => "GPSDestLongitude",
307        'schema'      => "GPS",
308        'translatable'=> false,
309        'combiTag'    => 0,
310        'implemented' => true
311      ), // < GPSDestLongitude
312
313      // GPSDestBearingRef, tag 0x0017
314      0x0017 => Array(
315        'tagName'     => "GPSDestBearingRef",
316        'schema'      => "GPS",
317        'translatable'=> true,
318        'combiTag'    => 0,
319        'implemented' => true,
320        'tagValues.special' => Array(
321          'T' => "true direction",
322          'M' => "magnetic direction",
323          'unknown' => "Unknown",
324        )
325      ), // < GPSDestBearingRef
326
327      // GPSDestBearing, tag 0x0018
328      0x0018 => Array(
329        'tagName'     => "GPSDestBearing",
330        'schema'      => "GPS",
331        'translatable'=> false,
332        'combiTag'    => 0,
333        'implemented' => true
334      ), // < GPSDestBearing
335
336      // GPSDestDistanceRef, tag 0x0019
337      0x0019=> Array(
338        'tagName'     => "GPSDestDistanceRef",
339        'schema'      => "GPS",
340        'translatable'=> true,
341        'combiTag'    => 0,
342        'implemented' => true,
343        'tagValues.special' => Array(
344          'K' => "kilometers per hour",
345          'M' => "miles per hour",
346          'N' => "knots",
347          'unknown' => "Unknown",
348        )
349      ), // < GPSDestDistanceRef
350
351      // GPSDestDistance, tag 0x001A
352      0x001A=> Array(
353        'tagName'     => "GPSDestDistance",
354        'schema'      => "GPS",
355        'translatable'=> false,
356        'combiTag'    => 0,
357        'implemented' => true
358      ), // < GPSDestDistance
359
360
361      // GPSProcessingMethod, tag 0x001B
362      0x001B=> Array(
363        'tagName'     => "GPSProcessingMethod",
364        'schema'      => "GPS",
365        'translatable'=> false,
366        'combiTag'    => 0,
367        'implemented' => true
368      ), // < GPSProcessingMethod
369
370      // GPSAreaInformation, tag 0x001C
371      0x001C=> Array(
372        'tagName'     => "GPSAreaInformation",
373        'schema'      => "GPS",
374        'translatable'=> false,
375        'combiTag'    => 0,
376        'implemented' => true
377      ), // < GPSAreaInformation
378
379      // GPSDateStamp, tag 0x001D
380      0x001D=> Array(
381        'tagName'     => "GPSDateStamp",
382        'schema'      => "GPS",
383        'translatable'=> false,
384        'combiTag'    => 0,
385        'implemented' => true
386      ), // < GPSDateStamp
387
388
389      // GPSDifferential, tag 0x001E
390      0x001E=> Array(
391        'tagName'     => "GPSDifferential",
392        'schema'      => "GPS",
393        'translatable'=> true,
394        'combiTag'    => 0,
395        'implemented' => true,
396        'tagValues'   => Array(
397          0x00 => "measurement without differential correction",
398          0x01 => "differential correction applied"
399        )
400      ), // < GPSDifferential
401
402
403
404    );
405
406
407    function __destruct()
408    {
409      parent::__destruct();
410    }
411
412  }
413
414
415?>
Note: See TracBrowser for help on using the repository browser.