Author Topic: How do you delete GPS information in XMP metadata?  (Read 5794 times)

jarnos

  • Newbie
  • *
  • Posts: 3
How do you delete GPS information in XMP metadata?
« on: January 06, 2013, 05:12:58 AM »
I can delete GPS information from EXIF metadata by
Code: [Select]
exiftool -gps:all= filename.jpg, but how can you delete GPS information in XMP metadata (and wherever else GPS information may be)?

(I am using version 8.60 in Ubuntu)

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17710
    • ExifTool Home Page
Re: How do you delete GPS information in XMP metadata?
« Reply #1 on: January 06, 2013, 07:28:57 AM »
Unfortunately since the GPS tags are in the same namespace as the EXIF tags in XMP, the only option for a group delete is -XMP-exif:all=, but this may remove more than you want.

Alternatively you could create an argfile listing all of the XMP GPS tags:

Code: [Select]
-xmp:gpsaltitude=
-xmp:gpsaltituderef=
-xmp:gpsareainformation=
...

and a command like this:

exiftool -@ delete_xmp_gps.args FILE

You could also delete any other tags you want like this.

- 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 ($).

jarnos

  • Newbie
  • *
  • Posts: 3
Re: How do you delete GPS information in XMP metadata?
« Reply #2 on: January 06, 2013, 10:00:41 AM »
Displaying those XMP tags in a FILE is easier: exiftool -a -XMP-exif:GPS* FILE. I think for security point of view, it would be nice, if exiftool would have shortcut for removing all GPS data in a FILE. Some people might think -gps:all= is just for that. As for my Nokia N9 photos, -xmp:geotag= seems to delete all XMP GPS tags except GPSImgDirection and GPSImgDirectionRef, and I think that those  are not very critical. How does exiftool recognize XMP GPS tags which were added by the geotag feature?

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17710
    • ExifTool Home Page
Re: How do you delete GPS information in XMP metadata?
« Reply #3 on: January 06, 2013, 10:52:52 AM »
it would be nice, if exiftool would have shortcut for removing all GPS data in a FILE.

I'm toying with the idea of allowing wildcards in the tag names when writing.  If I add this feature, -gps*= would do almost what you want.

Quote
As for my Nokia N9 photos, -xmp:geotag= seems to delete all XMP GPS tags except GPSImgDirection and GPSImgDirectionRef, and I think that those  are not very critical. How does exiftool recognize XMP GPS tags which were added by the geotag feature?

ExifTool deletes only those GPS tags that it adds with the -geotag feature.  These are listed in the documentation.

- 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 ($).

jarnos

  • Newbie
  • *
  • Posts: 3
Re: How do you delete GPS information in XMP metadata?
« Reply #4 on: January 07, 2013, 05:26:46 PM »
Did you mean this piece of information for "-geotag TRKFILE" at http://www.exiftool.org/exiftool_pod.html?
Quote
When the Geotime value is converted to UTC, the local system timezone is assumed unless the date/time value contains a timezone. Writing Geotime causes the following 8 EXIF tags to be created: GPSLatitude, GPSLatitudeRef, GPSLongitude, GPSLongitudeRef, GPSAltitude, GPSAltitudeRef, GPSDateStamp and GPSTimeStamp. Alternately XMP:Geotime may be written to create the following 5 XMP tags: GPSLatitude, GPSLongitude, GPSAltitude, GPSAltitudeRef and GPSDateTime.

Is it possible to see the location, in which a photo was shot, by examining its XMP metadata, even if -xmp:geotag= was applied?

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17710
    • ExifTool Home Page
Re: How do you delete GPS information in XMP metadata?
« Reply #5 on: January 07, 2013, 07:18:56 PM »
Actually, I was thinking about the Geotagging page, but your quote points out that I need to update the ExifTool application documentation, and the fact that GPSImgDirection wasn't deleted points out that you are using an older version of ExifTool.

There are XMP tags other than GPS ones which can give away the photo location. See the full list of XMP tags for details (search for "Location" on this page for examples).

- 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 ($).