Author Topic: How to delete all GPS information  (Read 5157 times)

Jossie

  • Full Member
  • ***
  • Posts: 80
How to delete all GPS information
« on: September 17, 2014, 01:53:46 PM »
Good evening,

GeoSetter has written the wrong GPS data to some of my files. What is the cleanest and easiest way to delete ALL GPS-related information for an image? I have searched the forum but could not find an answer.

Many thanks in advance and best wishes

Hermann-Josef

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 15492
    • ExifTool Home Page
Re: How to delete all GPS information
« Reply #1 on: September 17, 2014, 01:56:57 PM »
Hi Hermann-Josef,

To delete all EXIF GPS, do this:

exiftool -gps:all= FILE

If it may also be stored in XMP, it is a bit trickier, but this command should handle both cases:

exiftool "-gps*=" FILE

where FILE is one or more file and/or directory names.

The first command does a block delete of the EXIF GPS directory (quick and clean).  The second command individually deletes all writable tags with names beginning with "gps" (slow and messy).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3033
Re: How to delete all GPS information
« Reply #2 on: September 17, 2014, 02:39:33 PM »
They mention Geosetter and Geosetter does set the XMP-exif geo tags, so the second command will have to be used.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Jossie

  • Full Member
  • ***
  • Posts: 80
Re: How to delete all GPS information
« Reply #3 on: September 18, 2014, 01:54:44 PM »
Good evening,

thanks for both replies!

Yes, the second one has to be used. I first tried to remove the GPS information in EXIFtool GUI, but that was not the full story. With the second version Phil mentioned all gps-information is gone.

Best wishes

Hermann-Josef

jcnt

  • Newbie
  • *
  • Posts: 2
Re: How to delete all GPS information
« Reply #4 on: August 06, 2017, 10:38:46 AM »
Hi Hermann-Josef,

To delete all EXIF GPS, do this:

exiftool -gps:all= FILE

If it may also be stored in XMP, it is a bit trickier, but this command should handle both cases:

exiftool "-gps*=" FILE

where FILE is one or more file and/or directory names.


I am trying to delete GPS from a .mov file but nothing happens:

$ exiftool -gpsaltitude IMG_1234.MOV
GPS Altitude                    : 93.729 m

$ exiftool "-gps*="  IMG_1234.MOV
    0 image files updated
    1 image files unchanged

$ exiftool -gpsaltitude= IMG_1234.MOV
    0 image files updated
    1 image files unchanged

$ exiftool -gps:all= IMG_1234.MOV
    0 image files updated
    1 image files unchanged


Does anyone know what I am missing here?

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 15492
    • ExifTool Home Page
Re: How to delete all GPS information
« Reply #5 on: August 06, 2017, 03:25:38 PM »
ExifTool has only limited write ability in MOV videos, and currently can't write/delete these tags.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3033
Re: How to delete all GPS information
« Reply #6 on: August 06, 2017, 04:50:08 PM »
You might try FFMpeg.  Here's a StackExchange question about removing GPS data from an MP4.  It should be the same procedure for a MOV file, though you should test it first.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

jcnt

  • Newbie
  • *
  • Posts: 2
Re: How to delete all GPS information
« Reply #7 on: August 06, 2017, 09:55:21 PM »
ExifTool has only limited write ability in MOV videos, and currently can't write/delete these tags.
$ exiftool --help | grep MOV
      CRW   r/w   | HDP   r/w   | MOV   r/w   | PMP   r     | VSD   r

man page lists MOV as r/w with no restrictions.

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3033
Re: How to delete all GPS information
« Reply #8 on: August 06, 2017, 11:23:55 PM »
But if you view the whole thing, there are restrictions on the types of metadata below that.

If the tag was XMP:GPSAltitude, exiftool would be able to edit it.  But odds are the tag you're looking at is Composite:GPSAltitude.  Add -G1 -a to your command to check.  That tag, in the case of a MOV file, is probably derived from either QuickTime:LocationInformation or QuickTime:GPSCoordinates (see Composite tags).  And if you check under Quicktime tags, you'll see that both of those tags are not writable by Exiftool.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.