problem with geographical coordinates of images?

hi

I use LR4.1 and zenphoto 1.4.3.1.
when I import an image with coordinates (ie 47°23'14"N 3°14'46"W, zenphoto do not correctly translate GPS coordinates contained in the photo (not using zenphoto "W ") and the picture is badly localized in googlemap.

Is it an known issue ?

Comments

  • vincent3569 Member, Translator
    I have a look in database.

    EXIFGPSLatitudeRef and EXIFGPSLongitudeRef seem not to be evaluated (N/S or E/W).

    fyi, LR uses Exif version : 0230
  • acrylian Administrator, Developer
    Did you try the XMP plugin? Lightroom is at least known to do things beyond the standard. I don't know Lightroom though.
  • vincent3569 Member, Translator
    Yes I did a try with xmp plugin, but nothing changes.
    I don't know where is located this issue, but there is an issue...

    It works well with exif viewer (by using gps coordinate, the picture is welle located in googlemap).

    It was working with zp 1.4.2.6 and it doesn't work with 1.4.3.1.
  • acrylian Administrator, Developer
    Sorry, I cannot answer. Sbillard possibly will be able later.
  • vincent3569 Member, Translator
    to help you as best I can, there is 2 links :

    - http://www.vincentbourganel.fr/albums/20120623-randonnee-vercors/img_7298.jpg
    => well located picture by ZP (the stored data seems to be correct : EXIFGPSLatitudeRef and EXIFGPSLongitudeRef are correct)

    - http://www.vincentbourganel.fr/albums/20120720-vacances-ete-2012-bretagne/img_7638.jpg
    => bad located picture by ZP (the stored data seems to be wrong : EXIFGPSLatitudeRef and EXIFGPSLongitudeRef are empty)

    I am not able to see if stored data are different between 2 pictures (so it could be a change between LR3 and LR4), or if stored data are the same between 2 pictures (so it could be a change between ZP 1.4.2 and 1.4.3).
  • Latitude and longitude references must not be empty according to the EXIF specification:

    GPSLatitudeRef
    Indicates whether the latitude is north or south latitude. The ASCII value 'N' indicates north latitude, and 'S' is south
    latitude.
    GPSLongitudeRef
    Indicates whether the longitude is east or west longitude. ASCII 'E' indicates east longitude, and 'W' is west
    longitude.

    So I guess Lightroom got it wrong. But on the other hand, the image you say is wrong works correctly when I load it into my gallery.
  • vincent3569 Member, Translator
    the two data are not empty in the pictures (as I can see with exifviewer), but they are not loaded in zenphoto when I create new album, so pictures are not displayed at the right place with googlemap plugin.

    you download the indicated pictures and you try to import them and they are right located?
    I am using 1.4.3.1 release and you?
    maybe there was something changebetween 1.4.3.1 and 1.4.3.2?
  • vincent3569 Member, Translator
    if you have a look on my gallery, I manually add the missing values in the database and it works well (so this is not a good example).
  • acrylian Administrator, Developer
    Try 1.4.3.2 please. That is of course what we test (what did you expect seriously?).
  • I did use 1.4.3.2 [10747] of course as indicated by Acrylian. And I downloaded the image you said did not work. All is properly imported from the image into the Zenphoto database. The only way these fields could be empty is if you have told Zenphoto not to process them in the metadata field list options.

    You should use the current version of Zenphoto. But I seriously doubt there were any changes to metadata handling in that release. This area of Zenphoto is pretty stable since we really do not like trying to change the exifier script.
  • vincent3569 Member, Translator
    sbillard, you are right : GPSLatitudeRef and GPSLongitudeRef was not checked in admin.
    now, everything is OK.

    but, I really think that we should not have to check these 2 data in admin.
    If the data EXIFGPSLatitude and EXIFGPSLongitude are chosen, then EXIFGPSLatitudeRef and EXIFGPSLongitudeRef should be automatically chosen (these last data are closely related with first one and can not function without each other)
  • I have the same issue on random pictures. I fixed it directly in the database. What I see is an weird character near the W, so pictures by default are misplaced to the east.

    I'using Corel Aftershot Pro and I don't think it's going wrong : when reading exif with FxIF (an exif extension for firefox) GPS data are OK.
  • vincent3569:

    There are three states to each of these items:

    `Show the field`
    `Hide the field`
    `Do not process the field`

    The default for the Geodata is to hide the field. It is certainly your choice if you want to hide or show it in the metadata displays. Displaying or hiding the data has no impacat on it being imported into the database. But if you have checked the `Do not process` option the data is not imported. This option is made so people can prevent improper metadata from overriding something they have manually stored.

    binoyte:
    if you see anything other than a simple W or E in that field (or a N or S in the `GPSLatituderef` field) then your image is not compliant with the standard. The standard clearly states the fields are an ASCII character, N, S, E, or W.

    If Corel Aftershot Pro is not following the standard shame on them. No real excuse for that, but it is not Zenphoto's issue. There is no way we can cater to everyone's private "standards".
  • Can you have a look to that picture ? http://tmp.benoitvarret.fr/misplaced.jpg

    This picture misplaced on the embbed map. When I read the exif with whatever the software, nothing appears wrong. For instance this the exiftools output :
    `

    GPS Altitude : 301 m Above Sea Level

    GPS Latitude : 46 deg 41' 6.18" N

    GPS Longitude : 73 deg 1' 0.18" W

    GPS Position : 46 deg 41' 6.18" N, 73 deg 1' 0.18" W

    `

    But I can see weird types : http://tmp.benoitvarret.fr/misplaced_phpmyadmin.png
  • Well, your posted links are "forbidden" so we cannot look at anything. In the past this has been caused by mal-formed geodata. What you list above is either an indication of the problem or a summary of the data.

    There should be separate entries for the latititude, longitude, latitude reference, and longitude reference. The latter two are the N/S and E/W references and are defined to be simply a single character. Zenphoto follows this standards definition. If, for instnace, the N and W are part of the latitude and longitude strings it will fail. As would be the case of the references are not the single character N, S, E, or W.
  • oups sorry ! An old apache config was remaining. The links should work now.

    Thanks for your explanations, I think I have understood. Maybe exiftool can convert GPS formats.
  • Sorry again ! I just exec an
    `$ exiftool misplaced.jpg | grep GPS`

    and here is the output :
    `

    GPS Version ID : 2.3.0.0

    GPS Latitude Ref : North

    GPS Longitude Ref : West

    GPS Altitude Ref : Above Sea Level

    GPS Status : Measurement Active

    GPS Altitude : 301 m Above Sea Level

    GPS Latitude : 46 deg 41' 6.18" N

    GPS Longitude : 73 deg 1' 0.18" W

    GPS Position : 46 deg 41' 6.18" N, 73 deg 1' 0.18" W

    `

    The issue is just North should be N, and W should be W ?
  • well, output seems to be translated as exiv2 show me «Nord» instead of «North». So I tried this command which shows plain exif :
    `
    $ exiv2 -pv misplaced.jpg | grep GPS
    0x8825 Image GPSTag Long 1 424
    0x0000 GPSInfo GPSVersionID Byte 4 2 3 0 0
    0x0001 GPSInfo GPSLatitudeRef Ascii 2 N
    0x0002 GPSInfo GPSLatitude Rational 3 46/1 41/1 37080/6000
    0x0003 GPSInfo GPSLongitudeRef Ascii 2 W
    0x0004 GPSInfo GPSLongitude Rational 3 73/1 1/1 1079/6000
    0x0005 GPSInfo GPSAltitudeRef Byte 1 0
    0x0006 GPSInfo GPSAltitude Rational 1 301/1
    0x0009 GPSInfo GPSStatus Ascii 2 A
    `
    I assume this shows that exif are correct in my picture.
  • Ol, the GPS latitude and longitude Ref values do not conform to the standard which states they should be `N` abd `W` respectively.

    As I mentioned before, Zenphoto simply cannot manage to conform to arbitrary interpretations of the standards. After all this is what standards are all about--an agreement on how things would be represented.
  • well, as I said in my last post, if I read the exif with this command :
    `exiv2 -pv misplaced.jpg | grep GPS`

    I do read `N` and `W` for latitude and longitude Ref so exifs match with officials standards.
  • What does Zenphoto show for these values?
  • `
    Latitude: 46,68505
    Latitude de référence: N,
    Longitude: 73,01671662037
    Longitude de référence: W-
    Altitude: 301m
    Altitude de référence: 006fb585
    `
    The picture is located in the middle of Kazakhstan instead of Canada. The longitude ref is not interpreted so E is set by default.
  • What this indicates is that there is an extra character in the longitude reference, the hyphen and the latitude reference, the comma. Zenphoto simply extracts what is there.
  • Hi,

    both ref fields have length 2 (including the 0-byte) according to exiv2 output. Here is the hexdumped binary exif data from the image (using exiftool and hexdump -C):

    `

    000028e0 00 00 00 01 00 02 00 00 00 02 4e 00 2c 8b 00 02 |..........N.,...|

    000028f0 00 05 00 00 00 03 00 00 02 0e 00 03 00 02 00 00 |................|

    00002900 00 02 57 00 2d 99 00 04 00 05 00 00 00 03 00 00 |..W.-...........|

    `

    So it looks like some function in the pipeline stripped the 0-byte and added the following byte instead.

    This may not happen always. I had the problem with an image yesterday but new generated jpegs from the same raw show up correctly in zenphoto.

    Andreas
  • also the altitude reference seems to be messed up in zenphoto...

    Andreas
  • A GPS exif is =< 12 bytes long :
    2 bytes Tag name code
    2 bytes data type code
    4 bytes bytes of data
    4 bytes datas

    in gps.php at line 186 (function parseGPS())

    Whatever if bytes of data is <4 it takes the 4 bytes (and garbage too)
  • just replace line `/zp-core/exif/makers/gps.php:187`
    `$data = $value`

    by

    `$data = substr($value,0, $bytesofdata);`

    it works fine
Sign In or Register to comment.