class ExifTagger::Tag::GpsCreated
GPS tags are used for camera location according to MWG 2.0) GPSLatitude (rational64u) GPSLatitudeRef (string 'N' = North, 'S' = South) GPSLongitude (rational64u) GPSLongitudeRef (string 'E' = East, 'W' = West) GPSAltitude (rational64u) GPSAltitudeRef (int8u 0 = Above Sea Level, 1 = Below Sea Level)
Constants
- EXIFTOOL_TAGS
- MAX_BYTESIZE
- VALID_KEYS
- VALID_VALUES
Private Instance Methods
generate_write_script_lines()
click to toggle source
# File lib/phtools/exif_tagger/tags/gps_created.rb, line 45 def generate_write_script_lines @write_script_lines << %(-GPSLatitude="#{@value[:gps_latitude]}") @write_script_lines << %(-GPSLatitudeRef=#{@value[:gps_latitude_ref]}) @write_script_lines << %(-GPSLongitude="#{@value[:gps_longitude]}") @write_script_lines << %(-GPSLongitudeRef=#{@value[:gps_longitude_ref]}) @write_script_lines << %(-GPSAltitude=#{@value[:gps_altitude]}) @write_script_lines << %(-GPSAltitudeRef=#{@value[:gps_altitude_ref]}) end
get_from_raw()
click to toggle source
# File lib/phtools/exif_tagger/tags/gps_created.rb, line 33 def get_from_raw { gps_latitude: @raw_values['GPSLatitude'], gps_latitude_ref: @raw_values['GPSLatitudeRef'], gps_longitude: @raw_values['GPSLongitude'], gps_longitude_ref: @raw_values['GPSLongitudeRef'], gps_altitude: @raw_values['GPSAltitude'], gps_altitude_ref: @raw_values['GPSAltitudeRef'] } end
validate_hash_items()
click to toggle source
# File lib/phtools/exif_tagger/tags/gps_created.rb, line 37 def validate_hash_items VALID_VALUES.each do |vv_key, vv_val| unless vv_val.include?(@value[vv_key]) @errors << %(#{tag_name}: value of '#{vv_key}' should be one of #{vv_val}) end end end