How do you delete GPS information in XMP metadata?

Started by jarnos, January 06, 2013, 05:12:58 AM

Previous topic - Next topic

jarnos

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)

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jarnos

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

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jarnos

Did you mean this piece of information for "-geotag TRKFILE" at 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?

Phil Harvey

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).