Re: What is the easy way to read and write GPS data?
Al Pro [EMAIL PROTECTED] writes: I've used example called pel_add_gpsinfo.php. I found it when I followed by one of links that you gave me. Ah, right... the example was modified and is now in the SVN repository. You can get a copy here: http://pel.svn.sf.net/viewvc/*checkout*/pel/trunk/examples/gps.php There is piece of code from this example, including function: $GPS_LONGITUDE = convertGps($GPS_LONGITUDE); //converting from decimal to conventional coordinate system $GPS_LATITUDE = convertGps($GPS_LATITUDE); function convertGps($gpsnumber) { [...] } I rewrote the convertGps function and called it convertDecimalToDMS instead. You'll find it in the gps.php file I linked above -- please try that one out instead. It has (so far...) given correct results for me :-) -- Martin Geisler pgpzTjYJ91COE.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
Re: What is the easy way to read and write GPS data?
Thanks Martin. Awesome example and library. 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. I wonder why does it happen? Is it bug? - 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
Re: What is the easy way to read and write GPS data?
Your message was stuck in moderation -- I have now configured the listto allow your address to post. I've CCed this reply to you too, let us I'm new to mailing lists. I wonder, why I can't see your message in pel-devel lists? And how can I post replies there? I'm very new to OOP and PEL is really scares me. Well, PEL is rather OO heavy... consider it a fun way to learn OO :-) :) I actually read little bit about OO in PHP book I have, I need to buy some book for professional I think. I'm trying to read GPS data from photos, but I can't. In PEL 0.9.1 you can simply do $jpeg = new PelJpeg($file); The GPS data is not stored in the IFD0. So the getEntry() call returns null. You need to do: $gps = $ifd0-getSubIfd(PelIfd::GPS); and then your GPS_LONGITUDE entry should be in the $gps IFD. If you think this is complicated, then I agree :-) PEL parses the structure for you, but you still need to know where to find the right bits of information. Using the dump-image.php file can help. Thanks Martin. Another question is how can I easy add Exiff data, even if JPEG file doesn't have any Exif data in it? Is there any PHP sample that shows how can I do it? Please have a look at this URL in which a user explained how he added data (including GPS!) to an empty JPEG file: http://sf.net/tracker/?func=detailatid=650323aid=1815728group_id=108380 That's exactly what I need. Thanks. Can you tell me what includes does it needs? Is convertGps() a part of PEL? - 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