Petter Holt Juliussen <[EMAIL PROTECTED]> writes:

Hello!

> I'm having some problems saving my GPS coordinates in the EXIF
> longitude and latitude tags.
>
> In my application, the user inputs the GPS coordinates in DD format
> which my application converts to DMS (which I believe is the only
> format PEL supports?). I then try to save the tag with this:

Yes, DMS (three rational numbers) is what the Exif standard specifies as
input for these tags, so that is what PEL supports. We should probably
support decimal format as well.

> $lon = new PelEntryRational(PelTag::GPS_LONGITUDE, 
>               array($degree,1), array($minute,1), array($second,1));
>
> This works to an certain extent, but I'm not able to save the seconds
> with decimals (which I need to get an accurate result). When I convert
> for example
>
> DD = 11.195976 to DMS = 11-11-45.5136
>
> it doesn't save 45.5136, but it saves 455136 (without the decimal
> point), which of course messes everything up. Why is that? Isn't it
> possible to use decimals here?

I am not entirely sure, but are you saying that you use a floating point
number in the $seconds variable used above?

It must be an integer since you are constructing a rational number with
the array construct: "array($x, $y)" is the rational number "$x/$y",
where $x and $y are both integers.

Have you seen this file, which is only available with a SVN version:

  http://pel.svn.sf.net/viewvc/*checkout*/pel/trunk/examples/gps.php

I hope it might be related to what you are trying to do.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.

Attachment: pgpQVJDVL53Zk.pgp
Description: PGP signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
PEL-devel mailing list
PEL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pel-devel

Reply via email to