Extended set of data to be written

Started by tadej, May 05, 2014, 09:59:18 AM

Previous topic - Next topic

tadej

Hi Phil,

somehow I could not find any of my messages on the forum so I opened a new topic.
I am giving a final touch to the application I have written.
Interestingly enough the final thing is to write exif metadata to the image file.
The reason why I have started the project is to geocode and to write metadata to image file in the first place.
But in between so many interesting things happend regardind  photos that it is now I am implementing it.

I would like to wite the following metadata to image file:

lat,
lon,
elevation,
utc time,
local time,
direction of camera regarding to true north.
direction of 300 m (or so) of gps track span distance where photo was taken regarding to true north,
magnetic north,
gps span distance in meters (300 m or so)

name,  txt
description, txt
type, txt
symbol txt

How do I do that ?
Can it be done in one go ?
Do I have to invent any new tags or can I use existing/standard ones.

I am aware that not all information I would like to write is standardized.

best
Dusan




Phil Harvey

Hi Dusan,

Quote from: tadej on May 05, 2014, 09:59:18 AM
somehow I could not find any of my messages on the forum so I opened a new topic.

You mean this thread?

QuoteHow do I do that ?

There are many, many different ways.  The exact details of your implementation will depend on what is most convenient for you.  A place to start would be the Writing Examples section of application documentation.

QuoteCan it be done in one go ?

Yes.

QuoteDo I have to invent any new tags or can I use existing/standard ones.

Most of your tags fit into standard EXIF and GPS tags.   For any others, you can create user-defined tags.

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

tadej

Hi Phil,

yes it was that post. I did search for post holding my username but no results.
Thanks for the information. I will try to find a way how to squezze the information into image.
I can use command mode only because I am running exiftoll.exe as a process.
If there are any similar posts I woulde be happy to read them.

best
Dusan

Alan Clifford

I put a time in my photographs using the xmp datetimeoriginal.  That way, you can put in a timezone so you can always work out utc if need be.

[EXIF]          DateTimeOriginal                : 2013:05:28 16:45:13
[XMP]           DateTimeOriginal                : 2013:05:28 16:45:13+02:00



Phil Harvey

Good suggestion Alan.

Or if you need to store UTC in EXIF, it can be done with GPSDateStamp and GPSTimeStamp.

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

Alan Clifford

Quote from: Phil Harvey on May 07, 2014, 09:27:26 AM
Good suggestion Alan.


It was your suggestion originally.  I can now keep my cameras on local time which I like much better.  I take a photo of my watch showing local time and utc when I move timezones so I can match up the times using that photo and metadata.

tadej

Hi Phil,

I have constructed the following parameters string:

exiftool.exe " -gpsaltitude=76 -gpsaltituderef=above -gpslatituderef=north -gpslongituderef=west -gpslatitude=51.51791 -gpslongitude=-0.116849 -gpsdatestamp=2014:5:12 -gpstimestamp=18:15:54 C:\Users\Dusko23\Desktop\geotagged photos\2_DSCN0012.png"

When I execute  (either in pure windows command mode or as process in my VB.net application) exiftool.exe takes some time (second or so) to finish. Nothing is returned.

I have used Bogdans software to look into png  file.
It says EXIFtool was executed and No data

Any idea ?

Best  regards,
Dusan


Phil Harvey

Hi Dusan,

Your quoting is wrong.  Try this:

exiftool.exe -gpsaltitude=76 -gpsaltituderef=above -gpslatituderef=north -gpslongituderef=west -gpslatitude=51.51791 -gpslongitude=-0.116849 -gpsdatestamp=2014:05:12 -gpstimestamp=18:15:54  "C:\Users\Dusko23\Desktop\geotagged photos\2_DSCN0012.png"

Also, your month needs to be 2 digits.

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

tadej

Hi Phil,
works like magic. Thanks.  :)
I have also put days to two figures. But not hours, seconds and minutes.
Original files are considerably bigger than EXIFed ones. Any reason for that.
Thanks again,
Dusan

tadej

Hi Phil,

did browse documentation about XMP, IPCT tags but could not find something which might be used for TITLE, DESCPTION and TYPE ascii texts.
Any hint where to look at and example how to insert is highly appretiated.

Best regards,
Dusan 

tadej

Hi Phil,

after succesfully geotagging with gps position, time and altitude I tried to do reverse geocoding.

exiftool -r -if "$gpsdatetime" -fileOrder gpsdatetime -p gpx.fmt -d %Y-%m-%dT%H:%M:%SZ pics > out.gpx

I am running on windows 7.

gpx track points  contains the following data.

<trkpt lat="45.766894" lon="14.338573">
  <ele>549</ele>
  <time>m-H:SZ</time>
</trkpt>

What might be the reason for time values.

Best regards,
Dusan

Phil Harvey

Hi Dusan,

Quote from: tadej on May 19, 2014, 11:00:12 AM
Original files are considerably bigger than EXIFed ones. Any reason for that.

FAQ 13 gives some reasons.

Quote from: tadej on May 19, 2014, 02:35:20 PM
did browse documentation about XMP, IPCT tags but could not find something which might be used for TITLE, DESCPTION and TYPE ascii texts.

You mean like XMP Description and Title?  Not sure what you want to store in TYPE.

Quote from: tadej on May 19, 2014, 03:22:27 PM
  <time>m-H:SZ</time>
</trkpt>

What might be the reason for time values.

Are you running the command directly or from a .bat file?  In a bat file the "%" characters all need to be doubled.

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

tadej

You mean like XMP Description and Title?  Not sure what you want to store in TYPE.
Description, Title and Type are just strings from my database.
Type is the shortest, Description the longest and Title somewhere in between.

I can live without Type (will be appended to Title with some delimiter).

How do I concatenate a command to write Title and Description to XMP ? Or perhaps you have other suggestion where to insert the text. I would like to be in accordance with existing practice as much as possible, so that other software packages can read text infromation from image on the spot.


Are you running the command directly or from a .bat file?  In a bat file the "%" characters all need to be doubled.
Yes I was running from bat file. I did double % characters and now all is fine. Just not sure about it's meanning.

A question here: when you create gpx time, which time do you take as track point time. Is it a GPS time and date I have inserted or it is Time Taken as defined by camera.
What happens if Lat and Lon are defined, but GPS time and date is not. Do you pull Time from Time Taken or what.

Best
Dusan

Phil Harvey

Quote from: tadej on May 19, 2014, 11:50:44 PM
How do I concatenate a command to write Title and Description to XMP ?

I thought this would have been obvious: -title="some title" -description="some description" ...

QuoteA question here: when you create gpx time, which time do you take as track point time.

Take a look at the .fmt file to see what tags are used.

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

tadej

Hi Phil,

last couple of days I am quite active regarding EXIF wrapping up.
In order to manage my misson I have created and gathered several samples of images from accross the google and this is a table and example of values I have wrapped up.
Created by EXIFtool.exe image.xxx
I have run through many images in order to see all tags I need.

        'Date/Time Original              : 2014:05:17 11:16:09
        'Create Date                        : 2014:05:17 11:16:09
         'Camera Orientation           : Rotate 270 CW
        'GPS Latitude Ref                 : North
        'GPS Longitude Ref              : West
        'GPS Altitude Ref                  : Above Sea Level
        'GPS Time Stamp                  : 18:15:33
        'GPS Date Stamp                  : 2014:05:12
        'GPS Altitude                         : 57 m Above Sea Level
        'GPS Date/Time                     : 2014:05:12 18:15:33Z
        'GPS Latitude                        : 51 deg 31' 4.57" N
        'GPS Longitude                      : 0 deg 7' 2.35" W
        'GPS Position                         : 51 deg 31' 4.57" N, 0 deg 7' 2.35" W
        'Orientation                          : Rotate 270 CW
        'GPS Speed Ref                     : knots
        'GPS Speed                           : 2

These are tags I need to extract from any picture which users will get or produce.
SURE there will be tags missing which is fine.
What I need is to be sure to interpret the values correctly.

And here are some of questions:

1. How stable are Tag names: for example is GPS Altitude Ref tag name fixed or does it cange in versions.
2. How stable are Tag values: for example does the structure and formatting : Above Sea Level always look like this or does it change in versions.
3. Some Tag values a bit descriptive.  Rotate 270 CW for example or   57 m Above Sea Level . Can you please list or point to all of possible combinations for Camera rotation and GPS Altitude.
4. Is it possible to get similar values where Tag names would be like this: 0x9003 ?
5. Is it possible to write/read GPStime in fractions of seconds and how does that formatting look like ?

regards
Dusan