Announce : GPS / Google Earth module
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
I've written a module that nearly all GPSr owners will surely find very handy. I've published most of the things you need to know at I'd like someone can help me to fix the bugs / make the module more robust. The biggest problem is that the Google Earth output is generated using a 'Controller', so main.php then adds some extra text to the end of the file and Google Earth does not like that. *fixed* The other problem is that the Exif module generates the timestamps of the photos with the timezone of the server. There's code to change it to the timezone of the photographer, but I'm not sure that it will always work. I see there's another module that works with Google Maps. I haven't looked at it because I don't use GM (bandwith and coverage issues). There are also too many posts for me to easily find out what's the module all about. So please tell me if this module is obsolete. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
cool |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Hmmm I have been working on getting a GPS module working for a long while now and have been adding feature to a first implementation by Steven N. Severinghaus. It's now version 0.4 and has some basic features I'll be happy to test out a google earth implementation as well but I haven't got a GPS device beside in my car the other GPS module is here: http://gallery.menalto.com/node/32642 See you! ------------------------- |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
I've just installed the map module (0.4.0c). And I made the changes to the theme. I can pick the location of a photo on the map. But when I go back to the normal view of the photo, there is no way to quickly go back to the map. Is there something wrong ? Both the Gallery and test.jpg has coordinates. http://www.rational.co.za/gallery2/main.php I think the 2 modules should be compatible and not overlap. To do this, I'll need to know how 'map' stores and retrieves the location (and zoom level). Then 'gps' can fill it in when it processes the tracklog. As soon as I'm done with the my to do list, the modules can merge. |
|
djrm2
![]()
Joined: 2005-10-04
Posts: 54 |
![]() |
nicroets wrote:
I've written a module that nearly all GPSr owners will surely find very handy. I will certainly find it useful, it is just the kind of feature which I would like to see being incorporated into the GooglMap module. When trying the GPS module it took me a while to figure the format needed for the timezone offsets - some instructions on the page would have been useful. It would be very handy if gpsbabel could be included to run on the server so the user only has to upload the GPS tracklog in its native format. I dont know how the module works but I expect it tries to match data/time with locatation, when it has a match then the location could be written back to the photo into its exif tags or custom properties. hth Dave. |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
gpsbabel cannot become part of the standard module. It's in C and many PHP hosts does not allow access to the compiler. |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
It's done. The export function will now also set the 'GPS' field of all the photos. Then the photos appear on 'map.ShowMap'. Permissions are not checked ! Version number is still 0.1.0 |
|
djrm2
![]()
Joined: 2005-10-04
Posts: 54 |
![]() |
I am trying to use the gps module but first need to convert my track log. The instructions on the wiki suggest i that I use the gpsbabel custom conversion, yet I see no mention of this in the format supported. is it the gpsbabel arc filter file, I cant make it work with that. Please help, Dave. edit I think you must mean custom CSV format, is that right? I still get no output coordinates in the php. This is the problem, All my tracks are saved in Ozi .plt format. I need to convert them into the correct format for gps module but I cannot find settings which work. I have no problem using oziphototool. The generated php file imports into GoogleEarth with filename changed from .php to .kml it is just the location data missing. Please show me an example of a correctly formatted track file to upload. Regards, Dave. |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
It seems as if the GUI does not support the custom CSV file type. Type It's text and below is an example line. The module only uses the 3rd, 5th and 21st fields. CONSTANT,2,-25.771250,S,28.302283,E,Flag,003,,,"",,1414.454834M,4640.543419F,25.771250/S,28.302283/E,S/25.771250,E/28.302283,-2147483648,1910066888,0,25569.000000 |
|
djrm2
![]()
Joined: 2005-10-04
Posts: 54 |
![]() |
By my counting the 21st field in the example you gave is 0. Using this incantation worked to convert my ozi plots |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
Here's better one. It's the time in C's time() format. CONSTANT,118,-25.774956,S,28.277736,E,,RPT020,RPT020,,"",,1370.015869M,4494.748063F,25.774956/S,28.277736/E,S/25.774956,E/28.277736,-2147483648,1910272808,1121003393,38543.576308 |
|
djrm2
![]()
Joined: 2005-10-04
Posts: 54 |
![]() |
If I use gps module to export a goole earth file from ie everything is fine and a main.kml file is produced which can be directeley opened. I tried the updated module but it bombed out giving errors instead of exporting anything, I'll try again and save the output, edit, This is the content of the export: <?xml version="1.0" encoding="UTF-8"?> The reason seems to be because there is no modules/map/classes/mapHelper.class file on my system I have now got GoogleMap module and GPS module working nicely togeather, thanks to all concerned. All I want now is the ability to overlay the GPS track onto the map ... Dave |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
The new version requires the 'map' module. |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
gpsbabel is supposed to be able to convert the track to GE format, but last time I tested this the results were disappointing. If it is still the case, I'm sure I can do a better job inside the gps module. |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Hello, Just because I add some time in my hands I created a little icon that can be used for the -Export to GE- link You just need to put it in gallery2/modules/icons/iconpacks/nameofthepackyouuse/ and then in the same folder there, just edit icon.css and icon-rtl.css: icon.css .gbLink-gps_GoogleEarthAlbum { background: url(GoogleEarth.gif) left center no-repeat; } icon-rtl.css .gbLink-gps_GoogleEarthAlbum { background: url(GoogleEarth.gif) right center no-repeat; }
That's it ! ------------------------- |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
I've tried it, but none of my icons work. I think you mean icons.css and icons-rtl.css |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
O yeah I do mean those files with an "s" at the end. sorry about that ------------------------- |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Do you think it would make sense to merge the two module (map and gps) ? Or is that not really needed at this point ? I guess they should be able to coexist nicely and ppl would have a complete GPS solution for Gallery without installing 2 modules ... Just a thought. Also, I put a link to your module (it's great btw - lovin' it even without the GPS device) on the wiki that I started so that people can get this great feature as well See you ------------------------- |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
I think it makes sense to merge the two because : List of changes needed to 'gps' module: I added everything to 'gps' that I wanted to. |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
OK. I'd most of the clean up. The geourl-tags code is now Gallery2 compliant. So I upped the version to 0.2.0 I can't wait to go on a long trip to see how things work out ! |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Lol I know how you feel I'm gonna be working on integrating the two today or tomorrow and make a new release of the "map-gps" module thx :D |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
I removed the unused GeourlTemplateAdapter class (+glue) and changed the Google Earth code to output camera icons which are slightly more appropriate (<Style>,<StyleUrl> and <IconStyle> tags). What I did today : http://bbs.keyhole.com/ubb/showflat.php/Cat/0/Number/27572/an//page//vc/1 |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Hello Nic, I have achieve the integration of the GPS mmodule into the map module. It actually wasn't very difficult and it stays pretty independant. I don't have a tracklog file to try it out so I hope it works fine ------------------------- |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
I've tested everything except the pings to geourl / a2b.cc. Looks good ! I have 119 photos on my default map (total of 180 with coordinates) so the markers take some time to load. I cann't figure out why it takes so long. http://www.rational.co.za/gallery2/main.php?g2_view=map.ShowMap |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
nicroets wrote:
I've tested everything except the pings to geourl / a2b.cc. Looks good ! If you are using IE, it's normal. A dude in the dev team has added a fix for the tranparency that helps IE displaying PNG correctly but for some reason it's extremely slow .... |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
I've made an offline version of the software that does not require Gallery. It runs as a gpsbabel extension. The details are at |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
Google Earth has updated their database and any member of the public who looks at Pretoria with the Google Earth Community and / or Unranked layer enabled will see them. Unfortunely, Google changed all the '&' into '&' somewhere along the process and Gallery does not expect this. I patched my Gallery installation to cope : In modules/core/classes/GalleryUtilities.class near line 931 I added 5 lines (indicted with +) : |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
nicroets wrote:
Google Earth has updated their database and any member of the public who looks at Pretoria with the Google Earth Community and / or Unranked layer enabled will see them. hello, I'd like to see if I need this change also |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
Ok. If you view the earth with Google Earth, you will see lots of "Placemarks" or waypoints. Some of them were extracted from posts made at bbs.keyhole.com. The last time this extraction happened was on 13 December. If you click on one of the placemarks made with my software, you will see a link to the post, as well as a placeholder for a thumbnail. Let's ignore the first problem, namely that the thumbnail does not load, and concentrate on what happens that when you click on the thumbnail. You would expect your webbrowser to open and go to the correct gallery photo. But instead the URL contains an extra 'amp;' after the '&'. This was added during the extraction process and the original posting still works perfectly. I've posted a bug report on the bbs, so it should not happen during the next extraction which should be in January. In the mean time I changed my gallery installation to be a bit more forgiving. I looked at my weblog and saw that Google Earth is not the only sinner. Since not properly written application will have a variable name that starts with 'amp;', there are IMHO only benefits in removing any additional 'amp;'s from a URL. PS: It should be |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Thanks for the clarification, It all makes sense now I will refer this post in the other thread so that user's can change their gallery as well to get that fixed up Thanks again |
|
briefnotion
Joined: 2006-06-02
Posts: 2 |
![]() |
I created a GPSR program that creates a live path in Google Earth here, http://briefnotion.250free.com/ Time stamp info is not being record in the KML but in the the nmea data file. Would it help if I place timestamp info in the kml file? |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
I'd say yes. It's always a good idea to record as much information as possible. Note however that the gallery module discussed here does not read kml files. It only reads the 'custom' format created by gpsbabel.org. It's a comma seperated text format, so changing your software to output it will as easy as writing 5 lines of code. -- |
|
briefnotion
Joined: 2006-06-02
Posts: 2 |
![]() |
I took a good look at the custom fields generated by gpsbabel. The format seems simple enough: two header lines, CONSTANT, index, Lat, Lon, Lat ,Lon, more info, ... ALT and such. The fields at the end of line is unknown and so is a few in the middle. CommTest2 could easly output most of the data into a seperate log file, while running. Its just that I wasn't successful at installing Gallery/Google Earth Module, no web server up and running, so testing here wouldnt be possible. I would be glad to generate the code if you think is would be useful. I cant test the data though. |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
I can give you an account on my gallery installation for testing purposed. Or you can send me the data. Just mail me at nroets@gmail.comPerhaps you should explain what you want to achieve. If your photo collection is private, you can create a kml file with references to your harddrive. Such a kml file can be created with a patched version of gpsbabel (see the wiki mentioned earlier). That version of gpsbabel should be able to read nmea data file, if I'm not mistaken. |
|
eye1marie
Joined: 2006-05-21
Posts: 13 |
![]() |
nicroets wrote:
Ok. If you view the earth with Google Earth, you will see lots of "Placemarks" or wayoints. Some of them were extracted from posts made at bbs.keyhole.com. The last time this extraction happened was on 13 December. If you click on one of the placemarks made with my software, you will see a link to the post, as well as a placeholder for a thumbnail. Very handy information to combine it with Google Earth. A client of my wanted that too, but i told him he couldnt... so things change now. Damn i love this forum! |
|
swissphoenix
Joined: 2004-09-10
Posts: 12 |
![]() |
are there any news about this modul |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
The functionality of this module is part of the Google Maps module now and some improvement are being made for an upcoming release. See you ! The Termite - |
|
caddymob
![]()
Joined: 2007-01-30
Posts: 82 |
![]() |
Hmmm, doesn't seem to work for me... I have just upgraded to Gallery 2.2 - Gallery version = 2.2 core 1.2.0 Anyway, I looked at the gpsbabel output and it seems to have converted my tracklog correctly- here is the top of the converted file: (full file attached, but changed extension to .txt so it would upload) <?xml version="1.0" encoding="UTF-8"?> When I do the 'Export to GE' - GoogleEarth (Plus, v4.0.2722) opens and shows nothing. When I look at the EXIF data for the photos, no coordinates. Am I doing something wrong here? Would love to get this working, any help would be much appreciated!! J |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
The module, as I wrote it, only accepted the tracklog in the "custom" format, which is a CSV format with 22 odd columns. (see the wiki) Your file is in GPX format, which has become quite popular, but not supported by the module I wrote. |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
The module, as I wrote it, only accepted the tracklog in the "custom" format, which is a CSV format with 22 odd columns. (see the wiki) Your file is in GPX format, which has become quite popular, but not supported by the module I wrote. |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
The module, as I wrote it, only accepted the tracklog in the "custom" format, which is a CSV format with 22 odd columns. (see the wiki) Your file is in GPX format, which has become quite popular, but not supported by the module I wrote. |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
The module, as I wrote it, only accepted the tracklog in the "custom" format, which is a CSV format with 22 odd columns. (see the wiki) Your file is in GPX format, which has become quite popular, but not supported by the module I wrote. |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
And the module that nicroets wrote wasn't modified much yet ... so it would probably only support that format still GPX format support is something we're envisionning for the map module soon but not for the next release. ------------------------- |
|
caddymob
![]()
Joined: 2007-01-30
Posts: 82 |
![]() |
OOOOOPS!!! I attached the wrong version, my apologies guys! So, attached is the real 'custom' version, and I still have the same problem- It does nothing when I export to GoogleEarth. I looked at the main.php.kml file and it is 194 KB. I have attached it as well as the real fish.custom. Again, I have added a .txt extension so that I could upload. Again, thanks for your help~ |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
The main.php.kml is supposed to contain one placemark for each photo in the ALBUM. But since it's empty it means that you either ran the export on an empty album or the module wasn't able to extract the data it needs (i.e. the timestamp, the thumbnail location and the photo location) from any of them. |
|
caddymob
![]()
Joined: 2007-01-30
Posts: 82 |
![]() |
Guys, I just cannot get this to work, and I don't know why. I just did a test walking around my house, shooting photos, GPS in hand. I took pics of my GPS to show that indeed the times are sync'd. The photos are on my gallery at: http://corneveaux.com/gallery2/v/GPS_TEST/ When I do Export to GoogleEarth, I get the same result, an empty main.php.kml file. <?xml version="1.0" encoding="UTF-8"?> I will again attach the .custom GPS tracks with a .txt extension. I really appreciate your help on this. If this works, it will be one of the coolest gizmos out there. |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
I downloaded your files and uploaded them onto my own server at http://www.rational.co.za/gallery2/main.php?g2_view=core.ShowItem&g2_itemId=2590 I'll just mention that your server is configured to use short URLs and I haven't tested that configuration. |
|
caddymob
![]()
Joined: 2007-01-30
Posts: 82 |
![]() |
Nic-- Thanks so much for looking into this!! I think I have found a work around that will solve this for me, but I'd like to provide you with some more information in case it is beneficial to you and the module. I have attached a google earth screen shot that compares your main.kml coordinates to the ones generated for the same photos/tracks using WWMX and picasa. As you can see, your file shows the pics at basically the same location, while the WWMX/Picasa shows more precisely where the photos were taken. I am sure if I had more of a distance on my test your script would resolve this-- not a big deal, but thought you might like to see.. I actually really like the WWMX tool because it geotags my photos before I upload them and does so from the original GPS tracklog (using .GPX format)--- no gpsbable needed. Gpsbable is a great tool, but I wonder if you loose fidelity when making conversions? I have also attached the Picasa generated .KMZ file so you can see the coordinates it called-- they are indeed correct, or very very close to correct. I'm sure if I further synched my GPS and Camera times, it would be even better. Anyway, let me know if you need more information.... Now I need to get the EXIF stuff to be reconized in Gallery2.2 ... J |
|
nicroets
Joined: 2005-11-07
Posts: 28 |
![]() |
I redid the export with -7:00 and got exactly the same result as picasa (attached). Regarding fidelity : The error when converting between GPX, custom and geotags is very small compared to the error in the original GPS signal. (After playing with this software) -> Zanzibar ! Soon ! Cool ! |
|
caddymob
![]()
Joined: 2007-01-30
Posts: 82 |
![]() |
Awesome! So then, my problem is short URLs - (I have been doing -7:00)? Anyway to make the GPSr module allow them? And what is this Zanzibar? Can you provide a link?? I couldn't find it, whatever it is.... |
|
caddymob
![]()
Joined: 2007-01-30
Posts: 82 |
![]() |
Well, is it short URLs? I just deactivated them, created a new album, uploaded the original pics, custom track log, and again got a blank main.php.kml -- Is it something with gallery2.2 ? Are you using that? Maybe the google maps module? I have 0.5.1d. |
|