Composite:GPSLatitude is marked as non writable... unless -tagsFromFile is used?

Started by Giovanni, January 15, 2012, 09:54:27 PM

Previous topic - Next topic

Giovanni

I have a Panasonic Lumix camera with GPS geotagging. When I use it on all my pictures, my battery doesn't last. So, I'm planning to geotag just one, and them, in batch mode, geotag the others having this one as source.

I thought about the following scenario: I take a lot of pictures, then on the source I export the GPS: group, some of the Composite: group (GPSPosition, etc) and some of Panasonic: group (Title, Landmark, etc) to a json file: I edit what I'm interested (like Panasonic:Location, and possibly Panasonic:Title), save it, and then import this json for all the other pictures. (I'm don't need too much metadata, so I'm not interested in IPTC or XMP, just the ones that I can set that can "simulate" that was my camera itself who set them). The json is a good format, it's just text, and it's better to edit then csv (i know I need to escape ", no big deal) IMHO.

This is not going to work completely because Composite:GPSPosition is non-writable. The other tags are just fine (I need to do a little sed on the json replacing "Title" with "Panasonic:Title" to not set with IPTC, no big deal. The -g option instead of this whole sed and namespace would be a better option, but it doesn't work), the Composite: group that is frustrating me.

My question is: when I use -tagsFromFile, the Composite: group is copied from a file and it's written on the destination file. But it wasn't supposed to be non-writable?

In this scenario, I can edit the source file with the Panasonic:Location I want to add, and them just use -tagsFromFile from it to all destinations: it's going to work like the json file scenario. But I would like to know what exactly is happening behind the scenes. I've read the FAQ, but couldn't understand this behavior. Can someone help? Is this behavior by design?

(I would like to know the best way to backup the original exifs as well: I was using the json approach, exiftool -j -g FILE.JPG > FILE.json. Is there a better way to do this backup? I liked the json because I was going to keep a backup from all files, and a gps.json along the images containing the gps info and something I edited from the source image. A json file is just text, I like this simplicity...)

Phil Harvey

To change a non-writable Composite tag, you must write the tags that it is derived from.

I don't understand why you say the -g option doesn't work (also try the -G option).

If the Composite tags are causing problems during extraction, use the -e option to disable them.

The reason for this behaviour of the Composite GPS tags is that it is (unfortunately) necessary when copying GPS information between EXIF and XMP because the information is stored differently in these 2 types of metadata.  The Composite tags facilitate a conversion between the different formats.

And don't forget about the -a option when extracting.  It sounds like this may be part of the confusion because some duplicate tags will be suppressed otherwise.

For backup, I wouldn't suggest the JSON format since it can't store binary data.  If you want to also store binary data, I would suggest the EXIF or MIE format:

exiftool sourcefile.jpg -o destfile.mie -all:all

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

Giovanni

Phil, thanks for answering.

Another question: is it normal to "IFD1:Thumbnail Offset" change after editing the EXIF info (I edited Panasonic:Title)? From 12800 it went to 11910. "MPImage2:MP Image Start" changed as well, from 5018624 to 5003068. (I don't know the internal implementations...)

(I used the -tagsFromFile, I understood the derived from concept.)

Phil Harvey

Quote from: Giovanni on January 19, 2012, 11:14:52 PM
Another question: is it normal to "IFD1:Thumbnail Offset" change after editing the EXIF info

Yes.  Read FAQ number 13 for more details.

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