"Al Pro" <[EMAIL PROTECTED]> writes:

> Thanks Martin. Awesome example and library.

Thanks!

> I've already run it on my server and I have one last question.
>
> I'm adding these coordinates to the image (my rented apartment in
> Limassol, Cyprus):
>
>     $GPS_LONGITUDE = " 33.100208044052124",
>     $GPS_LATITUDE = "34.70336774773516",
>
> I get image with these coordinates (points to the sea near Cyprus):
>
>     Longitude:    E 33° 60' 7.48
>     Latitude:    N 34° 42' 1.21
>
>
> I've double checked this both in Google Earth and Google maps. I've
> also exchanged longitude and latitude, but still points to the sea.

Strange... I tried making a small program to test it, and I get
results that match the ones of this page:

  http://www.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html

The test program:

  #!/usr/bin/php
  <?php
  
  require_once('../path/to/your/gps.php');
  
  list($lat_d, $lat_m, $lat_s) = convertDecimalToDMS(34.70336774773516);
  list($lon_d, $lon_m, $lon_s) = convertDecimalToDMS(33.100208044052124);
  
  printf("Latitude: %f° %f' %f\"\n",
         $lat_d[0]/$lat_d[1],
         $lat_m[0]/$lat_m[1],
         $lat_s[0]/$lat_s[1]);
  $entry= new PelEntryRational(PelTag::GPS_LATITUDE, $lat_d, $lat_m, $lat_s);
  $entry->setIfdType(PelIfd::GPS);
  print $entry . "\n";
  
  printf("Longitude: %f° %f' %f\"\n",
         $lon_d[0]/$lon_d[1],
         $lon_m[0]/$lon_m[1],
         $lon_s[0]/$lon_s[1]);
  $entry= new PelEntryRational(PelTag::GPS_LONGITUDE, $lon_d, $lon_m, $lon_s);
  $entry->setIfdType(PelIfd::GPS);
  print $entry . "\n";
  
  ?>

The output:
  
  Latitude: 34.000000° 42.000000' 12.120000"
    Tag: 0x0002 (GPSLatitude)
      Format    : 5 (Rational)
      Components: 3
      Value     : Array
  (
      [0] => Array
          (
              [0] => 34
              [1] => 1
          )
  
      [1] => Array
          (
              [0] => 42
              [1] => 1
          )
  
      [2] => Array
          (
              [0] => 1212
              [1] => 100
          )
  
  )
  
      Text      : 34° 42' 12.12" (34.70°)
  
  Longitude: 33.000000° 6.000000' 0.750000"
    Tag: 0x0004 (GPSLongitude)
      Format    : 5 (Rational)
      Components: 3
      Value     : Array
  (
      [0] => Array
          (
              [0] => 33
              [1] => 1
          )
  
      [1] => Array
          (
              [0] => 6
              [1] => 1
          )
  
      [2] => Array
          (
              [0] => 75
              [1] => 100
          )
  
  )
  
      Text      : 33° 6' 0.75" (33.10°)

  
So, to me things look as expected. How are you adding the GPS info?

-- 
Martin Geisler

Attachment: pgprgSpq2bazK.pgp
Description: PGP signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
PEL-devel mailing list
PEL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pel-devel

Reply via email to