[PATCH] Show single dives in map.

Robert C. Helling helling at lmu.de
Thu Jan 17 05:48:13 PST 2013


On Thu, 17 Jan 2013, Pierre-Yves wrote:

> On Wed, Jan 16, 2013 at 11:13:55PM +0100, Robert C. Helling wrote:
>> I also like the idea with the pictures. With a dive that still lacks GPS data, we could have a button that opens a file chooser to pick (maybe with preview) an image file to extract coordinates from the EXIF tags.
>
> I was thinking at the best way to have this on the webservice when I thought,
> were you thinking of the webservice or the desktop application for this?

I was originally thinking of implementing this in the desktop version of 
subsurface (i.e. attach a file with its geolocation to a dive). But you 
could do it as a webservice as well. I implemented this as a cgi-Script 
here:

http://euve10195.vserver.de/rch-cgi-bin/gps_from_picture.pl

You might want to enter

http://euve10195.vserver.de/~robert/wrack.jpeg

for the image URL.

The perl source is attached (you might have to install some libraries - 
"modules" in perlspeak to get this to work. But that's as easy as

sudo perl -MCPAN -e shell

and then press RETURN a couple of times as the default answers will work 
for you and then do

install MODULENAME

most likely something like

install Image::EXIF

and then
quit
)

Thinking of the desktop verion, one could take this further: Pointing 
subsurface to a directory one could match them to dives (and even create 
events for the appropriate time) to include pictures you have taken during 
the dive with the log.

I wrote the above script in perl as for me (using the appropriate modules) 
it was much easier to implement this than in C (given it involves some 
string handling, downloading images fromt he web and the extracting 
Geolocation EXIF tags). But there should be C libraries for all this as 
well.

Best
Robert


-- 
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling     Elite Master Course Theoretical and Mathematical Physics
                       Scientific Coordinator
 		      Ludwig Maximilians Universitaet Muenchen, Dept. Physik
print "Just another   Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339
     stupid .sig\n";   http://www.atdotde.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gps_from_picture.pl
Type: text/x-perl
Size: 1182 bytes
Desc: 
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130117/aca44da9/attachment.pl>


More information about the subsurface mailing list