Use Google Earth to geotag the dive sites

3rd party extensions (phpDivingLog, dive computer downloader,...)
rene
Posts: 65
Joined: Sun Sep 12, 2010 19:07
Location: France

Use Google Earth to geotag the dive sites

Post by rene »

Hello everybody,

I have wrote a little program that uses Google Earth as Picasa does for geotagging dive sites (e.g. set their GPS location). It differs from the Diving Log 5.0 built-in feature because, here, you use Google Earth to get the coordinates.
screenshot3.png
screenshot3.png (54.99 KiB) Viewed 55075 times
You can retrieve the location by geotagging (the program launches Google Earth and displays a crosshairs plus a little window in the bottom right corner to accept the location or cancel the operation.
googleearth.png
googleearth.png (161.33 KiB) Viewed 55075 times
You can also set the location with the coordinates stored in the Exif. Smartphones, Lumix TZ10/20, and probably other devices add the location where picture are taken.

In the toobar, the KML button creates a .kml or .kmz file with all the dive sites and their descriptions. Save button commits the modifications, and the Undo rollbacks the current site. If you want to cancel all the modifications, close the program and relaunch it.


This tool is an external tool to Diving Log 5.0. The simplest solution it is to confirure it as an external tool call it when needed. With this tool, you can set only some parameters of the dive site (lat, lon, alt, depth, rating and comments). You can not create or delete sites: this must be done in Diving Log 5.0.

Altitude and depth are calculated from Google Eearth: if the altitude of the targetted point is negative, it becomes the depth and altitude is set to 0. It may be a bit hazy, I know :)

You can download it here : DL5GeoTag.zip. You have to unzip the both files in the directory of your choice (for example C:\Program Files (x86)\Diving Log 5.0\DL5GeoTag) and to launch it at least once. It will display a warning and configure the external tool in Diving Log.

In the project page, you will find how I handled the Earth COMAPI. (Only for interested geeks...)

It requires the .NET Framework 4 Client Profile which has to be downloaded from the Microsoft site : Web install or Standalone install.

And, of course, Google Earth. But, in fact, Google Earth is not essential if you geotag only from jpeg.


THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. And it is not related to Diving Log neither its author.

I have tested on my PC with Windows 7 64-bit Pro and Google Earth 6.0.3.2197.


Maybe this tool will become obsolete one day... :)

Best regards,
René
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Use Google Earth to geotag the dive sites

Post by divinglog »

Hi René

Great work! I've written a blog post about this add-on.

Best regards,
Sven
rene
Posts: 65
Joined: Sun Sep 12, 2010 19:07
Location: France

Re: Use Google Earth to geotag the dive sites

Post by rene »

Thank you :)

In my spare time, I'll think about how to automatically generate a map of the dives, for a trip or for a selection.
Manual example :
Image

I don't know if it's already possible with bing or google or whatever... I takes a screenshot for making these maps.

Therefore, it would be nice if we could specify the type of dive site ;-) I might also add a column by me, but I prefer not to change the db.
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Use Google Earth to geotag the dive sites

Post by divinglog »

Yes, I want to add an option to export dive sites to Google Earth grouped by trip (maybe with a line connection for live aboard trips so you can see how the boat traveled). I will also add a map view control right into Diving Log which should allow some other nice things, but unfortunately Google maps won't be an option due to API restrictions. It will be Open Streetmap and Bing Maps.
lloyd_borrett
Posts: 228
Joined: Sun Jun 11, 2006 09:24
Location: Frankston South, Victoria, Australia
Contact:

Re: Use Google Earth to geotag the dive sites

Post by lloyd_borrett »

Great work rene,

I started using this yesterday. Had a few Google Earth related issues at first, but an uninstall and install resolved them. Any chance you could sort the list of dive sites and provide an indicator as to which sites have coordinates and which ones don't?

Sven, you might want to check out an old post of mine if you're looking at improvements to the KML export. See viewtopic.php?f=4&t=332

Best Regards, Lloyd Borrett.
AndyDragon
Posts: 110
Joined: Tue Nov 14, 2006 08:38
Location: Penetanguishene, Ontario
Contact:

Re: Use Google Earth to geotag the dive sites

Post by AndyDragon »

This is a very cool little app, certainly easier than typing this stuff in from Google maps!

One thing I noticed, the elevation is always in meters, it would be a nice little feature to have a check-box to allow metric (M) and imperial (ft).

Also, +1 for an icon in the tree/list on the left to indicate that site has coords or not.

Lastly, one nice improvement would be addition of a splitter between the tree/view.

Anyway, nice work.
Andrew Forget
PADI IDC Staff Instructor 212158
rene
Posts: 65
Joined: Sun Sep 12, 2010 19:07
Location: France

Re: Use Google Earth to geotag the dive sites

Post by rene »

Hello,

Thank you Andy :)

I'll make the changes you suggest. For the altitude, should I understand that GE always returns meters ?

Regards,
René
lloyd_borrett
Posts: 228
Joined: Sun Jun 11, 2006 09:24
Location: Frankston South, Victoria, Australia
Contact:

Re: Use Google Earth to geotag the dive sites

Post by lloyd_borrett »

Google Earth returns metres. Plus the values in the Diving Log database are in metres. So if this app is writing direct into the DL database as I suspect it is, then it is saving the metre values and when you view the values in Diving Log you'll see feet or metres depending on what units you have as your default setting.

As I work in metres, that's fine for me. But I guess those that are used to working in feet would prefer to be able to see the values in feet within this utility.

Best Regards, Lloyd Borrett.
rene
Posts: 65
Joined: Sun Sep 12, 2010 19:07
Location: France

Re: Use Google Earth to geotag the dive sites

Post by rene »

Altitude column is a free text field, so Diving Log won't convert it, I guess. Depending on imperial/metric settings, I will convert from metres to feet then append " ft" or " m" . But MaxDepth is a numeric field.

Well, I'll take a look. Thanks for the info :)
lloyd_borrett
Posts: 228
Joined: Sun Jun 11, 2006 09:24
Location: Frankston South, Victoria, Australia
Contact:

Re: Use Google Earth to geotag the dive sites

Post by lloyd_borrett »

My mistake rene,

Altitude is a free text field. For almost all of my dives it's "0 m" for sea level.

Depth is numeric and stored in metres.

Best regards, Lloyd Borrett.
AndyDragon
Posts: 110
Joined: Tue Nov 14, 2006 08:38
Location: Penetanguishene, Ontario
Contact:

Re: Use Google Earth to geotag the dive sites

Post by AndyDragon »

Yes, everything stored in the Diving Log database is in metric (understandably since Sven lives in a country with modern units, lol...actually for everything but diving, here in Canada, everything is metric, but for diving we follow the Americans). For your utility, internally you would store the value in M, but for display (and manual input), the check-box controls M vs ft. This is easy to achieve using an IValueConverter which has a dependency property with a binding to the check box (if you are using WPF...should still work with WinForms, just a bit more work). If you would like a small sample app, I could write one up quick...
Andrew Forget
PADI IDC Staff Instructor 212158
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Use Google Earth to geotag the dive sites

Post by divinglog »

Max Depth is stored internally in meters and converted to feet for display if necessary. Altitude is a free text field and not converted.
rene
Posts: 65
Joined: Sun Sep 12, 2010 19:07
Location: France

Re: Use Google Earth to geotag the dive sites

Post by rene »

Well, I thought that Anglo Saxons promised to abandon their imperial system in consideration of the choice of Meridian of Greenwich instead of the Paris one, in 1884 ;-)

For the anecdote, the Greenwich meridian is shifted by 102.5 m (at the Greenwich latitude) compared to WGS84 longitude 0.

For converting from meters to feet on the fly, I use a class that inherits from System.Windows.Forms.TextBox. I find this solution very simple !

Lloyd: I will add an icon or something else to distinguish sites with and without coords.

Currently, the dive sites are sorted by the date of creation (e.g their ID) and the focus on the most recent one. I found this more convenient for my own needs :)
lloyd_borrett
Posts: 228
Joined: Sun Jun 11, 2006 09:24
Location: Frankston South, Victoria, Australia
Contact:

Re: Use Google Earth to geotag the dive sites

Post by lloyd_borrett »

G'day rene,

Australia too is metric. It's those yanks that are still clinging to the old imperial system.

Having the indicator for the dives without coordinates would be the biggest help. The sort order is less important.

Best Regards, Lloyd Borrett.
rene
Posts: 65
Joined: Sun Sep 12, 2010 19:07
Location: France

Re: Use Google Earth to geotag the dive sites

Post by rene »

Hello,

I've modified the program to add :
* a splitter between list and details panels and remembering of the location/size of the window
* an icon for dive sites with coords (but no sort or filter...)
* imperial/metric for MaxDepth and Altitude, depending on the Diving Log setting (I hope oyu don't use meters for altitude and feet for depth !!!)
* a diver icon instead the standard pushpin in the KML

http://google-earth-tagging.googlecode. ... ag_1.1.zip

rené
Post Reply