[Google map plugin] newbie request about gpx

dyk74

Joined: 2008-03-04
Posts: 1
Posted: Tue, 2008-03-04 12:07

Hi everybody, I'm a new user for Gallery2 and I've a request about the Google map plugin (or if exists some other plugin that do it the same thing)

I've added on gallery the pics but I need to add the track too, I've the GPX log... so that I've the pics and the tracks I've done on the same map.

Is it possible to do this?
Are there any way to do this?

Thanks...

Dyk74

Login or register to post comments
oceco

Joined: 2007-10-22
Posts: 137
Posted: Wed, 2008-03-05 02:45

Hi dyk74

Quote:
I need to add the track too, I've the GPX log... so that I've the pics and the tracks I've done on the same map

What do you wanna do with the GPX-track:
- Do you want to display it on the map?
- Do you wanna geo-tag your photos with it?
If yes, that's so far not possible with the version 0.5.6 but there are utilities around in the web which can draw a track on a map or geo-tag photos using the time stamp in your photo and track.

With the maps module you can display geo-tagged photos/albums on a map. Also you can geo-tag a photo with Google Maps and add Google Earth parameters (heading, tilt, range) to it. With the later you can create a very nice Google Earth show. Given that I would look at Google Earth on how to add my track as a GE Dynamic Data Layer (this is just an idea).

I for myself would be interested in such a feature as well, but I'm still busy to tag my images for Google Maps and Earth.

/oceco

Login or register to post comments
oceco

Joined: 2007-10-22
Posts: 137
Posted: Thu, 2008-03-13 01:16

Hi dyk74

today I read an interessting article in the German magazine c't about this theme.

First you convert your .gpx track with GPSBabel to a .kml file.

Then you take a Perl script that takes your photos and creates thumbnails of them and combines them with the track-.kml file to create a .kmz file that you can use in Google Earth! Best of all is you can run it on your desktop-system (Win,*n%x, Mac) as the tool stores just the relative path to the pics in the .kmz.

I guess this should be quite easy to integrate into Gallery. Hopefully SiliconFiend steps by here and can give us some hints?

Right now I don't have the magazine with me and I don't remeber the script's name. But I will post it later.

rgds/oceco

Login or register to post comments
oceco

Joined: 2007-10-22
Posts: 137
Posted: Thu, 2008-03-13 01:12

As promised in my last post here the missing part:

Windows user most likely will need a free ActivePerl distribution (usually available on Linux and MAC systems)

the a script geotag.tl actually needs a lot of Perl-modules:

XML::Simple, Carp, DateTime, DateTime::Format::Duration, DateTime::Format::Strptime, Math::Trig, Getopt::Long, Archive::Zip, Image::ExifTool, Image::Thumbnail, Term::ReadKey and Config::Auto

geotag.pl \                                                   
  --imgdir=...???\photos_dir\                         <!-- directory with not geo-tagged photos
  --gpsfile=C:\track_dir\track_filename.gpx \         <!-- GPS track file
  --kmzfile=C:\dir\filename.kmz \                     <!-- output file for GE
  --description="honeymoon" \                         <!-- discription for GE
  --thumbdir=C:\temp\thumbs \                                <!-- 
  --createthumbnails \                                       <!-- make thumbnails for infowindows
  --maxdim=320 \                                      <!-- width/height in px for thumbnails
  --toffset=+2:00:00                                  <!-- will add 2 hrs to the timestamp in the .jpg files

with that you'll get a .kmz-file for Google Earth to display. It includes the track and the images for the infowindows. That looks quite easy to implement so far. I guess the only new variable is the .gpx-file.

So and now I'm at the point where I would need to study the current implementation (I doubt that I will succeed in that) as well what geotag.pl actually is doing (I don't know if the original photos are geo-tagged then or if that information is just in the .kmz

Just my 2 cents. Any comment?

Thanks/oceco

Login or register to post comments
SiliconFiend
SiliconFiend's picture

Joined: 2006-12-27
Posts: 355
Posted: Wed, 2008-03-12 16:47

Actually, one of the features I'd like to add to the map module is the ability to upload a KML file to be displayed on the map (and possibly merged with the Google Earth output). That would let you show a GPS track or custom points or whatever is supported by KML. Sorry development on the map module has been stagnant lately--I've been focusing more on finding new stable employment.

Login or register to post comments
brodieboy

Joined: 2008-05-05
Posts: 1
Posted: Mon, 2008-05-05 03:46

This isn't perfect - the track KML file and the photo KML file are two separate things in your album - but one way to do this with the current Map module and Gallery 2 is as follows:

  • Set up the MIME type module (in Site Admin) if it isn't installed and activated already:
    • Plugins, Extra Data, MIME Maintenance
  • Set up MIME types for KML and KMZ files via MIME Types (in the 'Extra Data' Section)
    • If your site is only going to contain either KML or KMZ files but not both, then just set up the MIME type for the one kind of file you want to support. KMZ (compressed) files are quite a bit smaller than KML (uncompressed) files
    • Add two new MIME types, using the 'Add New MIME Type' button. As per http://earth.google.com/support/bin/answer.py?hl=en&answer=25094, create two entries:
      • Set MIME Type of 'application/vnd.google-earth.kml+xml', check off the 'Viewable?' checkbox, extension kml (note that the extension is 'kml', not '.kml')
      • Set MIME Type of 'application/vnd.google-earth.kmz', check off the 'Viewable?' checkbox, extension kmz (note that the extension is 'kmz', not '.kmz')
  • Create your KML or KMZ files. If you just want a GPS track, the easiest way is to
    • save your GPS data in GPX format either directly from your GPS software (MapSource from Garmin, etc.) or via something like gpsbabel
    • load it into Google Earth (File, Open, and then pick the 'Gps' file type category)
    • that should create a 'GPS Device' entry in your Google Earth 'Temporary Places' section
    • right click on 'GPS Device' and save it as a KML (uncompressed) or KMZ (compressed) file
    • you can also add other information to the 'GPS Device' data if you wish, but not your photos - the Gallery2 Map module handles those via the 'View in Google Earth' link
  • Upload your KML or KMZ files.
    • NOTE that I seem to have to set up the MIME types BEFORE uploading or else the previously uploaded files don't seem to have the new MIME types applied to them.
    • take a snapshot of the track in Google Earth and set that as a thumbnail if desired.

This should give you a new item on your album page for the KML/KMZ file. Click on that and then on 'Download file' and it should open in Google Earth. You can then use the Map module's 'View in Google Earth' link to open up the KML file for the images in the album and those will (hopefully) display alongside the track.

Login or register to post comments