001/*
002 * $RCSfile: EXIFGPSTagSet.java,v $
003 *
004 * 
005 * Copyright (c) 2005 Sun Microsystems, Inc. All  Rights Reserved.
006 * 
007 * Redistribution and use in source and binary forms, with or without
008 * modification, are permitted provided that the following conditions
009 * are met: 
010 * 
011 * - Redistribution of source code must retain the above copyright 
012 *   notice, this  list of conditions and the following disclaimer.
013 * 
014 * - Redistribution in binary form must reproduce the above copyright
015 *   notice, this list of conditions and the following disclaimer in 
016 *   the documentation and/or other materials provided with the
017 *   distribution.
018 * 
019 * Neither the name of Sun Microsystems, Inc. or the names of 
020 * contributors may be used to endorse or promote products derived 
021 * from this software without specific prior written permission.
022 * 
023 * This software is provided "AS IS," without a warranty of any 
024 * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND 
025 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, 
026 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
027 * EXCLUDED. SUN MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL 
028 * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF 
029 * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
030 * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR 
031 * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
032 * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND
033 * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR
034 * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
035 * POSSIBILITY OF SUCH DAMAGES. 
036 * 
037 * You acknowledge that this software is not designed or intended for 
038 * use in the design, construction, operation or maintenance of any 
039 * nuclear facility. 
040 *
041 * $Revision: 1.1 $
042 * $Date: 2005/10/28 16:56:45 $
043 * $State: Exp $
044 */
045
046package com.github.jaiimageio.plugins.tiff;
047
048import java.util.ArrayList;
049import java.util.List;
050
051/**
052 * A class representing the tags found in an EXIF GPS Info IFD.
053 *
054 * <p> The definitions of the data types referenced by the field
055 * definitions may be found in the {@link TIFFTag
056 * <code>TIFFTag</code>} class.
057 *
058 * @see EXIFTIFFTagSet
059 */
060public class EXIFGPSTagSet extends TIFFTagSet {
061    private static EXIFGPSTagSet theInstance = null;
062
063    /**
064     * A tag indicating the GPS tag version (type BYTE, count = 4).
065     *
066     * @see #GPS_VERSION_2_2
067     */
068    public static final int TAG_GPS_VERSION_ID = 0;
069
070    /**
071     * An array of bytes containing the values <code>{'2', '2', '0',
072     * '0'}</code> to be used with the "GPSVersionID" tag to indicate
073     * GPS version 2.2.
074     *
075     * @see #TAG_GPS_VERSION_ID
076     */
077    public static byte[] GPS_VERSION_2_2 = { '2', '2', '0', '0' };
078
079    /**
080     * A tag indicating the North or South latitude (type ASCII, count = 2).
081     *
082     * @see #LATITUDE_REF_NORTH
083     * @see #LATITUDE_REF_SOUTH
084     */
085    public static final int TAG_GPS_LATITUDE_REF = 1;
086
087    /**
088     * A tag indicating the Latitude (type RATIONAL, count = 3).
089     */
090    public static final int TAG_GPS_LATITUDE = 2;
091
092    /**
093     * A tag indicating the East or West Longitude (type ASCII, count = 2).
094     *
095     * @see #LONGITUDE_REF_EAST
096     * @see #LONGITUDE_REF_WEST
097     */
098    public static final int TAG_GPS_LONGITUDE_REF = 3;
099
100    /**
101     * A tag indicating the Longitude (type RATIONAL, count = 3).
102     */
103    public static final int TAG_GPS_LONGITUDE = 4;
104
105    /**
106     * A tag indicating the Altitude reference (type BYTE, count = 1);
107     *
108     * @see #ALTITUDE_REF_SEA_LEVEL
109     * @see #ALTITUDE_REF_SEA_LEVEL_REFERENCE
110     */
111    public static final int TAG_GPS_ALTITUDE_REF = 5;
112
113    /**
114     * A tag indicating the Altitude (type RATIONAL, count = 1).
115     */
116    public static final int TAG_GPS_ALTITUDE = 6;
117
118    /**
119     * A tag indicating the GPS time (atomic clock) (type RATIONAL, count = 3).
120     */
121    public static final int TAG_GPS_TIME_STAMP = 7;
122
123    /**
124     * A tag indicating the GPS satellites used for measurement (type ASCII).
125     */
126    public static final int TAG_GPS_SATELLITES = 8;
127
128    /**
129     * A tag indicating the GPS receiver status (type ASCII, count = 2).
130     *
131     * @see #STATUS_MEASUREMENT_IN_PROGRESS
132     * @see #STATUS_MEASUREMENT_INTEROPERABILITY
133     */
134    public static final int TAG_GPS_STATUS = 9;
135
136    /**
137     * A tag indicating the GPS measurement mode (type ASCII, count = 2).
138     *
139     * @see #MEASURE_MODE_2D
140     * @see #MEASURE_MODE_3D
141     */
142    public static final int TAG_GPS_MEASURE_MODE = 10;
143
144    /**
145     * A tag indicating the Measurement precision (type RATIONAL, count = 1).
146     */
147    public static final int TAG_GPS_DOP = 11;
148
149    /**
150     * A tag indicating the Speed unit (type ASCII, count = 2).
151     *
152     * @see #SPEED_REF_KILOMETERS_PER_HOUR
153     * @see #SPEED_REF_MILES_PER_HOUR
154     * @see #SPEED_REF_KNOTS
155     */
156    public static final int TAG_GPS_SPEED_REF = 12;
157
158    /**
159     * A tag indicating the Speed of GPS receiver (type RATIONAL, count = 1).
160     */
161    public static final int TAG_GPS_SPEED = 13;
162
163    /**
164     * A tag indicating the Reference for direction of movement (type ASCII,
165     * count = 2).
166     *
167     * @see #DIRECTION_REF_TRUE
168     * @see #DIRECTION_REF_MAGNETIC
169     */
170    public static final int TAG_GPS_TRACK_REF = 14;
171
172    /**
173     * A tag indicating the Direction of movement (type RATIONAL, count = 1).
174     */
175    public static final int TAG_GPS_TRACK = 15;
176
177    /**
178     * A tag indicating the Reference for direction of image (type ASCII,
179     * count = 2).
180     *
181     * @see #DIRECTION_REF_TRUE
182     * @see #DIRECTION_REF_MAGNETIC
183     */
184    public static final int TAG_GPS_IMG_DIRECTION_REF = 16;
185
186    /**
187     * A tag indicating the Direction of image (type RATIONAL, count = 1).
188     */
189    public static final int TAG_GPS_IMG_DIRECTION = 17;
190
191    /**
192     * A tag indicating the Geodetic survey data used (type ASCII).
193     */
194    public static final int TAG_GPS_MAP_DATUM = 18;
195
196    /**
197     * A tag indicating the Reference for latitude of destination (type
198     * ASCII, count = 2).
199     *
200     * @see #LATITUDE_REF_NORTH
201     * @see #LATITUDE_REF_SOUTH
202     */
203    public static final int TAG_GPS_DEST_LATITUDE_REF = 19;
204
205    /**
206     * A tag indicating the Latitude of destination (type RATIONAL, count = 3).
207     */
208    public static final int TAG_GPS_DEST_LATITUDE = 20;
209
210    /**
211     * A tag indicating the Reference for longitude of destination (type
212     * ASCII, count = 2).
213     *
214     * @see #LONGITUDE_REF_EAST
215     * @see #LONGITUDE_REF_WEST
216     */
217    public static final int TAG_GPS_DEST_LONGITUDE_REF = 21;
218
219    /**
220     * A tag indicating the Longitude of destination (type RATIONAL,
221     * count = 3).
222     */
223    public static final int TAG_GPS_DEST_LONGITUDE = 22;
224
225    /**
226     * A tag indicating the Reference for bearing of destination (type ASCII,
227     * count = 2).
228     *
229     * @see #DIRECTION_REF_TRUE
230     * @see #DIRECTION_REF_MAGNETIC
231     */
232    public static final int TAG_GPS_DEST_BEARING_REF = 23;
233
234    /**
235     * A tag indicating the Bearing of destination (type RATIONAL, count = 1).
236     */
237    public static final int TAG_GPS_DEST_BEARING = 24;
238
239    /**
240     * A tag indicating the Reference for distance to destination (type ASCII,
241     * count = 2).
242     *
243     * @see #DEST_DISTANCE_REF_KILOMETERS
244     * @see #DEST_DISTANCE_REF_MILES
245     * @see #DEST_DISTANCE_REF_KNOTS
246     */
247    public static final int TAG_GPS_DEST_DISTANCE_REF = 25;
248
249    /**
250     * A tag indicating the Distance to destination (type RATIONAL, count = 1).
251     */
252    public static final int TAG_GPS_DEST_DISTANCE = 26;
253
254    /**
255     * A tag indicating the Name of GPS processing method (type UNDEFINED).
256     */
257    public static final int TAG_GPS_PROCESSING_METHOD = 27;
258
259    /**
260     * A tag indicating the Name of GPS area (type UNDEFINED).
261     */
262    public static final int TAG_GPS_AREA_INFORMATION = 28;
263
264    /**
265     * A tag indicating the GPS date (type ASCII, count 11).
266     */
267    public static final int TAG_GPS_DATE_STAMP = 29;
268
269    /**
270     * A tag indicating the GPS differential correction (type SHORT,
271     * count = 1).
272     *
273     * @see #DIFFERENTIAL_CORRECTION_NONE
274     * @see #DIFFERENTIAL_CORRECTION_APPLIED
275     */
276    public static final int TAG_GPS_DIFFERENTIAL = 30;
277
278    /**
279     * A value to be used with the "GPSLatitudeRef" and
280     * "GPSDestLatitudeRef" tags.
281     *
282     * @see #TAG_GPS_LATITUDE_REF
283     * @see #TAG_GPS_DEST_LATITUDE_REF
284     */
285    public static final String LATITUDE_REF_NORTH = "N";
286
287    /**
288     * A value to be used with the "GPSLatitudeRef" and
289     * "GPSDestLatitudeRef" tags.
290     *
291     * @see #TAG_GPS_LATITUDE_REF
292     * @see #TAG_GPS_DEST_LATITUDE_REF
293     */
294    public static final String LATITUDE_REF_SOUTH = "S";
295
296    /**
297     * A value to be used with the "GPSLongitudeRef" and
298     * "GPSDestLongitudeRef" tags.
299     *
300     * @see #TAG_GPS_LONGITUDE_REF
301     * @see #TAG_GPS_DEST_LONGITUDE_REF
302     */
303    public static final String LONGITUDE_REF_EAST = "E";
304
305    /**
306     * A value to be used with the "GPSLongitudeRef" and
307     * "GPSDestLongitudeRef" tags.
308     *
309     * @see #TAG_GPS_LONGITUDE_REF
310     * @see #TAG_GPS_DEST_LONGITUDE_REF
311     */
312    public static final String LONGITUDE_REF_WEST = "W";
313
314    /**
315     * A value to be used with the "GPSAltitudeRef" tag.
316     *
317     * @see #TAG_GPS_ALTITUDE_REF
318     */
319    public static final int ALTITUDE_REF_SEA_LEVEL = 0;
320
321    /**
322     * A value to be used with the "GPSAltitudeRef" tag.
323     *
324     * @see #TAG_GPS_ALTITUDE_REF
325     */
326    public static final int ALTITUDE_REF_SEA_LEVEL_REFERENCE = 1;
327
328    /**
329     * A value to be used with the "GPSStatus" tag.
330     *
331     * @see #TAG_GPS_STATUS
332     */
333    public static final String STATUS_MEASUREMENT_IN_PROGRESS = "A";
334
335    /**
336     * A value to be used with the "GPSStatus" tag.
337     *
338     * @see #TAG_GPS_STATUS
339     */
340    public static final String STATUS_MEASUREMENT_INTEROPERABILITY = "V";
341
342    /**
343     * A value to be used with the "GPSMeasureMode" tag.
344     *
345     * @see #TAG_GPS_MEASURE_MODE
346     */
347    public static final String MEASURE_MODE_2D = "2";
348
349    /**
350     * A value to be used with the "GPSMeasureMode" tag.
351     *
352     * @see #TAG_GPS_MEASURE_MODE
353     */
354    public static final String MEASURE_MODE_3D = "3";
355
356    /**
357     * A value to be used with the "GPSSpeedRef" tag.
358     *
359     * @see #TAG_GPS_SPEED_REF
360     */
361    public static final String SPEED_REF_KILOMETERS_PER_HOUR = "K";
362
363    /**
364     * A value to be used with the "GPSSpeedRef" tag.
365     *
366     * @see #TAG_GPS_SPEED_REF
367     */
368    public static final String SPEED_REF_MILES_PER_HOUR = "M";
369
370    /**
371     * A value to be used with the "GPSSpeedRef" tag.
372     *
373     * @see #TAG_GPS_SPEED_REF
374     */
375    public static final String SPEED_REF_KNOTS = "N";
376
377    /**
378     * A value to be used with the "GPSTrackRef", "GPSImgDirectionRef",
379     * and "GPSDestBearingRef" tags.
380     *
381     * @see #TAG_GPS_TRACK_REF
382     * @see #TAG_GPS_IMG_DIRECTION_REF
383     * @see #TAG_GPS_DEST_BEARING_REF
384     */
385    public static final String DIRECTION_REF_TRUE = "T";
386
387    /**
388     * A value to be used with the "GPSTrackRef", "GPSImgDirectionRef",
389     * and "GPSDestBearingRef" tags.
390     *
391     * @see #TAG_GPS_TRACK_REF
392     * @see #TAG_GPS_IMG_DIRECTION_REF
393     * @see #TAG_GPS_DEST_BEARING_REF
394     */
395    public static final String DIRECTION_REF_MAGNETIC = "M";
396
397    /**
398     * A value to be used with the "GPSDestDistanceRef" tag.
399     *
400     * @see #TAG_GPS_DEST_DISTANCE_REF
401     */
402    public static final String DEST_DISTANCE_REF_KILOMETERS = "K";
403
404    /**
405     * A value to be used with the "GPSDestDistanceRef" tag.
406     *
407     * @see #TAG_GPS_DEST_DISTANCE_REF
408     */
409    public static final String DEST_DISTANCE_REF_MILES = "M";
410
411    /**
412     * A value to be used with the "GPSDestDistanceRef" tag.
413     *
414     * @see #TAG_GPS_DEST_DISTANCE_REF
415     */
416    public static final String DEST_DISTANCE_REF_KNOTS = "N";
417
418    /**
419     * A value to be used with the "GPSDifferential" tag.
420     *
421     * @see #TAG_GPS_DIFFERENTIAL
422     */
423    public static int DIFFERENTIAL_CORRECTION_NONE = 0;
424
425    /**
426     * A value to be used with the "GPSDifferential" tag.
427     *
428     * @see #TAG_GPS_DIFFERENTIAL
429     */
430    public static int DIFFERENTIAL_CORRECTION_APPLIED = 1;
431
432    static class GPSVersionID extends TIFFTag {
433        public GPSVersionID() {
434            super("GPSVersionID",
435                  TAG_GPS_VERSION_ID,
436                  1 << TIFFTag.TIFF_BYTE);
437        }
438    }
439
440    static class GPSLatitudeRef extends TIFFTag {
441        public GPSLatitudeRef() {
442            super("GPSLatitudeRef",
443                  TAG_GPS_LATITUDE_REF,
444                  1 << TIFFTag.TIFF_ASCII);
445        }
446    }
447
448    static class GPSLatitude extends TIFFTag {
449        public GPSLatitude() {
450            super("GPSLatitude",
451                  TAG_GPS_LATITUDE,
452                  1 << TIFFTag.TIFF_RATIONAL);
453        }
454    }
455
456    static class GPSLongitudeRef extends TIFFTag {
457        public GPSLongitudeRef() {
458            super("GPSLongitudeRef",
459                  TAG_GPS_LONGITUDE_REF,
460                  1 << TIFFTag.TIFF_ASCII);
461        }
462    }
463
464    static class GPSLongitude extends TIFFTag {
465        public GPSLongitude() {
466            super("GPSLongitude",
467                  TAG_GPS_LONGITUDE,
468                  1 << TIFFTag.TIFF_RATIONAL);
469        }
470    }
471
472    static class GPSAltitudeRef extends TIFFTag {
473        public GPSAltitudeRef() {
474            super("GPSAltitudeRef",
475                  TAG_GPS_ALTITUDE_REF,
476                  1 << TIFFTag.TIFF_BYTE);
477
478            addValueName(ALTITUDE_REF_SEA_LEVEL, "Sea level");
479            addValueName(ALTITUDE_REF_SEA_LEVEL_REFERENCE,
480                         "Sea level reference (negative value)");
481        }
482    }
483
484    static class GPSAltitude extends TIFFTag {
485        public GPSAltitude() {
486            super("GPSAltitude",
487                  TAG_GPS_ALTITUDE,
488                  1 << TIFFTag.TIFF_RATIONAL);
489        }
490    }
491
492    static class GPSTimeStamp extends TIFFTag {
493        public GPSTimeStamp() {
494            super("GPSTimeStamp",
495                  TAG_GPS_TIME_STAMP,
496                  1 << TIFFTag.TIFF_RATIONAL);
497        }
498    }
499
500    static class GPSSatellites extends TIFFTag {
501        public GPSSatellites() {
502            super("GPSSatellites",
503                  TAG_GPS_SATELLITES,
504                  1 << TIFFTag.TIFF_ASCII);
505        }
506    }
507
508    static class GPSStatus extends TIFFTag {
509        public GPSStatus() {
510            super("GPSStatus",
511                  TAG_GPS_STATUS,
512                  1 << TIFFTag.TIFF_ASCII);
513        }
514    }
515
516    static class GPSMeasureMode extends TIFFTag {
517        public GPSMeasureMode() {
518            super("GPSMeasureMode",
519                  TAG_GPS_MEASURE_MODE,
520                  1 << TIFFTag.TIFF_ASCII);
521        }
522    }
523
524    static class GPSDOP extends TIFFTag {
525        public GPSDOP() {
526            super("GPSDOP",
527                  TAG_GPS_DOP,
528                  1 << TIFFTag.TIFF_RATIONAL);
529        }
530    }
531
532    static class GPSSpeedRef extends TIFFTag {
533        public GPSSpeedRef() {
534            super("GPSSpeedRef",
535                  TAG_GPS_SPEED_REF,
536                  1 << TIFFTag.TIFF_ASCII);
537        }
538    }
539
540    static class GPSSpeed extends TIFFTag {
541        public GPSSpeed() {
542            super("GPSSpeed",
543                  TAG_GPS_SPEED,
544                  1 << TIFFTag.TIFF_RATIONAL);
545        }
546    }
547
548    static class GPSTrackRef extends TIFFTag {
549        public GPSTrackRef() {
550            super("GPSTrackRef",
551                  TAG_GPS_TRACK_REF,
552                  1 << TIFFTag.TIFF_ASCII);
553        }
554    }
555
556    static class GPSTrack extends TIFFTag {
557        public GPSTrack() {
558            super("GPSTrack",
559                  TAG_GPS_TRACK,
560                  1 << TIFFTag.TIFF_RATIONAL);
561        }
562    }
563
564    static class GPSImgDirectionRef extends TIFFTag {
565        public GPSImgDirectionRef() {
566            super("GPSImgDirectionRef",
567                  TAG_GPS_IMG_DIRECTION_REF,
568                  1 << TIFFTag.TIFF_ASCII);
569        }
570    }
571
572    static class GPSImgDirection extends TIFFTag {
573        public GPSImgDirection() {
574            super("GPSImgDirection",
575                  TAG_GPS_IMG_DIRECTION,
576                  1 << TIFFTag.TIFF_RATIONAL);
577        }
578    }
579
580    static class GPSMapDatum extends TIFFTag {
581        public GPSMapDatum() {
582            super("GPSMapDatum",
583                  TAG_GPS_MAP_DATUM,
584                  1 << TIFFTag.TIFF_ASCII);
585        }
586    }
587
588    static class GPSDestLatitudeRef extends TIFFTag {
589        public GPSDestLatitudeRef() {
590            super("GPSDestLatitudeRef",
591                  TAG_GPS_DEST_LATITUDE_REF,
592                  1 << TIFFTag.TIFF_ASCII);
593        }
594    }
595
596    static class GPSDestLatitude extends TIFFTag {
597        public GPSDestLatitude() {
598            super("GPSDestLatitude",
599                  TAG_GPS_DEST_LATITUDE,
600                  1 << TIFFTag.TIFF_RATIONAL);
601        }
602    }
603
604    static class GPSDestLongitudeRef extends TIFFTag {
605        public GPSDestLongitudeRef() {
606            super("GPSDestLongitudeRef",
607                  TAG_GPS_DEST_LONGITUDE_REF,
608                  1 << TIFFTag.TIFF_ASCII);
609        }
610    }
611
612    static class GPSDestLongitude extends TIFFTag {
613        public GPSDestLongitude() {
614            super("GPSDestLongitude",
615                  TAG_GPS_DEST_LONGITUDE,
616                  1 << TIFFTag.TIFF_RATIONAL);
617        }
618    }
619
620    static class GPSDestBearingRef extends TIFFTag {
621        public GPSDestBearingRef() {
622            super("GPSDestBearingRef",
623                  TAG_GPS_DEST_BEARING_REF,
624                  1 << TIFFTag.TIFF_ASCII);
625        }
626    }
627
628    static class GPSDestBearing extends TIFFTag {
629        public GPSDestBearing() {
630            super("GPSDestBearing",
631                  TAG_GPS_DEST_BEARING,
632                  1 << TIFFTag.TIFF_RATIONAL);
633        }
634    }
635
636    static class GPSDestDistanceRef extends TIFFTag {
637        public GPSDestDistanceRef() {
638            super("GPSDestDistanceRef",
639                  TAG_GPS_DEST_DISTANCE_REF,
640                  1 << TIFFTag.TIFF_ASCII);
641        }
642    }
643
644    static class GPSDestDistance extends TIFFTag {
645        public GPSDestDistance() {
646            super("GPSDestDistance",
647                  TAG_GPS_DEST_DISTANCE,
648                  1 << TIFFTag.TIFF_RATIONAL);
649        }
650    }
651
652    static class GPSProcessingMethod extends TIFFTag {
653        public GPSProcessingMethod() {
654            super("GPSProcessingMethod",
655                  TAG_GPS_PROCESSING_METHOD,
656                  1 << TIFFTag.TIFF_UNDEFINED);
657        }
658    }
659
660    static class GPSAreaInformation extends TIFFTag {
661        public GPSAreaInformation() {
662            super("GPSAreaInformation",
663                  TAG_GPS_AREA_INFORMATION,
664                  1 << TIFFTag.TIFF_UNDEFINED);
665        }
666    }
667
668    static class GPSDateStamp extends TIFFTag {
669        public GPSDateStamp() {
670            super("GPSDateStamp",
671                  TAG_GPS_DATE_STAMP,
672                  1 << TIFFTag.TIFF_ASCII);
673        }
674    }
675
676    static class GPSDifferential extends TIFFTag {
677        public GPSDifferential() {
678            super("GPSDifferential",
679                  TAG_GPS_DIFFERENTIAL,
680                  1 << TIFFTag.TIFF_SHORT);
681            addValueName(DIFFERENTIAL_CORRECTION_NONE,
682                         "Measurement without differential correction");
683            addValueName(DIFFERENTIAL_CORRECTION_APPLIED,
684                         "Differential correction applied");
685
686        }
687    }
688
689    private static List initTags() {
690        ArrayList tags = new ArrayList(31);
691
692        tags.add(new GPSVersionID());
693        tags.add(new GPSLatitudeRef());
694        tags.add(new GPSLatitude());
695        tags.add(new GPSLongitudeRef());
696        tags.add(new GPSLongitude());
697        tags.add(new GPSAltitudeRef());
698        tags.add(new GPSAltitude());
699        tags.add(new GPSTimeStamp());
700        tags.add(new GPSSatellites());
701        tags.add(new GPSStatus());
702        tags.add(new GPSMeasureMode());
703        tags.add(new GPSDOP());
704        tags.add(new GPSSpeedRef());
705        tags.add(new GPSSpeed());
706        tags.add(new GPSTrackRef());
707        tags.add(new GPSTrack());
708        tags.add(new GPSImgDirectionRef());
709        tags.add(new GPSImgDirection());
710        tags.add(new GPSMapDatum());
711        tags.add(new GPSDestLatitudeRef());
712        tags.add(new GPSDestLatitude());
713        tags.add(new GPSDestLongitudeRef());
714        tags.add(new GPSDestLongitude());
715        tags.add(new GPSDestBearingRef());
716        tags.add(new GPSDestBearing());
717        tags.add(new GPSDestDistanceRef());
718        tags.add(new GPSDestDistance());
719        tags.add(new GPSProcessingMethod());
720        tags.add(new GPSAreaInformation());
721        tags.add(new GPSDateStamp());
722        tags.add(new GPSDifferential());
723        return tags;
724    }
725
726    private EXIFGPSTagSet() {
727        super(initTags());
728    }
729
730    /**
731     * Returns a shared instance of an <code>EXIFGPSTagSet</code>.
732     *
733     * @return an <code>EXIFGPSTagSet</code> instance.
734     */
735    public synchronized static EXIFGPSTagSet getInstance() {
736        if (theInstance == null) {
737            theInstance = new EXIFGPSTagSet();
738        }
739        return theInstance;
740    }
741}