"Andre M. Winter - Carto.net" <[EMAIL PROTECTED]> writes: Hi again
>>> but my naive approach would have been >>> >>> $lat->setValue("47/1 48/1 1234/100"); >>> >> >> Hmm... I think that making a string is cumbersome for a program >> that has to manipulate these things. Isn't it easier to have it >> split up in nice arrays? > from a programmer's point of view, of course. but isn't your API > designed for read/set EXIF values? Yes, of course it is, and it will be a program that does it :-) > in this case none of the used approaches is user friendly. It is not meant to be friendly to use when writing examples with specific values, it is meant to be useful when iterating over the values in a loop, for example. Making both cases easy would of course be very nice! :-) > to be honest, i'd like to see > > $lat->setValue(47.6871293122); > > and the same for getValue(). because that's easy to handle (it > overcomes all silly degree syntaxes) and btw it is the syntax any > geo enables database will need. Aha! I have no clue about how such databases work, so your input is valuable here! A slight problem with this is that the floating point value has to be converted to a rational value since that is what is used in the Exif data. So your example becomes 476871293122 / 1000000000 but those numbers are too big for 32-bit signed integers. So one would have to first cancel out common factors (gcd is 2 in this case) and then so some rounding. But that is just implementation details, your idea is probably good! -- Martin Geisler GnuPG Key: 0x7E45DD38 PHP Exif Library | PHP Weather | PHP Shell http://pel.sf.net/ | http://phpweather.net/ | http://mgeisler.net/ Read/write Exif data | Show current weather | A shell in a browser
pgpjTc0CV5rnn.pgp
Description: PGP signature