Specifying number or string length

Started by dglp, November 09, 2021, 04:43:53 AM

Previous topic - Next topic

dglp

I've been using EXIFTool to pull GPS data from photos - and often get spurious digits added to the coordinates.
For example, a photo with Lat 54.775983° will be rendered as 54.7759829722222.
I'd like to preclude this by truncating the output to a specific number of digits.
Is there a specfic option for this?
If there's no specific option, can I regex something in its place?

Phil Harvey

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

dglp

Thank you!

I used
-c "%+.8f"
to get a good result.

I had been using -n to disable the N & W labels, so removed that from the string per description, and have used + to disable the orientation labels.