Author Topic: Set GPS data loss  (Read 5764 times)

Offline Andrew

  • Member
  • **
  • Posts: 61
    • View Profile
Set GPS data loss
« on: June 07, 2011, 04:37:52 AM »
I am running PM 4.6.7 on an Intel Mac on OSX 10.6.7.  My main editing program is PS CS5 12.0.4 x64.  My main camera is a D3s.  I shoot exclusively RAW.

I have the IPTC/XMP Preferences set as recommended by PM for use with Adobe products. I use PM to ingest, sort and classify, and then edit in ACR, then to PS for any final polishing.  I then convert to sRGB and Save As a jpg.  Sometimes I do this by just using Save for Web.  I have, but rarely use, View NX2 2.0.3.

I have started to geotag photos using a data logger connected to the camera by bluetooth.  I am aware that Save for Web causes problems with GPS information. Contrary to what is said on the web, Save for Web does not delete GPS information; View NX2 shows this information both as coordinates and on the map, while Preview does the same but, bizarrely  transposes a west of zero longitude to the equivalent east of zero longitude for both the coordinates and the map.  However, PM cannot read GPS information in a jpg which has been Saved for Web.  To avoid such problems I no longer use Save for Web, but instead use Save As (after conversion to sRGB).  This works fine in PM for GPS data added in camera.

My problem arises when I use PM's Set GPS Coordinates (which I only do when the GPS data was not originally logged).  Even when I Save As, PM cannot read the information added by Set GPS Coordinates.  Neither can View NX2.  Preview can read this information, but transposes the longitude coordinate west to east, but shows the correct position on the map(!).

Is there a way I can get PM's Set GPS to be read by PM and other programs (apart from Preview, which can read it in its own strange way) in the jpg?


Online Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: Set GPS data loss
« Reply #1 on: June 07, 2011, 06:48:11 AM »
Andrew,

I am running PM 4.6.7 on an Intel Mac on OSX 10.6.7.  My main editing program is PS CS5 12.0.4 x64.  My main camera is a D3s.  I shoot exclusively RAW.

I have the IPTC/XMP Preferences set as recommended by PM for use with Adobe products. I use PM to ingest, sort and classify, and then edit in ACR, then to PS for any final polishing.  I then convert to sRGB and Save As a jpg.  Sometimes I do this by just using Save for Web.  I have, but rarely use, View NX2 2.0.3.

I have started to geotag photos using a data logger connected to the camera by bluetooth.  I am aware that Save for Web causes problems with GPS information. Contrary to what is said on the web, Save for Web does not delete GPS information; View NX2 shows this information both as coordinates and on the map, while Preview does the same but, bizarrely  transposes a west of zero longitude to the equivalent east of zero longitude for both the coordinates and the map.  However, PM cannot read GPS information in a jpg which has been Saved for Web.  To avoid such problems I no longer use Save for Web, but instead use Save As (after conversion to sRGB).  This works fine in PM for GPS data added in camera.

My problem arises when I use PM's Set GPS Coordinates (which I only do when the GPS data was not originally logged).  Even when I Save As, PM cannot read the information added by Set GPS Coordinates.  Neither can View NX2.  Preview can read this information, but transposes the longitude coordinate west to east, but shows the correct position on the map(!).

Is there a way I can get PM's Set GPS to be read by PM and other programs (apart from Preview, which can read it in its own strange way) in the jpg?

When you say you use 'Save As', are you using PM's Save function or some other application's Save function (perhaps Photoshop)?

-Kirk

Offline Andrew

  • Member
  • **
  • Posts: 61
    • View Profile
Re: Set GPS data loss
« Reply #2 on: June 07, 2011, 07:10:09 AM »
I am using the Photoshop Save As function, sorry for not making that clear. 

Online Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: Set GPS data loss
« Reply #3 on: June 07, 2011, 07:44:08 AM »
I am using the Photoshop Save As function, sorry for not making that clear. 

Can you send me one of your saved files?  Use the 'Additional Options...' link when you're composing your reply to this message and there you'll be able to upload your JPEG file.

Thanks,

-Kirk

Offline Andrew

  • Member
  • **
  • Posts: 61
    • View Profile
Re: Set GPS data loss
« Reply #4 on: June 07, 2011, 08:14:45 AM »
Kirk, thanks, here is a typical example, together with the jpg extracted from the nef using PM, which preserves the GPS data added by Set GPS.

[attachment deleted by admin]

Online Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: Set GPS data loss
« Reply #5 on: June 07, 2011, 11:23:08 AM »
Andrew,

Kirk, thanks, here is a typical example, together with the jpg extracted from the nef using PM, which preserves the GPS data added by Set GPS.

I added coordinates to your 'Save As' image and it worked fine in Preview.  Perhaps your image changed somehow in the upload process?  If you download your image from this thread does it then work for you?  If so, I'll have to have you send it to me some other way (like in a Zip file) so that I get your unmodified example image.

-Kirk

Offline Andrew

  • Member
  • **
  • Posts: 61
    • View Profile
Re: Set GPS data loss
« Reply #6 on: June 07, 2011, 04:13:54 PM »
Thanks, Kirk, I have downloaded it and it behaves the same as it did before I uploaded it.

The issue with Preview is that the Inspector states that the latitude is 61 deg, but the correct latitude is -61 deg;  the first is in the Indian ocean, and the second (correct) is in the Caribbean!  This strangeness is compounded in Preview because despite this statement, the location is correctly plotted on the Preview map in the Caribbean.  This is via Google Maps, which has the correct coordinates (eg -61).

Preview makes the same mistake with all GPS tagged files, both tagged in camera and added through PM.  It seems to have a problem showing latitudes west of Greenwich as negative numbers.  When I use PS Save for Web, Preview in addition causes Google Maps to put the location on the map in the Indian Ocean.  So I think there are issues with Preview which it is not fair to ask you to resolve.

PM, on the other hand, gets it right on both the negative numbers and on the map when (a) the data has been added in camera and the nef converted via PS Save As, and (b) when I extract the jpg which is within the nef.  If you run the extracted image above through PM and through Preview, you will see that PM and Preview both get it right on the map, but also that PM correctly states the latitude as -61 deg, while Preview shows it as 61 deg. 

For comparison, I enclose an image taken in roughly the same region (actually -60), but geotagged in camera and converted to jpg through Photoshop Save As.  PM shows the GPS information correctly in all respects, but Preview gets it wrong on the numbers (60 rather than -60) but right on the map.  So the problem I have is that when GPS is set through PM Set GPS Coordinates, PM cannot see the information, but it can when the GPS coordinates are set in camera.  I have resized this in PM by sending to myself as an email, to avoid involving another program.  As you can see, it works perfectly in PM, but Preview cannot read the GPS information (Preview could on the version not sent by email) .

I also attach a table showing the different behaviour of different programs.

Thanks for looking at this.

[attachment deleted by admin]

Online Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: Set GPS data loss
« Reply #7 on: June 07, 2011, 05:28:27 PM »
Andrew,

Thanks, Kirk, I have downloaded it and it behaves the same as it did before I uploaded it.

The issue with Preview is that the Inspector states that the latitude is 61 deg, but the correct latitude is -61 deg;  the first is in the Indian ocean, and the second (correct) is in the Caribbean!  This strangeness is compounded in Preview because despite this statement, the location is correctly plotted on the Preview map in the Caribbean.  This is via Google Maps, which has the correct coordinates (eg -61).

Preview makes the same mistake with all GPS tagged files, both tagged in camera and added through PM.  It seems to have a problem showing latitudes west of Greenwich as negative numbers.  When I use PS Save for Web, Preview in addition causes Google Maps to put the location on the map in the Indian Ocean.  So I think there are issues with Preview which it is not fair to ask you to resolve.

PM, on the other hand, gets it right on both the negative numbers and on the map when (a) the data has been added in camera and the nef converted via PS Save As, and (b) when I extract the jpg which is within the nef.  If you run the extracted image above through PM and through Preview, you will see that PM and Preview both get it right on the map, but also that PM correctly states the latitude as -61 deg, while Preview shows it as 61 deg. 

For comparison, I enclose an image taken in roughly the same region (actually -60), but geotagged in camera and converted to jpg through Photoshop Save As.  PM shows the GPS information correctly in all respects, but Preview gets it wrong on the numbers (60 rather than -60) but right on the map.  So the problem I have is that when GPS is set through PM Set GPS Coordinates, PM cannot see the information, but it can when the GPS coordinates are set in camera.  I have resized this in PM by sending to myself as an email, to avoid involving another program.  As you can see, it works perfectly in PM, but Preview cannot read the GPS information (Preview could on the version not sent by email) .

I also attach a table showing the different behaviour of different programs.

Thanks for looking at this.

Well, you've got me confused.  I'm not quite sure if you're telling me about a deficiency in PM or in other apps that we're not responsible for.  I cannot open your table of behaviors because I don't have Pages.

-Kirk

Offline Andrew

  • Member
  • **
  • Posts: 61
    • View Profile
Re: Set GPS data loss
« Reply #8 on: June 08, 2011, 07:53:33 AM »
Kirk, apologies, when I was referring to Preview I meant OSX Preview, while you, quite reasonably, understood this as PM Preview.  I was referring to OSX Preview and to View NX2 in order to show how different programs treat the GPS data which has been added in PM.

Going back to my original issue, this is that when I add GPS information by using PM's Set GPS Coordinates, and then process it through ACR and Photoshop CS5, finishing by converting to sRGB and Save As, the added GPS data in the jpg is unreadable by PM.  The data is still there somewhere, but is only readable by OSX Preview (with the transposing of the numerical latitude coordinate from east to west, which is what OSX Preview does with GPS data however added).  As I said, there is clearly a problem with OSX Preview, but that is not your responsibility.  But at least that program can read the data.

When GPS data is added in camera, at the time the image is captured, the same processing results in the GPS information being fully readable by PM in the jpg.

I am not so asking you for help with the problems with CS5's Save for Web, as this is clearly an Adobe issue.

I enclose a typical image showing this issue.  The nef shows the GPS data added through Set GPS and I can post this if you wish. 

I also enclose a pdf of the table I posted yesterday in Pages, showing how different programs behave.  Apologies for not posting a pdf previously;  it was around midnight UK time and I was getting rather tired.

Many thanks for your patience.

[attachment deleted by admin]

Online Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: Set GPS data loss
« Reply #9 on: June 08, 2011, 11:12:20 AM »
Andrew,

Kirk, apologies, when I was referring to Preview I meant OSX Preview, while you, quite reasonably, understood this as PM Preview.  I was referring to OSX Preview and to View NX2 in order to show how different programs treat the GPS data which has been added in PM.

Going back to my original issue, this is that when I add GPS information by using PM's Set GPS Coordinates, and then process it through ACR and Photoshop CS5, finishing by converting to sRGB and Save As, the added GPS data in the jpg is unreadable by PM.  The data is still there somewhere, but is only readable by OSX Preview (with the transposing of the numerical latitude coordinate from east to west, which is what OSX Preview does with GPS data however added).  As I said, there is clearly a problem with OSX Preview, but that is not your responsibility.  But at least that program can read the data.

When GPS data is added in camera, at the time the image is captured, the same processing results in the GPS information being fully readable by PM in the jpg.

I am not so asking you for help with the problems with CS5's Save for Web, as this is clearly an Adobe issue.

I enclose a typical image showing this issue.  The nef shows the GPS data added through Set GPS and I can post this if you wish. 

I also enclose a pdf of the table I posted yesterday in Pages, showing how different programs behave.  Apologies for not posting a pdf previously;  it was around midnight UK time and I was getting rather tired.

Many thanks for your patience.

Thank you for the sample image.  The GPS coordinates are technically malformed in the sample image.  GPS latitude and longitude are expressed as 'rationals' in EXIF data.  Rationals are just a fraction (x/y) where 'y' (the denominator) is not allowed to be zero.  The seconds on the latitude for your sample image have a denominator of zero.

I have made a change to our GPS coordinate parsing to make invalid rationals (0/0) be (0/1) which still equals zero which makes the coordinates acceptable.

This change will be in the next update to Photo Mechanic.

-Kirk

Offline Andrew

  • Member
  • **
  • Posts: 61
    • View Profile
Re: Set GPS data loss
« Reply #10 on: June 08, 2011, 12:12:21 PM »
Kirk

Many thanks for this.