IPTC GPS data?

Feb 5, 2010 at 8:29 AM
Edited Feb 5, 2010 at 8:30 AM

Hi, 

I really like this library, great job!

I'm trying to get the Longitude and Latitude of a photo that has this data encoded in IPTC Core (Adobe XMP) format. I can clearly see that the coordinates are there (using the Firefox extensions "Exif Viewer") in the XMP block. However, when I try to access the data from FotoFly I get nothing, this is the code:

var photo = new JpgPhoto(FilePath);
var lat = photo.Metadata.GpsPosition.Latitude;

The lat var just gets filled with "NaN". In debug mode I tried to look at all of the properties of photo, but I could not find the coordinates in other properties either. Am I missing something?

By the way, this code works fine for getting the same data out of EXIF information.

Feb 5, 2010 at 7:59 PM

Hi Sebastiaan,

Thanks for the feedback. GpsPosition currently uses Exif, I've been meaning to add the IPTC version because it's being used by more and more apps now. But I've not had any decent samples files to play with.

Can you send me a few files, and I'll do the work to add the right support. It should be fairly simple, as long as the strings are not encoded in some crazy format like the EXIF strings are. My email is ben (at) tassography.com. If you don't mind I'll add these to my unit test samples, I'll strip out the image and just keep the metadata.

It'll take me a few days because I have a busy weekend with no play time :)

Cheers

Ben