It _should_ automatically select a starting zoom level that displays everything on the current map. Is it not doing that? If it's not auto-zooming properly, what map type are you using, and would it be possible to get a link to an album that's not zooming correctly?
Look at the link below, choosing an album map it shows the map with the highest zoom level. But... at this zoom level now pictures are availabble, only if i reduce the zoom a little bit.
I try the last git release but it seems doesn't work (especialy the link to the complete map)
tsjolshagen
Joined: 2010-01-28
Posts: 8
Posted: Tue, 2010-03-30 03:13
Running the maintenance action "Extract EXIF GPS data" fails with "Function eregi() is deprecated" on my Fedora 12 (PHP 5.3) based system. Need to replace eregi() calls in modules/exif/lib/exif.php with preg_match() calls and the 'i' modifier for case insensitivity.
I have no clue whether that will break something else or not...
My patch, which fixes the problem on my system, is attached.
hth,
// Thomas
rWatcher
Joined: 2005-09-06
Posts: 722
Posted: Wed, 2010-04-07 22:54
Serge D wrote:
@rWatcher:
Quote:
toolbar area
icon area just above sidebar next to slideshow. Do not like drop-down menu area, because I consider it an admin option .
Done: Added two icons, one for mapping the album and one for mapping the user. Both can be individually turned on/off from the admin screen.
Serge D wrote:
Quote:
I can change it to match the actual map labels, that's not a problem
It would be great, then it would be more transparent of what to use.
Done.
CaptainRudi wrote:
I would think it would be great whatsoever if we could have the map at the album level in the sidebar like picasaweb does ...
Done: If no other coordinates are available, and the map type is set to interactive then the contents of the album will be mapped instead of hiding the map sidebar.
huebi wrote:
Look at the link below, choosing an album map it shows the map with the highest zoom level. But... at this zoom level now pictures are availabble, only if i reduce the zoom a little bit.
I've been unable to come up with a way to detect if satellite imagery is available at the current zoom level. What I've done is added an option to the admin screen called "Maximum Auto-Zoom Level:" -- if this is set, the maps will not auto-zoom past this level. So if you know that satellite imagery is not available any higher then a zoom level of 18, you can type that in and a level of 19 or higher will never be used for a starting zoom.
dreamkiller wrote:
Hi, nice work rWatcher.
I try the last git release but it seems doesn't work (especialy the link to the complete map)
I've only tested it against RC-1, so it's possible something could have changed to break this module. What's happening when you try and use it?
tsjolshagen wrote:
Running the maintenance action "Extract EXIF GPS data" fails with "Function eregi() is deprecated" on my Fedora 12 (PHP 5.3) based system. Need to replace eregi() calls in modules/exif/lib/exif.php with preg_match() calls and the 'i' modifier for case insensitivity.
I have no clue whether that will break something else or not...
My patch, which fixes the problem on my system, is attached.
hth,
// Thomas
That sounds like an issue with the EXIF module itself. You can file a bug report for that at http://sourceforge.net/apps/trac/gallery so the gallery dev's can look into it.
huebi
Joined: 2008-03-03
Posts: 63
Posted: Fri, 2010-04-02 15:17
Thx for implementing the max zoom level, works great. But Map this Album now schows a blank screen.
This appears to be a compatibility issue with the Gray Dragon theme. It works fine with Wind. I'm looking into it to see if it's something I can fix.
The problem doesn't appear to be on my end. I've also noticed that this isn't the only module not working. For example, I get a blank screen when clicking on a tag too.
huebi
Joined: 2008-03-03
Posts: 63
Posted: Fri, 2010-04-02 18:52
AFAIR there were no problems with the previous version of grey dragon. I will inform Serge, maybe he can find out something.
there is a problem with the module
when showing exif_gps/map/album/1 and there are sideblocks (I have seen it with exif_gps_location, but it could be any other which work with item related stuff, my guess), sideblock creation crashes.
my theme seems to react more sensitivelly then wind theme, but wind crashes as well, it is just less visible
rWatcher
Joined: 2005-09-06
Posts: 722
Posted: Thu, 2011-02-03 04:27
Serge D wrote:
there is a problem with the module
when showing exif_gps/map/album/1 and there are sideblocks (I have seen it with exif_gps_location, but it could be any other which work with item related stuff, my guess), sideblock creation crashes.
my theme seems to react more sensitivelly then wind theme, but wind crashes as well, it is just less visible
Apparently, if you call "if ($theme->item->is_album())" from a dynamic page, it crashes that pages sidebar... Fixed.
Serge D
Joined: 2009-06-11
Posts: 2466
Posted: Wed, 2010-04-07 23:30
yes, because there is no item()
you have to do
if (($theme->item) and ($theme->item->is_album()))
CaptainRudi
Joined: 2006-07-06
Posts: 16
Posted: Tue, 2010-04-20 10:20
Hi,
thanks for your continues effort ! I appreciate that highly !
However, may I kindly ask which version now is the latest working one?
I had some issues with the location part of the sidebar and all those zips confused me.
Is the latest one a complete one? Or just a fix to be installed over the zip before ?
Serge D
Joined: 2009-06-11
Posts: 2466
Posted: Tue, 2010-04-20 15:49
Feature request - I do not know if it even possible, but
treat point on the map as a tag
when map is displayed in albums several locations are displayed. it would be nice if clicking the location would navigate to the page with all photos for the click.
sddroog
Joined: 2005-02-01
Posts: 132
Posted: Thu, 2010-08-05 13:32
I am using this module for some time now, it is really great. But the more photos I add with gps location, the slower it gets. Especially in the root of Gallery, it is getting to slow.
Perhaps an idea; isn't is possible to only use the GPS info from the albums when browsing through the Gallery albums? And only use the photo GPS info when viewing a photo?
xmod
Joined: 2010-10-08
Posts: 21
Posted: Sun, 2010-10-10 09:19
First of all, hi to all!
...And thank you for such a great piece of software like gallery3 and for the very cool gps module!
Having used gallery2 for a long time with the gps/map module, I changed to gallery3 some days ago and would like to post a feature request for the exif_gps module:
The map module of gallery2 (http://codex.gallery2.org/Gallery2:Modules:Map:UserGuide) had a great little button "get via map" (see:http://codex.gallery2.org/File:Admin.JPG)
Using that button, a google map opened in a new window so you where able to get a postition (latitude+logitute) to the gps text field just by choosing it with your mouse on the map. It would be great to implement that feature also for the exif_gps module of gallery3.
There were also some other nice features like choosing different marker colors depending on item or album (http://codex.gallery2.org/File:MarkerManagement.jpg). Maybe it's kind of easy to implement that too.
By the way: at the moment I am working on a new module for gallery3. Can someone tell me where to put that into web/publish it best and how to start a discussion and feedback about the module?
Best regards!
CaptainRudi
Joined: 2006-07-06
Posts: 16
Posted: Wed, 2010-10-13 08:48
sddroog wrote:
I am using this module for some time now, it is really great. But the more photos I add with gps location, the slower it gets. Especially in the root of Gallery, it is getting to slow.
Perhaps an idea; isn't is possible to only use the GPS info from the albums when browsing through the Gallery albums? And only use the photo GPS info when viewing a photo?
This would be really helpful, however I guess in the current modus operandi of this module this is not possible. There would be the need to determine some kind of a center of all pictures in the album to be displayed at the "root level" I guess. Something like a fixed location for each album. But a features like this would be helpful if using large numbers of pictures.
exDfg
Joined: 2009-06-09
Posts: 39
Posted: Fri, 2010-11-12 21:47
Hello rWatcher,
Thank you so much. This module works perfectly with my geotagged photos.
There is only one glitch on the code: if you use SSL on your gallery, it will break the security status since it checks for http://www.google instead of httpS://www.google.
I wonder if you can correct this.
Thank you so much.
exDfg
Joined: 2009-06-09
Posts: 39
Posted: Mon, 2010-11-15 01:04
Hi, I was playing around and the best way to do this if you dont have Premium API (most of us) is to use a frame or other mapping software. Some users said it worked. Could you implement it?
Thank you so much!
StevePER
Joined: 2010-10-31
Posts: 3
Posted: Mon, 2010-11-15 04:25
Hi, I really like this module and think it looks fantastic. One minor improvement I would like is that the title on the "Map this album" page should be the title of the album, not the name from the directory structure.
I am using this module for some time now, it is really great. But the more photos I add with gps location, the slower it gets. Especially in the root of Gallery, it is getting to slow.
Perhaps an idea; isn't is possible to only use the GPS info from the albums when browsing through the Gallery albums? And only use the photo GPS info when viewing a photo?
Same problem here...maybe I have a suggestion to fix this: within a folder only the pictures directly within that folder and the coordinates of all the subfolders should be shown. This means that one has to (manually) set the coordinates also for the folders, but then the load for the page would be much lighter.
So for instance, with such a structure of the album:
On the root folder map only the coordinates of Folder1, Folder1.1, Folder1.1.1, Folder2, Pic0.1 and Pic0.2 should be displayed
Once inside Folder1 the map should display only Folder 1.1, Folder1.1.1 and Pic1.1
I don't know if this is feasible, but it would be great!
StevePER
Joined: 2010-10-31
Posts: 3
Posted: Mon, 2010-11-29 12:27
Me too, I think a smarter solution would be that if an album has a location then don't recurse into that album, otherwise continue like it does now. I've had a quick look at the code but can't get anywhere with it, PHP is not my forte.
milliondollar
Joined: 2010-12-09
Posts: 18
Posted: Sun, 2010-12-12 15:08
All my photos is GPS tagged & I think it will an issue to me also when I start to put in more photos. I hope rWatcher can take a look at this issues. I am not expect in PHP too. Small modification I can do but not full module like this.
_____________________________________________________
Cheers!
Visit my Travel Photo Gallery!
mr_hyde
Joined: 2009-09-20
Posts: 46
Posted: Sun, 2010-12-12 17:22
Hi,
have similar issues and removed the map from the sidebar. Just leave map album function so far.
Maybe it would be also an option to "cluster" the gps info and ascribe it to albums. This would mean you need the possibility to have more than one gps location for an album.
Clustering would mean
- take one GPS location
- search for adjacent locations. if they are within a predefined radius, they belong to the "cluster"
- proceed as long as no further gps locations within the distance of this cluster. Then ascribe a center gps value to this cluster and set it for he album.
- there might be more clusters for one album. however, the number of gps locations to be displayed for albums would be lower than that for individual locations
- display individual locations only on album level
milliondollar
Joined: 2010-12-09
Posts: 18
Posted: Sun, 2010-12-12 17:31
mr_hyde,
Do you mean you disable map sidebar for root of the gallery but enable it in each album? This is a good option to speed up page root page loading. How do you do that? Mind to share?
_____________________________________________________
Cheers!
Visit my Travel Photo Gallery!
mr_hyde
Joined: 2009-09-20
Posts: 46
Posted: Sun, 2010-12-12 17:38
Milliondollar,
not exactly.
I disabled the option in the sidebar but have the option "map this album" which you can do at every level (outside or inside an album)
It is at least an option.
mr_hyde
Joined: 2009-09-20
Posts: 46
Posted: Wed, 2010-12-15 16:28
Hi,
I played a little bit around and it seems to be that I have found at least something that seems to work.
I have added a check if the current album has subalbums. The GPS map in the sidebar will be only displayed if the album has no subalbums. You will see this map consequently only on pure albums and images. however, there is some interaction with the map this album function. As soon as i fugured this out, i will follow up and share the code.
mr_hyde
Joined: 2009-09-20
Posts: 46
Posted: Wed, 2010-12-15 21:54
Guess i have found the problem and now it works for me:
I have added the following lines to exif_gps_block.php in ../modules/exif_gps/helpers/
$item = $theme->item;
if (($theme->item) and ($theme->item->is_album())){
$album_id = $item->id;
$album_items_count = ORM::factory("item", $album_id)
->where("type", "=", "album")
->descendants_count();
if (($album_items_count > 0)){
break;}
}
just below:
case "exif_gps_location":
// Look for coordinates to display.
$latitude = "";
$longitude = "";
Sidebar gps info is displayed now only in albums without sub albums and for images itself which improves the overall speed.
milliondollar
Joined: 2010-12-09
Posts: 18
Posted: Thu, 2010-12-23 08:35
Great mr_hyde,
Any idea how to disable at the root only? I really have no idea on how to modify the code.
I think, a better trade off is to display the static image at the sidebar. Unfortunately, the function is not working.
_____________________________________________________
Cheers!
Visit my Travel Photo Gallery!
mr_hyde
Joined: 2009-09-20
Posts: 46
Posted: Thu, 2010-12-23 18:05
What exactly do you mean?
Disable the functionality of displaying the gps info only on the root page?
This should be possible. However, it might still slowdown everything.
milliondollar
Joined: 2010-12-09
Posts: 18
Posted: Fri, 2010-12-24 15:30
There are 2 thing here,
1. Regarding your modified code, how to just disable the map sidebar just in the main page (root)
2. There is option in EXIF_GPS menu to display static image map instead of interactive. I think static image will reduce loading time. Unfortunately, the option is not working.
_____________________________________________________
Cheers!
Visit my Travel Photos Gallery!
mr_hyde
Joined: 2009-09-20
Posts: 46
Posted: Sun, 2010-12-26 19:16
milliondollar wrote:
1. Regarding your modified code, how to just disable the map sidebar just in the main page (root)
At least for your first question the following code should work. GPS info is not displayed on the root page but on all other pages
$item = $theme->item;
if (($theme->item) and ($theme->item->is_album())){
if (($item->id == 1)){
break;
}}
f4814n
Joined: 2010-12-27
Posts: 3
Posted: Mon, 2010-12-27 17:41
Hello rWatcher,
I had problems with running the maintenance task. Unfortunately the task did never end successfully. The behavior seemed to be random but at least I found the reason.
The task remembers the last item id, and continues every run with the next 100 items. But in my case the ids where not in one sequence (why should the query be sorted by id??) and therefore I add a order by to the query.
// Check each photo in the array to see if it already has exif gps data associated with it.
// If it doesn't, attempt to extract gps coordinates.
foreach (ORM::factory("item")
->where("id", ">", $last_id)
->where("type", "=", "photo")
->order_by("id")
->find_all(100) as $item) {
Thanks for posting that. I had the same problem and this fixed it.
--
Everything is wonderful until you know something about it.
StevePER
Joined: 2010-10-31
Posts: 3
Posted: Sat, 2011-01-08 07:00
I've made a few changes to improve this module for my site:
1. In exif_gps.php, I changed $curr_album[0]->name to $curr_album[0]->title. This makes it display the name of the album correctly when you do "map this album".
2. In exif_gps_block.php line 133, I changed descendents() to children() so that an album's map doesn't recurse through all sub-albums, so it's no longer really slow with lots of photos.
3. In exif_gps_block.php line 108, I added && (!$theme->item->is_album()) so that the map for an album will still include all the items in the album, even if the album itself has a lat/long value.
webbpinner
Joined: 2011-01-09
Posts: 4
Posted: Sun, 2011-01-09 20:52
rWatcher,
This is a great module for G3 and it was one of the reasons I chose G3 over other options. I'm working on a G3 site related to deep-water (1000-6000m) oceanographic exploration. It would be extremely useful if exif_gps could be enhanced to do the following five things:
1. Extract and process the GPSAltitude and the GPSAltitudeRef tags
For my audience, depth is VERY important but my hope would be this feature would be useful to the larger exif_gps audience given the number of GPS-enabled cameras that are starting to support altitude.
2. Extract and process the GPSImgDirection and the GPSImgDirectionRef tags
I doubt adding this feature would help the majority of the exif_gps community but again would be very useful to my audience given they typically like to know which direction the vehicle was facing when the picture was taken.
3. Display Latitude, Longitude, Altitude and Heading in the "Location" sidebar
The Google Map displayed in the sidebar is very useful on my personnel gallery page where the pictures are taken over land but it's not as useful for the underwater images I upload. Almost all of these sidebar maps appear as a single point in the middle of the water with no landmass in view. What would be more useful would be to have the sidebar display the lat,lon,alt and heading as numerical values.
4. In the sidebar, label the GPSAltitude value as "Altitude" when GPSAltitudeRef=00 and "Depth" when GPSAltitudeRef=01
5. Add the ability in the EXIF_GPS Settings page to show only the Map, only the numerical data or both in the sidebar. (I was envisioning 3 radio buttons)
I tried to make the changes to the module myself but once I realized it required changing the DB schema I figured it was time to put in a feature request to the developer.
Thanks again and regardless of if you can help me with this, EXIF_GPS was a great addition to G3.
-W
k0be
Joined: 2010-05-26
Posts: 11
Posted: Wed, 2011-01-12 16:41
StevePER wrote:
I've made a few changes to improve this module for my site:
1. In exif_gps.php, I changed $curr_album[0]->name to $curr_album[0]->title. This makes it display the name of the album correctly when you do "map this album".
2. In exif_gps_block.php line 133, I changed descendents() to children() so that an album's map doesn't recurse through all sub-albums, so it's no longer really slow with lots of photos.
3. In exif_gps_block.php line 108, I added && (!$theme->item->is_album()) so that the map for an album will still include all the items in the album, even if the album itself has a lat/long value.
Hi! I've tried out your modifications and yep, they work fine! There's just a small thing missing (for my particular need): I don't get the dots on the map of subfolders (sub-albums).
Could you please write a code so that:
IF item is album AND item is descendent, THEN show coordinates
Is it possible to have a button next to the longitude and latitude boxes that opens up a google map and lets you search for a location, then when you click a point in the map it uses that to calculate long and lat and to fill in the boxes rather than having to go elsewhere to look them up, and then copying and pasting back into the boxes.
Anyone willing to take care of this orphan module?
webbpinner
Joined: 2011-01-09
Posts: 4
Posted: Wed, 2011-01-26 20:26
Given k0be's comment I decided not to wait for rWatcher to respond and have started to dig into the code myself.
Progress made:
- installer script add two new fields to exif_coordinates table (altitude, direction)
- "EXIF_GPS Settings" page displays checkboxes under "Sidebar Settings" for "Show Map" and "Show Coordinates", these vars (toolbar_map_display, toolbar_coord_display) are correctly stored in the database
- "Edit Photo" dialog box displays additional textfields for altitude and direction. Manually adding values to these fields get correctly stored in the database.
Problems encountered:
- I'm having trouble extracting the altitude and direction information when the photos are uploaded. Uploading a file registers an error but I can't see what the error is. Also there is an error, the lat,lon still get correctly set, just not the altitude and direction.
- When I run the "Extract Exif GPS data" maintenance task, the job stalls on the first image but just like the uploading file error the job correctly extracts the lat,lon but not the altitude, direction.
Left to Do:
- Use the toolbar_map_display, toolbar_coord_display variables to correctly show the map and/or coordinates in the sidebar
- Figure out why I can't extract the altitude and direction directly from the images.
I've never programmed in python so can someone please tell help me figure out what I'm doing wrong?
Here is the original code for extracting lat, lon
Quote:
// If coordinates were extracted, save them to the database.
if (isset($keys["Latitude"]) && isset($keys["Longitude"])) {
$record = ORM::factory("exif_coordinate");
$record->item_id = $item->id;
$record->latitude = str_replace(",", ".", $keys["Latitude"]);
$record->longitude = str_replace(",", ".", $keys["Longitude"]);
// Represent N/S/E/W as postive and negative numbers
if (substr(strtoupper($keys["Latitude Reference"]), 0, 1) == "S") {
$record->latitude = "-" . $record->latitude;
}
if (substr(strtoupper($keys["Longitude Reference"]), 0, 1) == "W") {
$record->longitude = "-" . $record->longitude;
}
$record->save();
}
Here is my code (inserted below original code) for extracting altitude
Quote:
// If altitude was extracted, save to the database.
if (isset($keys["Altitude"])) {
$record = ORM::factory("exif_coordinate");
$record->item_id = $item->id;
$record->altitude = str($keys["Altitude"]);
if ($keys["Altitude Reference"] == "1") {
$record->altitude = "-" . $record->altitude;
}
$record->save();
}
Here is my code (inserted below my altitude code) for extracting direction
Quote:
// If direction was extracted, save them to the database.
if (isset($keys["ImageDirection"])) {
$record = ORM::factory("exif_coordinate");
$record->item_id = $item->id;
$record->direction = str($keys["ImageDirection"]);
if (substr(strtoupper($keys["ImageDirectionRef"]), 0, 1) == "T") {
$record->direction = $record->direction . "T";
}
if (substr(strtoupper($keys["ImageDirectionRef"]), 0, 1) == "M") {
$record->direction = $record->direction . "M";
}
$record->save();
}
}
Here is function to extract the correct EXIF Tags. I added the last 4 lines of the array.
Here is the GPS key information from the EXIF Data Module
Quote:
function lookup_GPS_tag($tag) {
switch($tag) {
case "0000": $tag = "Version";break;
case "0001": $tag = "Latitude Reference";break; //north or south
case "0002": $tag = "Latitude";break; //dd mm.mm or dd mm ss
case "0003": $tag = "Longitude Reference";break; //east or west
case "0004": $tag = "Longitude";break; //dd mm.mm or dd mm ss
case "0005": $tag = "Altitude Reference";break; //sea level or below sea level
case "0006": $tag = "Altitude";break; //positive rational number
case "0007": $tag = "Time";break; //three positive rational numbers
case "0008": $tag = "Satellite";break; //text string up to 999 bytes long
case "0009": $tag = "ReceiveStatus";break; //in progress or interop
case "000a": $tag = "MeasurementMode";break; //2D or 3D
case "000b": $tag = "MeasurementPrecision";break; //positive rational number
case "000c": $tag = "SpeedUnit";break; //KPH, MPH, knots
case "000d": $tag = "ReceiverSpeed";break; //positive rational number
case "000e": $tag = "MovementDirectionRef";break; //true or magnetic north
case "000f": $tag = "MovementDirection";break; //positive rational number
case "0010": $tag = "ImageDirectionRef";break; //true or magnetic north
case "0011": $tag = "ImageDirection";break; //positive rational number
case "0012": $tag = "GeodeticSurveyData";break; //text string up to 999 bytes long
case "0013": $tag = "DestLatitudeRef";break; //north or south
case "0014": $tag = "DestinationLatitude";break; //three positive rational numbers
case "0015": $tag = "DestLongitudeRef";break; //east or west
case "0016": $tag = "DestinationLongitude";break; //three positive rational numbers
case "0017": $tag = "DestBearingRef";break; //true or magnetic north
case "0018": $tag = "DestinationBearing";break; //positive rational number
case "0019": $tag = "DestDistanceRef";break; //km, miles, knots
case "001a": $tag = "DestinationDistance";break; //positive rational number
case "001b": $tag = "ProcessingMethod";break;
case "001c": $tag = "AreaInformation";break;
case "001d": $tag = "Datestamp";break; //text string 10 bytes long
case "001e": $tag = "DifferentialCorrection";break; //integer in range 0-65535
default: $tag = "unknown:".$tag;break;
}
return $tag;
}
peszko
Joined: 2011-02-03
Posts: 4
Posted: Thu, 2011-02-03 02:51
I must be missing something. How do I actually download the module? The link at the top returns a 404.
rWatcher
Joined: 2005-09-06
Posts: 722
Posted: Mon, 2011-04-25 19:09
Here is the current version of EXIF_GPS, intended for use with Gallery 3.0.1.
peszko
Joined: 2011-02-03
Posts: 4
Posted: Thu, 2011-02-03 18:49
Thanks a lot.
spedi
Joined: 2011-01-18
Posts: 3
Posted: Sat, 2011-02-12 13:24
Thank you very much for this module
Just a question beside:
Is there a possibility that the module also displays the data in which direction the picture was taken?
I normally usw "GeoSetter" to add the GPS data into the pictures, and i also manually assign the direction too.
That would be really really nice
webbpinner
Joined: 2011-01-09
Posts: 4
Posted: Tue, 2011-02-15 14:06
spedi,
I agree. I've been trying to add this functionality myself off and on for awhile. I've got the code to display heading (and altitude). If you manually change the data using "edit photo" it successfully writes the data to the database but my function for extracting the initial exif data out of the image is broken (refer to my previous post).
I would really appreciate some help with this and I am happy to add all of my code to the repository.
Thanks,
- Webb
webbpinner
Joined: 2011-01-09
Posts: 4
Posted: Thu, 2011-02-17 00:58
I though I'd provide an update. I was able to get the functionality I was eluding to in my earlier posts.
New functionality:
- added two columns to exif_coordniates table for storing altitude(/depth) and direction
- new sidebar widget (GPS Data) to display position/attitude data as text - see lower right of 1st image. Sidebar widget will only show the data that's available. i.e. if the image only has lat/lon, the widget will not display empty altitude and depth labels.
- any new photos uploaded that contain direction or altitude exif data, the data will be extracted and added to the db.
- photo edit dialog box allows users to edit altitude and direction - see 2nd image
- upgrade works... sorta; adds columns to database, updates module version # to 3, doesn't process existing images and pull out altitude and direction data.
If there's interest I'll work with rwatcher on making the upgrade subroutine more robust and added the code to the official repository.
WARNING - upgrade procedure NOT PERFECT!
Here's the upgrade path that worked for me:
1. Backup DB
2. Disable Exif_gps module
3. Replace Exif_gps with my custom module
4. Enable Exif_gps module (this should trigger the upgrade)
5. Delete all records in the exif_coordinates table (yeah, not pretty I know. If you've been adding GPS data to Gallery by hand DO NOT DO THIS! YOU WILL LOSE ALL OF YOUR WORK. In my case all of my images are geotagged so I wasn't risking anything.)
6. Run the "Extract Exif GPS data" maintenance task. This will extract the lat/lon, altitude and direction.
Have you thought about batch-gps-tagging your photos offline with something like Geosetter? ( http://www.geosetter.de/en/ ) That way the coordinates are part of the photo and will stay with it should you move to a different system later on.
sooskriszta wrote:
Feature request: Merger with tagsmap.
I've been considering doing this actually. There's already some integration between the two modules in place on EXIF_GPS's sidebar. I'm not sure about how to best tie the rest of it together yet though.
mattbostock
Joined: 2010-11-02
Posts: 18
Posted: Wed, 2011-03-09 18:00
It would be cool if the interactive maps sidebar map could degrade gracefully in browsers where javascript is disabled.
I found that by placing the code from exif_gps_static_sidebar.html.php (the static <img> tag) within <div id="sidebar_map_canvas"></div>, it degrades nicely. Do you think this could be added to the official version?
Kudos on the great module!
Matt
rWatcher
Joined: 2005-09-06
Posts: 722
Posted: Sun, 2011-05-15 19:27
Here is the lastest version of EXIF_GPS. It includes niaxilin's auto-zoom bugfix and mattbostock suggestion for gracefully degrading the sidebar map.
carlo1
Joined: 2005-11-22
Posts: 26
Posted: Sat, 2011-04-30 08:39
mr_hyde wrote:
milliondollar wrote:
1. Regarding your modified code, how to just disable the map sidebar just in the main page (root)
At least for your first question the following code should work. GPS info is not displayed on the root page but on all other pages
$item = $theme->item;
if (($theme->item) and ($theme->item->is_album())){
if (($item->id == 1)){
break;
}}
hello
i also would like to have this feature. which part of the original code i must replace with this code above?
this is already working fine, thx.
case "exif_gps_location":
// Look for coordinates to display.
$latitude = "";
$longitude = "";
rWatcher
Joined: 2005-09-06
Posts: 722
Posted: Tue, 2012-06-19 00:05
I've made a minor update to the module to display a warning message that the EXIF module must be active. Latest version is attached.
Posts: 63
Look at the link below, choosing an album map it shows the map with the highest zoom level. But... at this zoom level now pictures are availabble, only if i reduce the zoom a little bit.
http://reisetraeume.com
Posts: 46
Hi, nice work rWatcher.
I try the last git release but it seems doesn't work (especialy the link to the complete map)
Posts: 8
Running the maintenance action "Extract EXIF GPS data" fails with "Function eregi() is deprecated" on my Fedora 12 (PHP 5.3) based system. Need to replace eregi() calls in modules/exif/lib/exif.php with preg_match() calls and the 'i' modifier for case insensitivity.
I have no clue whether that will break something else or not...
My patch, which fixes the problem on my system, is attached.
hth,
// Thomas
Posts: 722
Done: Added two icons, one for mapping the album and one for mapping the user. Both can be individually turned on/off from the admin screen.
Done.
Done: If no other coordinates are available, and the map type is set to interactive then the contents of the album will be mapped instead of hiding the map sidebar.
I've been unable to come up with a way to detect if satellite imagery is available at the current zoom level. What I've done is added an option to the admin screen called "Maximum Auto-Zoom Level:" -- if this is set, the maps will not auto-zoom past this level. So if you know that satellite imagery is not available any higher then a zoom level of 18, you can type that in and a level of 19 or higher will never be used for a starting zoom.
I've only tested it against RC-1, so it's possible something could have changed to break this module. What's happening when you try and use it?
That sounds like an issue with the EXIF module itself. You can file a bug report for that at http://sourceforge.net/apps/trac/gallery so the gallery dev's can look into it.
Posts: 63
Thx for implementing the max zoom level, works great. But Map this Album now schows a blank screen.
http://reisetraeume.com
Posts: 722
This appears to be a compatibility issue with the Gray Dragon theme. It works fine with Wind. I'm looking into it to see if it's something I can fix.
The problem doesn't appear to be on my end. I've also noticed that this isn't the only module not working. For example, I get a blank screen when clicking on a tag too.
Posts: 63
AFAIR there were no problems with the previous version of grey dragon. I will inform Serge, maybe he can find out something.
http://reisetraeume.com
Posts: 2466
there is a problem with the module
when showing exif_gps/map/album/1 and there are sideblocks (I have seen it with exif_gps_location, but it could be any other which work with item related stuff, my guess), sideblock creation crashes.
my theme seems to react more sensitivelly then wind theme, but wind crashes as well, it is just less visible
Posts: 722
Apparently, if you call "if ($theme->item->is_album())" from a dynamic page, it crashes that pages sidebar... Fixed.
Posts: 2466
yes, because there is no item()
you have to do
if (($theme->item) and ($theme->item->is_album()))
Posts: 16
Hi,
thanks for your continues effort ! I appreciate that highly !
However, may I kindly ask which version now is the latest working one?
I had some issues with the location part of the sidebar and all those zips confused me.
Is the latest one a complete one? Or just a fix to be installed over the zip before ?
Posts: 2466
Feature request - I do not know if it even possible, but
treat point on the map as a tag
when map is displayed in albums several locations are displayed. it would be nice if clicking the location would navigate to the page with all photos for the click.
Posts: 132
I am using this module for some time now, it is really great. But the more photos I add with gps location, the slower it gets. Especially in the root of Gallery, it is getting to slow.
Perhaps an idea; isn't is possible to only use the GPS info from the albums when browsing through the Gallery albums? And only use the photo GPS info when viewing a photo?
Posts: 21
First of all, hi to all!
...And thank you for such a great piece of software like gallery3 and for the very cool gps module!
Having used gallery2 for a long time with the gps/map module, I changed to gallery3 some days ago and would like to post a feature request for the exif_gps module:
The map module of gallery2 (http://codex.gallery2.org/Gallery2:Modules:Map:UserGuide) had a great little button "get via map" (see:http://codex.gallery2.org/File:Admin.JPG)
Using that button, a google map opened in a new window so you where able to get a postition (latitude+logitute) to the gps text field just by choosing it with your mouse on the map. It would be great to implement that feature also for the exif_gps module of gallery3.
There were also some other nice features like choosing different marker colors depending on item or album (http://codex.gallery2.org/File:MarkerManagement.jpg). Maybe it's kind of easy to implement that too.
By the way: at the moment I am working on a new module for gallery3. Can someone tell me where to put that into web/publish it best and how to start a discussion and feedback about the module?
Best regards!
Posts: 16
This would be really helpful, however I guess in the current modus operandi of this module this is not possible. There would be the need to determine some kind of a center of all pictures in the album to be displayed at the "root level" I guess. Something like a fixed location for each album. But a features like this would be helpful if using large numbers of pictures.
Posts: 39
Hello rWatcher,
Thank you so much. This module works perfectly with my geotagged photos.
There is only one glitch on the code: if you use SSL on your gallery, it will break the security status since it checks for http://www.google instead of httpS://www.google.
I wonder if you can correct this.
Thank you so much.
Posts: 39
Hi, I was playing around and the best way to do this if you dont have Premium API (most of us) is to use a frame or other mapping software. Some users said it worked. Could you implement it?
Thank you so much!
Posts: 3
Hi, I really like this module and think it looks fantastic. One minor improvement I would like is that the title on the "Map this album" page should be the title of the album, not the name from the directory structure.
For example:
http://www.harshbutfair.org/gallery/index.php/exif_gps/map/album/3
The title should be "Map of Asia 2010" rather than "Map of asia2010".
Thanks!
Posts: 11
Same problem here...maybe I have a suggestion to fix this: within a folder only the pictures directly within that folder and the coordinates of all the subfolders should be shown. This means that one has to (manually) set the coordinates also for the folders, but then the load for the page would be much lighter.
So for instance, with such a structure of the album:
ROOT
-Folder1
--Folder1.1
---Pic1.1.1
---Pic1.1.2
---Folder1.1.1
--Pic1.1
-Folder2
--Pic2.1
--Pic2.2
-Pic0.1
-Pic0.2
On the root folder map only the coordinates of Folder1, Folder1.1, Folder1.1.1, Folder2, Pic0.1 and Pic0.2 should be displayed
Once inside Folder1 the map should display only Folder 1.1, Folder1.1.1 and Pic1.1
I don't know if this is feasible, but it would be great!
Posts: 3
Me too, I think a smarter solution would be that if an album has a location then don't recurse into that album, otherwise continue like it does now. I've had a quick look at the code but can't get anywhere with it, PHP is not my forte.
Posts: 18
All my photos is GPS tagged & I think it will an issue to me also when I start to put in more photos. I hope rWatcher can take a look at this issues. I am not expect in PHP too. Small modification I can do but not full module like this.
_____________________________________________________
Cheers!
Visit my Travel Photo Gallery!
Posts: 46
Hi,
have similar issues and removed the map from the sidebar. Just leave map album function so far.
Maybe it would be also an option to "cluster" the gps info and ascribe it to albums. This would mean you need the possibility to have more than one gps location for an album.
Clustering would mean
- take one GPS location
- search for adjacent locations. if they are within a predefined radius, they belong to the "cluster"
- proceed as long as no further gps locations within the distance of this cluster. Then ascribe a center gps value to this cluster and set it for he album.
- there might be more clusters for one album. however, the number of gps locations to be displayed for albums would be lower than that for individual locations
- display individual locations only on album level
Posts: 18
mr_hyde,
Do you mean you disable map sidebar for root of the gallery but enable it in each album? This is a good option to speed up page root page loading. How do you do that? Mind to share?
_____________________________________________________
Cheers!
Visit my Travel Photo Gallery!
Posts: 46
Milliondollar,
not exactly.
I disabled the option in the sidebar but have the option "map this album" which you can do at every level (outside or inside an album)
It is at least an option.
Posts: 46
Hi,
I played a little bit around and it seems to be that I have found at least something that seems to work.
I have added a check if the current album has subalbums. The GPS map in the sidebar will be only displayed if the album has no subalbums. You will see this map consequently only on pure albums and images. however, there is some interaction with the map this album function. As soon as i fugured this out, i will follow up and share the code.
Posts: 46
Guess i have found the problem and now it works for me:
I have added the following lines to exif_gps_block.php in ../modules/exif_gps/helpers/
just below:
Sidebar gps info is displayed now only in albums without sub albums and for images itself which improves the overall speed.
Posts: 18
Great mr_hyde,
Any idea how to disable at the root only? I really have no idea on how to modify the code.
I think, a better trade off is to display the static image at the sidebar. Unfortunately, the function is not working.
_____________________________________________________
Cheers!
Visit my Travel Photo Gallery!
Posts: 46
What exactly do you mean?
Disable the functionality of displaying the gps info only on the root page?
This should be possible. However, it might still slowdown everything.
Posts: 18
There are 2 thing here,
1. Regarding your modified code, how to just disable the map sidebar just in the main page (root)
2. There is option in EXIF_GPS menu to display static image map instead of interactive. I think static image will reduce loading time. Unfortunately, the option is not working.
_____________________________________________________
Cheers!
Visit my Travel Photos Gallery!
Posts: 46
At least for your first question the following code should work. GPS info is not displayed on the root page but on all other pages
Posts: 3
Hello rWatcher,
I had problems with running the maintenance task. Unfortunately the task did never end successfully. The behavior seemed to be random but at least I found the reason.
The task remembers the last item id, and continues every run with the next 100 items. But in my case the ids where not in one sequence (why should the query be sorted by id??) and therefore I add a order by to the query.
// Check each photo in the array to see if it already has exif gps data associated with it.
// If it doesn't, attempt to extract gps coordinates.
foreach (ORM::factory("item")
->where("id", ">", $last_id)
->where("type", "=", "photo")
->order_by("id")
->find_all(100) as $item) {
$record = ORM::factory("exif_coordinate")->where("item_id", "=", $item->id)->find();
...
$last_id = $item->id;
...
}
Now it works.
btw: Thanks for the cool module!
Fabian
Posts: 3
Thanks for posting that. I had the same problem and this fixed it.
--
Everything is wonderful until you know something about it.
Posts: 3
I've made a few changes to improve this module for my site:
1. In exif_gps.php, I changed $curr_album[0]->name to $curr_album[0]->title. This makes it display the name of the album correctly when you do "map this album".
2. In exif_gps_block.php line 133, I changed descendents() to children() so that an album's map doesn't recurse through all sub-albums, so it's no longer really slow with lots of photos.
3. In exif_gps_block.php line 108, I added && (!$theme->item->is_album()) so that the map for an album will still include all the items in the album, even if the album itself has a lat/long value.
Posts: 4
rWatcher,
This is a great module for G3 and it was one of the reasons I chose G3 over other options. I'm working on a G3 site related to deep-water (1000-6000m) oceanographic exploration. It would be extremely useful if exif_gps could be enhanced to do the following five things:
1. Extract and process the GPSAltitude and the GPSAltitudeRef tags
For my audience, depth is VERY important but my hope would be this feature would be useful to the larger exif_gps audience given the number of GPS-enabled cameras that are starting to support altitude.
2. Extract and process the GPSImgDirection and the GPSImgDirectionRef tags
I doubt adding this feature would help the majority of the exif_gps community but again would be very useful to my audience given they typically like to know which direction the vehicle was facing when the picture was taken.
3. Display Latitude, Longitude, Altitude and Heading in the "Location" sidebar
The Google Map displayed in the sidebar is very useful on my personnel gallery page where the pictures are taken over land but it's not as useful for the underwater images I upload. Almost all of these sidebar maps appear as a single point in the middle of the water with no landmass in view. What would be more useful would be to have the sidebar display the lat,lon,alt and heading as numerical values.
4. In the sidebar, label the GPSAltitude value as "Altitude" when GPSAltitudeRef=00 and "Depth" when GPSAltitudeRef=01
5. Add the ability in the EXIF_GPS Settings page to show only the Map, only the numerical data or both in the sidebar. (I was envisioning 3 radio buttons)
I tried to make the changes to the module myself but once I realized it required changing the DB schema I figured it was time to put in a feature request to the developer.
If your interested in what I do (or you suspect I might be full of it...) here's a link to the vessel I work on.
http://oceanexplorer.noaa.gov/okeanos/explorations/10index/welcome.html
Thanks again and regardless of if you can help me with this, EXIF_GPS was a great addition to G3.
-W
Posts: 11
Hi! I've tried out your modifications and yep, they work fine! There's just a small thing missing (for my particular need): I don't get the dots on the map of subfolders (sub-albums).
Could you please write a code so that:
IF item is album AND item is descendent, THEN show coordinates
(see http://gallery.menalto.com/node/94762?page=1#comment-360367 for details)
Thanks in advance!
Posts: 1
Is it possible to have a button next to the longitude and latitude boxes that opens up a google map and lets you search for a location, then when you click a point in the map it uses that to calculate long and lat and to fill in the boxes rather than having to go elsewhere to look them up, and then copying and pasting back into the boxes.
even something like this page does http://itouchmap.com/latlong.html
Posts: 11
Anyone willing to take care of this orphan module?
Posts: 4
Given k0be's comment I decided not to wait for rWatcher to respond and have started to dig into the code myself.
Progress made:
- installer script add two new fields to exif_coordinates table (altitude, direction)
- "EXIF_GPS Settings" page displays checkboxes under "Sidebar Settings" for "Show Map" and "Show Coordinates", these vars (toolbar_map_display, toolbar_coord_display) are correctly stored in the database
- "Edit Photo" dialog box displays additional textfields for altitude and direction. Manually adding values to these fields get correctly stored in the database.
Problems encountered:
- I'm having trouble extracting the altitude and direction information when the photos are uploaded. Uploading a file registers an error but I can't see what the error is. Also there is an error, the lat,lon still get correctly set, just not the altitude and direction.
- When I run the "Extract Exif GPS data" maintenance task, the job stalls on the first image but just like the uploading file error the job correctly extracts the lat,lon but not the altitude, direction.
Left to Do:
- Use the toolbar_map_display, toolbar_coord_display variables to correctly show the map and/or coordinates in the sidebar
- Figure out why I can't extract the altitude and direction directly from the images.
I've never programmed in python so can someone please tell help me figure out what I'm doing wrong?
Here is the original code for extracting lat, lon
Here is my code (inserted below original code) for extracting altitude
Here is my code (inserted below my altitude code) for extracting direction
Here is function to extract the correct EXIF Tags. I added the last 4 lines of the array.
Here is the GPS key information from the EXIF Data Module
Posts: 4
I must be missing something. How do I actually download the module? The link at the top returns a 404.
Posts: 722
Here is the current version of EXIF_GPS, intended for use with Gallery 3.0.1.
Posts: 4
Thanks a lot.
Posts: 3
Thank you very much for this module
Just a question beside:
Is there a possibility that the module also displays the data in which direction the picture was taken?
I normally usw "GeoSetter" to add the GPS data into the pictures, and i also manually assign the direction too.
That would be really really nice
Posts: 4
spedi,
I agree. I've been trying to add this functionality myself off and on for awhile. I've got the code to display heading (and altitude). If you manually change the data using "edit photo" it successfully writes the data to the database but my function for extracting the initial exif data out of the image is broken (refer to my previous post).
I would really appreciate some help with this and I am happy to add all of my code to the repository.
Thanks,
- Webb
Posts: 4
I though I'd provide an update. I was able to get the functionality I was eluding to in my earlier posts.
New functionality:
- added two columns to exif_coordniates table for storing altitude(/depth) and direction
- new sidebar widget (GPS Data) to display position/attitude data as text - see lower right of 1st image. Sidebar widget will only show the data that's available. i.e. if the image only has lat/lon, the widget will not display empty altitude and depth labels.
- any new photos uploaded that contain direction or altitude exif data, the data will be extracted and added to the db.
- photo edit dialog box allows users to edit altitude and direction - see 2nd image
- upgrade works... sorta; adds columns to database, updates module version # to 3, doesn't process existing images and pull out altitude and direction data.
[img]http://oceandatarat.org/G3_download/exif_gps_v3_main.jpg[/img]
[img]http://oceandatarat.org/G3_download/exif_gps_v3_edit_dialog.jpg[/img]
For anyone interested, here's my modified package:
http://oceandatarat.org/G3_download/exif_gps_v3.tgz
If there's interest I'll work with rwatcher on making the upgrade subroutine more robust and added the code to the official repository.
WARNING - upgrade procedure NOT PERFECT!
Here's the upgrade path that worked for me:
1. Backup DB
2. Disable Exif_gps module
3. Replace Exif_gps with my custom module
4. Enable Exif_gps module (this should trigger the upgrade)
5. Delete all records in the exif_coordinates table (yeah, not pretty I know. If you've been adding GPS data to Gallery by hand DO NOT DO THIS! YOU WILL LOSE ALL OF YOUR WORK. In my case all of my images are geotagged so I wasn't risking anything.)
6. Run the "Extract Exif GPS data" maintenance task. This will extract the lat/lon, altitude and direction.
- W
Posts: 428
Feature request: Manual batch lat-long tagging.
Feature request: Merger with tagsmap.
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 722
Have you thought about batch-gps-tagging your photos offline with something like Geosetter? ( http://www.geosetter.de/en/ ) That way the coordinates are part of the photo and will stay with it should you move to a different system later on.
I've been considering doing this actually. There's already some integration between the two modules in place on EXIF_GPS's sidebar. I'm not sure about how to best tie the rest of it together yet though.
Posts: 18
It would be cool if the interactive maps sidebar map could degrade gracefully in browsers where javascript is disabled.
I found that by placing the code from exif_gps_static_sidebar.html.php (the static <img> tag) within <div id="sidebar_map_canvas"></div>, it degrades nicely. Do you think this could be added to the official version?
Kudos on the great module!
Matt
Posts: 722
Here is the lastest version of EXIF_GPS. It includes niaxilin's auto-zoom bugfix and mattbostock suggestion for gracefully degrading the sidebar map.
Posts: 26
hello
i also would like to have this feature. which part of the original code i must replace with this code above?
this is already working fine, thx.
case "exif_gps_location":
// Look for coordinates to display.
$latitude = "";
$longitude = "";
Posts: 722
I've made a minor update to the module to display a warning message that the EXIF module must be active. Latest version is attached.