ExifTool Forum

ExifTool => Newbies => Topic started by: jarnos on January 06, 2013, 05:12:58 AM

Title: How do you delete GPS information in XMP metadata?
Post by: jarnos on January 06, 2013, 05:12:58 AM
I can delete GPS information from EXIF metadata by
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)
Title: Re: How do you delete GPS information in XMP metadata?
Post by: Phil Harvey 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:

-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
Title: Re: How do you delete GPS information in XMP metadata?
Post by: jarnos 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?
Title: Re: How do you delete GPS information in XMP metadata?
Post by: Phil Harvey on January 06, 2013, 10:52:52 AM
Quote from: jarnos on January 06, 2013, 10:00:41 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.

QuoteAs 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
Title: Re: How do you delete GPS information in XMP metadata?
Post by: jarnos 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 (http://www.exiftool.org/exiftool_pod.html)?
QuoteWhen 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?
Title: Re: How do you delete GPS information in XMP metadata?
Post by: Phil Harvey on January 07, 2013, 07:18:56 PM
Actually, I was thinking about the Geotagging page (https://exiftool.org/geotag.html), 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 (https://exiftool.org/TagNames/XMP.html) for details (search for "Location" on this page for examples).

- Phil