{"id":1786,"date":"2018-01-17T01:18:59","date_gmt":"2018-01-16T16:18:59","guid":{"rendered":"http:\/\/matoken.org\/blog\/?p=1786"},"modified":"2018-01-17T01:19:49","modified_gmt":"2018-01-16T16:19:49","slug":"exiftool-geotag","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2018\/01\/17\/exiftool-geotag\/","title":{"rendered":"ExifTool \u3067\u4efb\u610f\u306e geotag \u57cb\u3081\u8fbc\u307f"},"content":{"rendered":"<p><a data-flickr-embed=\"true\"  href=\"https:\/\/www.flickr.com\/photos\/119142834@N05\/39695444082\/in\/dateposted\/\" title=\"DSC_0241\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/farm5.staticflickr.com\/4650\/39695444082_8eb5b8a313_m.jpg\" width=\"180\" height=\"240\" alt=\"DSC_0241\"\/><\/a><\/p>\n<p>\u64ae\u5f71\u3057\u305f\u5199\u771f\u3078\u306e\u4f4d\u7f6e\u60c5\u5831\u306e\u66f8\u304d\u8fbc\u307f\u306b\u3044\u3064\u3082\u306f GPS\u30ed\u30ac\u30fc\u3067\u8a18\u9332\u3057\u305fGPS\u30ed\u30b0\u3092\u4f7f\u3044\uff0cgpscorrelate\u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\uff0e<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b9\u30e9\u30a4\u30c9\u306f2008\u5e74\u306e\u3082\u306e\u3067\u3059\u304c\u73fe\u5728\u3082\u305d\u306e\u307e\u307e\u306e\u624b\u9806\u3067\u57cb\u3081\u8fbc\u3093\u3067\u3044\u307e\u3059\uff0e<\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/www.slideshare.net\/slideshow\/embed_code\/key\/FRFMM7PTkinXoQ\" width=\"595\" height=\"485\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" style=\"border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;\" allowfullscreen> <\/iframe> <\/p>\n<div style=\"margin-bottom:5px\"> <strong> <a href=\"\/\/www.slideshare.net\/matoken\/koedo71\" title=\"Koedo71\" target=\"_blank\">Koedo71<\/a> <\/strong> from <strong><a href=\"https:\/\/www.slideshare.net\/matoken\" target=\"_blank\">Kenichiro MATOHARA<\/a><\/strong> <\/div>\n<p>\u5efa\u7269\u5185\u306a\u3069\u306b\u5165\u3063\u305f\u3068\u304d\u306a\u3069GPS\u30ed\u30b0\u304c\u53d6\u308c\u306a\u3044\u306e\u3067\u57cb\u3081\u8fbc\u307f\u3082\u51fa\u6765\u3066\u3044\u307e\u305b\u3093\u3067\u3057\u305f\uff0e\u3067\u3082\u4eca\u56de\u5efa\u7269\u5185\u3067\u64ae\u5f71\u3057\u305f\u306e\u304c\u5206\u304b\u3063\u3066\u3044\u308b\u5199\u771f\u306b\u305d\u306e\u5834\u6240\u306e\u4f4d\u7f6e\u60c5\u5831\u3092\u57cb\u3081\u8fbc\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3057\u305f\uff0e<\/p>\n<p>gpscorrelate\u30b3\u30de\u30f3\u30c9\u306e\u30de\u30cb\u30e5\u30a2\u30eb\u3092\u898b\u305f\u611f\u3058\u305d\u308c\u3089\u3057\u3044\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u898b\u5f53\u305f\u308a\u307e\u305b\u3093\u3067\u3057\u305f\uff0e\u30c0\u30df\u30fc\u306eGPS\u30ed\u30b0\u3092\u66f8\u304f\u3068\u304b\u3082\u3061\u3087\u3063\u3068\u8003\u3048\u305f\u306e\u3067\u3059\u304c\uff0cexiv2\u30b3\u30de\u30f3\u30c9\u3067\u5ea7\u6a19\u6307\u5b9a\u3067\u3044\u3051\u308b\u306e\u3067\u306f\u3068man\u3092\u898b\u308b\u3068\u884c\u3051\u305d\u3046\u3067\u3059\uff0e<\/p>\n<div class=\"codehilite\">\n<pre><span><\/span>       exiv2 -M&quot;set Exif.GPSInfo.GPSLatitude 4\/1 15\/1 33\/1&quot; \\\r\n              -M&quot;set Exif.GPSInfo.GPSLatitudeRef N&quot; image.jpg\r\n              Sets  the  latitude to 4 degrees, 15 minutes and 33 seconds north. The Exif standard stipulates that the GPS\u2010\r\n              Latitude tag consists of three Rational numbers for the degrees, minutes and seconds of the latitude and GPS\u2010\r\n              LatitudeRef contains either &#39;N&#39; or &#39;S&#39; for north or south latitude respectively.\r\n<\/pre>\n<\/div>\n<p>\u3057\u304b\u3057\u5ea7\u6a19\u306e\u5ea6\u5206\u79d2\u5909\u63db\u304c\u5fc5\u8981\u3067\u3061\u3087\u3063\u3068\u3081\u3093\u3069\u3046\u3067\u3059\uff0e<br \/>\nExifTool\u3092\u898b\u308b\u3068\u5909\u63db\u306a\u3057\u3067\u884c\u3051\u305d\u3046\u306a\u306e\u3067\u3053\u308c\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\uff08-geotag option\u3067gpscorrelate\u3068\u540c\u3058\u3053\u3068\u3082\u3067\u304d\u305d\u3046\uff09<\/p>\n<div class=\"codehilite\">\n<pre><span><\/span>       -geotag TRKFILE\r\n            Geotag images from the specified GPS track log file.  Using the -geotag option is equivalent to writing a value\r\n            to the &quot;Geotag&quot; tag.  After the -geotag option has been specified, the value of the &quot;Geotime&quot; tag is written to\r\n            define a date\/time for the position interpolation.  If &quot;Geotime&quot; is not specified, the value is copied from\r\n            &quot;DateTimeOriginal#&quot; (the &quot;#&quot; is added to copy the unformatted value, avoiding potential conflicts with the -d\r\n            option).  For example, the following two commands are equivalent:\r\n\r\n                exiftool -geotag trk.log image.jpg\r\n                exiftool -geotag trk.log &quot;-Geotime&lt;DateTimeOriginal#&quot; image.jpg\r\n\r\n            When the &quot;Geotime&quot; value is converted to UTC, the local system timezone is assumed unless the date\/time value\r\n            contains a timezone.  Writing &quot;Geotime&quot; causes the following tags to be written (provided they can be\r\n            calculated from the track log, and they are supported by the destination metadata format):  GPSLatitude,\r\n            GPSLatitudeRef, GPSLongitude, GPSLongitudeRef, GPSAltitude, GPSAltitudeRef, GPSDateStamp, GPSTimeStamp,\r\n            GPSDateTime, GPSTrack, GPSTrackRef, GPSSpeed, GPSSpeedRef, GPSImgDirection, GPSImgDirectionRef, GPSPitch and\r\n            GPSRoll.  By default, tags are created in EXIF, and updated in XMP only if they already exist.  However,\r\n            &quot;EXIF:Geotime&quot; or &quot;XMP:Geotime&quot; may be specified to write only EXIF or XMP tags respectively.  Note that\r\n            GPSPitch and GPSRoll are non-standard, and require user-defined tags in order to be written.\r\n<\/pre>\n<\/div>\n<p>\u3059\u3067\u306b\u57cb\u3081\u8fbc\u307f\u6e08\u307f\u306e\u30b8\u30aa\u30bf\u30b0\u3092\u53c2\u8003\u306b\u3057\u3066\uff0c<\/p>\n<div class=\"codehilite\">\n<pre><span><\/span>$ exiftool -v IMGP5011.JPG<span class=\"p\">|<\/span>grep GPS\r\n  <span class=\"p\">|<\/span> <span class=\"m\">12<\/span><span class=\"o\">)<\/span> GPSInfo <span class=\"o\">(<\/span>SubDirectory<span class=\"o\">)<\/span> --&gt;\r\n  <span class=\"p\">|<\/span> + <span class=\"o\">[<\/span>GPS directory with <span class=\"m\">11<\/span> entries<span class=\"o\">]<\/span>\r\n  <span class=\"p\">|<\/span> <span class=\"p\">|<\/span> <span class=\"m\">0<\/span><span class=\"o\">)<\/span>  <span class=\"nv\">GPSVersionID<\/span> <span class=\"o\">=<\/span> <span class=\"m\">2<\/span> <span class=\"m\">0<\/span> <span class=\"m\">0<\/span> <span class=\"m\">0<\/span>\r\n  <span class=\"p\">|<\/span> <span class=\"p\">|<\/span> <span class=\"nv\">Warning<\/span> <span class=\"o\">=<\/span> Tag ID 0x0000 out of sequence in GPS\r\n  <span class=\"p\">|<\/span> <span class=\"p\">|<\/span> <span class=\"m\">1<\/span><span class=\"o\">)<\/span>  <span class=\"nv\">GPSVersionID<\/span> <span class=\"o\">=<\/span> <span class=\"m\">2<\/span> <span class=\"m\">3<\/span> <span class=\"m\">0<\/span> <span class=\"m\">0<\/span>\r\n  <span class=\"p\">|<\/span> <span class=\"p\">|<\/span> <span class=\"m\">2<\/span><span class=\"o\">)<\/span>  <span class=\"nv\">GPSLatitudeRef<\/span> <span class=\"o\">=<\/span> N\r\n  <span class=\"p\">|<\/span> <span class=\"p\">|<\/span> <span class=\"m\">3<\/span><span class=\"o\">)<\/span>  <span class=\"nv\">GPSLatitude<\/span> <span class=\"o\">=<\/span> <span class=\"m\">31<\/span> <span class=\"m\">19<\/span> <span class=\"m\">18<\/span>.23 <span class=\"o\">(<\/span><span class=\"m\">31<\/span>\/1 <span class=\"m\">19<\/span>\/1 <span class=\"m\">1823<\/span>\/100<span class=\"o\">)<\/span>\r\n  <span class=\"p\">|<\/span> <span class=\"p\">|<\/span> <span class=\"m\">4<\/span><span class=\"o\">)<\/span>  <span class=\"nv\">GPSLongitudeRef<\/span> <span class=\"o\">=<\/span> E\r\n  <span class=\"p\">|<\/span> <span class=\"p\">|<\/span> <span class=\"m\">5<\/span><span class=\"o\">)<\/span>  <span class=\"nv\">GPSLongitude<\/span> <span class=\"o\">=<\/span> <span class=\"m\">130<\/span> <span class=\"m\">53<\/span> <span class=\"m\">57<\/span>.6 <span class=\"o\">(<\/span><span class=\"m\">130<\/span>\/1 <span class=\"m\">53<\/span>\/1 <span class=\"m\">5760<\/span>\/100<span class=\"o\">)<\/span>\r\n  <span class=\"p\">|<\/span> <span class=\"p\">|<\/span> <span class=\"m\">6<\/span><span class=\"o\">)<\/span>  <span class=\"nv\">GPSAltitudeRef<\/span> <span class=\"o\">=<\/span> <span class=\"m\">0<\/span>\r\n  <span class=\"p\">|<\/span> <span class=\"p\">|<\/span> <span class=\"m\">7<\/span><span class=\"o\">)<\/span>  <span class=\"nv\">GPSAltitude<\/span> <span class=\"o\">=<\/span> <span class=\"m\">7<\/span>.8833 <span class=\"o\">(<\/span><span class=\"m\">78833<\/span>\/10000<span class=\"o\">)<\/span>\r\n  <span class=\"p\">|<\/span> <span class=\"p\">|<\/span> <span class=\"m\">8<\/span><span class=\"o\">)<\/span>  <span class=\"nv\">GPSTimeStamp<\/span> <span class=\"o\">=<\/span> <span class=\"m\">7<\/span> <span class=\"m\">10<\/span> <span class=\"m\">37<\/span> <span class=\"o\">(<\/span><span class=\"m\">7<\/span>\/1 <span class=\"m\">10<\/span>\/1 <span class=\"m\">37<\/span>\/1<span class=\"o\">)<\/span>\r\n  <span class=\"p\">|<\/span> <span class=\"p\">|<\/span> <span class=\"m\">9<\/span><span class=\"o\">)<\/span>  <span class=\"nv\">GPSMapDatum<\/span> <span class=\"o\">=<\/span> WGS-84\r\n  <span class=\"p\">|<\/span> <span class=\"p\">|<\/span> <span class=\"m\">10<\/span><span class=\"o\">)<\/span> <span class=\"nv\">GPSDateStamp<\/span> <span class=\"o\">=<\/span> <span class=\"m\">2018<\/span>:01:13\r\n<\/pre>\n<\/div>\n<p>\u3053\u3093\u306a\u611f\u3058\u304b\u306a?<\/p>\n<ul>\n<li>GPSLongitudeRef=E -&gt;  \u6771\u7d4c, \u897f\u7d4c<\/li>\n<li>GPSLongitude=130.86455555555557   -&gt;  \u7d4c\u5ea6<\/li>\n<li>GPSLatitudeRef=N  -&gt;  \u5317\u7def, \u5357\u7def<\/li>\n<li>GPSLatitude=31.386555555555553    -&gt;  \u7def\u5ea6<\/li>\n<li>GPSAltitude=41.47 -&gt;  \u6d77\u629c\u6a19\u9ad8<\/li>\n<\/ul>\n<p>\u5b9f\u969b\u306bExifTool\u3067\u57cb\u3081\u8fbc\u3093\u3067\u307f\u307e\u3057\u305f\uff0e<\/p>\n<div class=\"codehilite\">\n<pre><span><\/span>$ exiftool -GPSLongitudeRef<span class=\"o\">=<\/span>E -GPSLongitude<span class=\"o\">=<\/span><span class=\"m\">130<\/span>.86455555555557 -GPSLatitudeRef<span class=\"o\">=<\/span>N -GPSLatitude<span class=\"o\">=<\/span><span class=\"m\">31<\/span>.386555555555553 -GPSAltitude<span class=\"o\">=<\/span><span class=\"m\">41<\/span>.47 IMGP5021.JPG\r\n<\/pre>\n<\/div>\n<p>\u5ea7\u6a19\u7cfb\u304c\u306a\u3044\u3068\u307e\u305a\u3044\u304b\u306a\u3068\u601d\u3044\u307e\u3057\u305f\u304cJOSM\u3084GpsPrune\u306b\u3053\u306e\u5199\u771f\u3092\u8aad\u307f\u8fbc\u3093\u3067\u307f\u308b\u3068\u60f3\u5b9a\u3057\u3066\u3044\u305f\u5ea7\u6a19\u306b\u30d7\u30ed\u30c3\u30c8\u3055\u308c\u307e\u3057\u305f :)<\/p>\n<p><a data-flickr-embed=\"true\"  href=\"https:\/\/www.flickr.com\/photos\/119142834@N05\/24856840367\/in\/photostream\/\" title=\"20180117_00:01:45-26900\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/farm5.staticflickr.com\/4709\/24856840367_1b93d95066_m.jpg\" width=\"240\" height=\"154\" alt=\"20180117_00:01:45-26900\"\/><\/a><a data-flickr-embed=\"true\"  href=\"https:\/\/www.flickr.com\/photos\/119142834@N05\/24856840217\/in\/dateposted\/\" title=\"20180116_05:01:42-30322\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/farm5.staticflickr.com\/4617\/24856840217_a89f6197ac_m.jpg\" width=\"240\" height=\"145\" alt=\"20180116_05:01:42-30322\"\/><\/a><\/p>\n<p>exiftool\u306f\u65e2\u5b9a\u5024\u3067\u306f<code>IMGP5021.JPG_original<\/code>\u306e\u3088\u3046\u306b\u30aa\u30ea\u30b8\u30ca\u30eb\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3000\u3000\u554f\u984c\u306a\u304b\u3063\u305f\u3089\u3053\u308c\u306f\u6d88\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\uff0e<\/p>\n<div class=\"codehilite\">\n<pre><span><\/span>$ rm *_original\r\n<\/pre>\n<\/div>\n<ul>\n<li><a href=\"https:\/\/sno.phy.queensu.ca\/~phil\/exiftool\/\" title=\"ExifTool by Phil Harvey\">ExifTool by Phil Harvey<\/a><\/li>\n<li><a href=\"https:\/\/sno.phy.queensu.ca\/~phil\/exiftool\/TagNames\/GPS.html\" title=\"GPS Tags\">GPS Tags<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u64ae\u5f71\u3057\u305f\u5199\u771f\u3078\u306e\u4f4d\u7f6e\u60c5\u5831\u306e\u66f8\u304d\u8fbc\u307f\u306b\u3044\u3064\u3082\u306f GPS\u30ed\u30ac\u30fc\u3067\u8a18\u9332\u3057\u305fGPS\u30ed\u30b0\u3092\u4f7f\u3044\uff0cgpscorrelate\u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\uff0e \u4ee5\u4e0b\u306e\u30b9\u30e9\u30a4\u30c9\u306f2008\u5e74\u306e\u3082\u306e\u3067\u3059\u304c\u73fe\u5728\u3082\u305d\u306e\u307e\u307e\u306e\u624b\u9806\u3067\u57cb\u3081\u8fbc\u3093\u3067\u3044\u307e\u3059\uff0e K [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[6],"tags":[305,306,74],"class_list":["post-1786","post","type-post","status-publish","format-standard","hentry","category-linux","tag-exiftool","tag-geotag","tag-gps"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/1786","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=1786"}],"version-history":[{"count":0,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/1786\/revisions"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=1786"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=1786"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=1786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}