Changeset 5004
- Timestamp:
- Feb 28, 2010, 10:00:25 PM (15 years ago)
- Location:
- extensions/AMetaData/JpegMetaData
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMetaData/JpegMetaData/Readers/GpsReader.class.php
r4904 r5004 83 83 { 84 84 case "N" : 85 $returned=" north";85 $returned="N"; 86 86 break; 87 87 case "S" : 88 $returned=" south";88 $returned="S"; 89 89 break; 90 90 default: 91 $returned=" unknown";91 $returned=""; 92 92 break; 93 93 } … … 107 107 { 108 108 case "E" : 109 $returned=" east";109 $returned="E"; 110 110 break; 111 111 case "W" : 112 $returned=" west";112 $returned="W"; 113 113 break; 114 114 default: 115 $returned=" unknown";115 $returned=""; 116 116 break; 117 117 } … … 133 133 break; 134 134 case 0x0009: // GPSStatus 135 switch(substr($values,0,1))136 {137 case "A" :138 $returned="measurement in progress";139 break;140 case "V" :141 $returned="measurement interoperability";142 break;143 default:144 $returned="unknown";145 break;146 }147 break;148 135 case 0x000A: // GPSMeasureMode 149 switch(substr($values,0,1))150 {151 case "2" :152 $returned="2-dimensional measurement";153 break;154 case "3" :155 $returned="3-dimensional measurement";156 break;157 default:158 $returned="unknown";159 break;160 }161 break;162 136 case 0x000C: // GPSSpeedRef 163 137 case 0x0019: // GPSDestDistanceRef 164 switch(substr($values,0,1))165 {166 case "K" :167 $returned="kilometers per hour";168 break;169 case "M" :170 $returned="miles per hour";171 break;172 case "N" :173 $returned="knots";174 break;175 default:176 $returned="unknown";177 break;178 }179 break;180 138 case 0x000E: // GPSTrackRef 181 139 case 0x0010: // GPSImgDirectionRef 182 140 case 0x0017: // GPSDestBearingRef 183 switch(substr($values,0,1)) 141 $tag=$this->tagDef->getTagById(0x0009); 142 $key=substr($values,0,1); 143 if(array_key_exists($key, $tag['tagValues.special'])) 184 144 { 185 case "T" : 186 $returned="true direction"; 187 break; 188 case "M" : 189 $returned="magnetic direction"; 190 break; 191 default: 192 $returned="unknown"; 193 break; 145 $returned=$tag['tagValues.special'][$key]; 146 } 147 else 148 { 149 $returned=$tag['tagValues.special']['unknown']; 194 150 } 195 151 break; -
extensions/AMetaData/JpegMetaData/TagDefinitions/GpsTags.class.php
r4904 r5004 111 111 'implemented' => true, 112 112 'tagValues' => Array( 113 0x00 => " above sea level",114 0x01 => " under sea level"113 0x00 => "+", 114 0x01 => "-" 115 115 ) 116 116 ), // < GPSAltitudeRef … … 147 147 'tagName' => "GPSStatus", 148 148 'schema' => "GPS", 149 'translatable'=> false, 150 'combiTag' => 0, 151 'implemented' => true 149 'translatable'=> true, 150 'combiTag' => 0, 151 'implemented' => true, 152 'tagValues.special' => Array( 153 'A' => "measurement in progress", 154 'V' => "measurement interoperability", 155 'unknown' => "Unknown", 156 ) 152 157 ), // < GPSStatus 153 158 … … 156 161 'tagName' => "GPSMeasureMode", 157 162 'schema' => "GPS", 158 'translatable'=> false, 159 'combiTag' => 0, 160 'implemented' => true 163 'translatable'=> true, 164 'combiTag' => 0, 165 'implemented' => true, 166 'tagValues.special' => Array( 167 '2' => "2-dimensional measurement", 168 '3' => "3-dimensional measurement", 169 'unknown' => "Unknown", 170 ) 161 171 ), // < GPSMeasureMode 162 172 … … 174 184 'tagName' => "GPSSpeedRef", 175 185 'schema' => "GPS", 176 'translatable'=> false, 177 'combiTag' => 0, 178 'implemented' => true 186 'translatable'=> true, 187 'combiTag' => 0, 188 'implemented' => true, 189 'tagValues.special' => Array( 190 'K' => "kilometers per hour", 191 'M' => "miles per hour", 192 'N' => "knots", 193 'unknown' => "Unknown", 194 ) 179 195 ), // < GPSSpeedRef 180 196 … … 192 208 'tagName' => "GPSTrackRef", 193 209 'schema' => "GPS", 194 'translatable'=> false, 195 'combiTag' => 0, 196 'implemented' => true 210 'translatable'=> true, 211 'combiTag' => 0, 212 'implemented' => true, 213 'tagValues.special' => Array( 214 'T' => "true direction", 215 'M' => "magnetic direction", 216 'unknown' => "Unknown", 217 ) 197 218 ), // < GPSTrackRef 198 219 … … 210 231 'tagName' => "GPSImgDirectionRef", 211 232 'schema' => "GPS", 212 'translatable'=> false, 213 'combiTag' => 0, 214 'implemented' => true 233 'translatable'=> true, 234 'combiTag' => 0, 235 'implemented' => true, 236 'tagValues.special' => Array( 237 'T' => "true direction", 238 'M' => "magnetic direction", 239 'unknown' => "Unknown", 240 ) 215 241 ), // < GPSImgDirectionRef 216 242 … … 273 299 'tagName' => "GPSDestBearingRef", 274 300 'schema' => "GPS", 275 'translatable'=> false, 276 'combiTag' => 0, 277 'implemented' => true 301 'translatable'=> true, 302 'combiTag' => 0, 303 'implemented' => true, 304 'tagValues.special' => Array( 305 'T' => "true direction", 306 'M' => "magnetic direction", 307 'unknown' => "Unknown", 308 ) 278 309 ), // < GPSDestBearingRef 279 310 … … 291 322 'tagName' => "GPSDestDistanceRef", 292 323 'schema' => "GPS", 293 'translatable'=> false, 294 'combiTag' => 0, 295 'implemented' => true 324 'translatable'=> true, 325 'combiTag' => 0, 326 'implemented' => true, 327 'tagValues.special' => Array( 328 'K' => "kilometers per hour", 329 'M' => "miles per hour", 330 'N' => "knots", 331 'unknown' => "Unknown", 332 ) 296 333 ), // < GPSDestDistanceRef 297 334 … … 338 375 'tagName' => "GPSDifferential", 339 376 'schema' => "GPS", 340 'translatable'=> false,377 'translatable'=> true, 341 378 'combiTag' => 0, 342 379 'implemented' => true, -
extensions/AMetaData/JpegMetaData/TagDefinitions/MagicTags.class.php
r4998 r5004 89 89 ), 90 90 91 92 91 'ShotInfo.Aperture' => Array( 93 92 'implemented' => true, … … 117 116 'tagValues' => Array( 118 117 "{exif.exif.ISOSpeedRatings}", 118 "{xmp.exif:ISOSpeedRatings}", 119 119 "{exif.Pentax.ISO}", 120 "{exif.Canon.CanonShotInfo.BaseISO}",121 "{xmp.exif:ISOSpeedRatings}",122 120 ) 123 121 ), … … 138 136 'translatable' => false, 139 137 'tagValues' => Array( 140 "{exif.exif.FocalLengthIn35mm }",141 "{xmp.exif:FocalLengthIn35mm }",138 "{exif.exif.FocalLengthIn35mmFilm}", 139 "{xmp.exif:FocalLengthIn35mmFilm}", 142 140 ) 143 141 ), … … 299 297 ), 300 298 299 'GPS.Altitude' => Array( 300 'implemented' => true, 301 'translatable' => false, 302 'tagValues' => Array( 303 "{exif.gps.GPSAltitudeRef}{exif.gps.GPSAltitude}m", 304 "{xmp.exif:GPSAltitudeRef}{xmp.exif:GPSAltitude}m", 305 ) 306 ), 307 308 'GPS.Latitude' => Array( 309 'implemented' => true, 310 'translatable' => false, 311 'tagValues' => Array( 312 "{exif.gps.GPSLatitude} {exif.gps.GPSLatitudeRef}", 313 "{xmp.exif:GPSLatitude}", 314 ) 315 ), 316 317 'GPS.Longitude' => Array( 318 'implemented' => true, 319 'translatable' => false, 320 'tagValues' => Array( 321 "{exif.gps.GPSLongitude} {exif.gps.GPSLongitudeRef}", 322 "{xmp.exif:GPSLongitude}", 323 ) 324 ), 325 301 326 ); 302 327 -
extensions/AMetaData/JpegMetaData/TagDefinitions/XmpTags.class.php
r4998 r5004 87 87 { 88 88 $result=preg_match("/([a-z]*)([-|_])([a-z]*)/i", $lang, $arr); 89 return($arr[1]."_".strtoupper($arr[3])); 89 if(is_array($arr) and count($arr)) 90 { 91 return($arr[1]."_".strtoupper($arr[3])); 92 } 93 else 94 { 95 return($lang); 96 } 90 97 } 91 98
Note: See TracChangeset
for help on using the changeset viewer.