[Digikam-devel] [Bug 133359] New: WISH: Google maps support to show satellite images of the photos

classic Classic list List threaded Threaded
86 messages Options
12345
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         
aironmail gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #17774|0                           |1
        is obsolete|                            |



------- Additional Comments From aironmail gmail com  2006-09-15 00:13 -------
Created an attachment (id=17776)
 --> (http://bugs.kde.org/attachment.cgi?id=17776&action=view)
More compact version of exiftools-gps

I've uploaded a new version a bit more compact
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Bugzilla from aironmail@gmail.com
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From aironmail gmail com  2006-09-15 00:19 -------
To me it didn't work with files, at least with a file in a subfolder.

Imagine that I was in:
/home/user/pictures/

There was a folder called gps containing a file named 100000.jpg

I tried something like: exiftools-gps number number gps/100000.jpg

I was getting all the time: file or folder is wrong

The only way that I could make it to work was using the folder:

exiftools-gps number number gps


After making the change it works fine to me with both, folders and files.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Bugzilla from aironmail@gmail.com
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From aironmail gmail com  2006-09-15 00:39 -------
I found another error which affects all script versions (included the latest one that I uploaded).

The problem comes with negatives values. I tried to use values from google maps and the longitude is a negative value, which makes the script to throw:

Must be a positive number for GPS:GPSLongitude

And it doesn't set the longitude in the exif. But the rest (altitude, latitude,...) are set.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Gerhard Kulzer
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From gerhard kulzer net  2006-09-15 21:39 -------
Created an attachment (id=17784)
 --> (http://bugs.kde.org/attachment.cgi?id=17784&action=view)
exiftool-gps-wrapper
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Bugzilla from aironmail@gmail.com
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From aironmail gmail com  2006-09-16 01:15 -------
I have tried it. Now it works with negative values. But it's not yet working fine, because it doesn't manage the longitude correctly.

For example:
I get the coordenates from:
http://maps.google.com/maps?f=q&hl=es&q=c%C3%A1diz+spain&ie=UTF8&z=17&ll=36.527536,-6.315207&spn=0.005837,0.009763&om=1&iwloc=A

So I consider that the values are: 36.527536,-6.315207

Then I execute:
exiftool-gps-wrapper 36.527536 -6.315207 picture.jpg

The output is:

    1 image files updated
GPS Version ID                  : 2.2.0.0
GPS Latitude Ref                : North
GPS Latitude                    : 36 deg 29' 44.95"
GPS Longitude Ref               : West
GPS Longitude                   : 4 deg 0' 0.00"
GPS Altitude                    : 0 metres
GPS Map Datum                   : WGS-84

To me is really strange that the GPS Longitude has 0 for the minutes and seconds. And it happens always (I tried different locations).

When now in digikam, I click in more info selecting the Google Map or the Map Quest I get a different location.
For example, for the previous example, I get:

http://maps.google.com/?q=36.49582000,-4.00000000&spn=0.05,0.05&t=h&om=1&hl=en

As you see in the pictures, both locations are different.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Gerhard Kulzer
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From gerhard kulzer net  2006-09-16 10:11 -------
. exiftool-gps-wrapper 36.527536 -6.315207 _MG_1145.CR2
_MG_1145.CR2
36.527536, N, 6.31521, W, _MG_1145.CR2, , _MG_1145.CR2
    1 image files updated
GPS Version ID                  : 2.2.0.0
GPS Latitude Ref                : North
GPS Latitude                    : 36 deg 31' 39.13"
GPS Longitude Ref               : West
GPS Longitude                   : 6 deg 18' 54.76"
GPS Altitude                    : 0 metres
GPS Map Datum                   : WGS-84

And this is what I get back when invoking maps.google from digiKam:
http://maps.google.com/?q=36.52753600,-6.31521000&spn=0.05,0.05&t=h&om=1&hl=en (beach near some fort San Sebastian in Cadiz). A very little error is introduced (truncation of 6.315207 to 6.31521)
I don't know what's going on, are you sure we use the same script? Or is it a question of awk? Can't believe that. Maybe exiftool version? This is mine:
$ exiftool -ver
ExifTool version 6.34
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Bugzilla from aironmail@gmail.com
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From aironmail gmail com  2006-09-16 10:33 -------
Sadly yes, I'm using the right one (I've just downloaded it again to make sure). This is really annoying.

exiftool-gps-wrapper 36.527536 -6.315207 test.jpg
test.jpg
36.527536, N, 6, W, test.jpg, , test.jpg
    1 image files updated
GPS Version ID                  : 2.2.0.0
GPS Latitude Ref                : North
GPS Latitude                    : 36 deg 31' 39.13"
GPS Longitude Ref               : West
GPS Longitude                   : 6 deg 0' 0.00"
GPS Altitude                    : 0 metres
GPS Map Datum                   : WGS-84

I'm using a newer version of exiftool:

$ exiftool -ver
ExifTool version 6.40

I'm going to try to downgrade, just to see if it a problem in the new version.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Bugzilla from aironmail@gmail.com
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From aironmail gmail com  2006-09-16 10:40 -------
I've downgraded exiftool and the problem persist.

exiftool -ver
ExifTool version 6.36

GPS Version ID                  : 2.2.0.0
GPS Latitude Ref                : North
GPS Latitude                    : 36 deg 31' 39.13"
GPS Longitude Ref               : West
GPS Longitude                   : 6 deg 0' 0.00"
GPS Altitude                    : 0 metres
GPS Map Datum                   : WGS-84

I'm really confused about what's the problem.

My awk version:

$ awk --version
GNU Awk 3.1.5
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Bugzilla from aironmail@gmail.com
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From aironmail gmail com  2006-09-16 10:43 -------
I've tried also the version 6.17, so I doubt that it's related with the exiftool version.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Gerhard Kulzer
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From gerhard kulzer net  2006-09-16 10:45 -------
My awk version is the same 3.1.5
I also tried it on a jpg file just to be sure, and I get the same correct results.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Gerhard Kulzer
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From gerhard kulzer net  2006-09-16 10:52 -------
I just saw that the problem must be in the awk part since your echo line gives already wrong coordinates: 36.527536, N, 6, W, test.jpg, , test.jpg
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Bugzilla from aironmail@gmail.com
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From aironmail gmail com  2006-09-16 14:15 -------
You gave me the hint to fix it.

I found that (for a reason that I don't understand) $1*-1.0 returns an integer instead of a float.

I have done a workaround that works perfectly. Instead of multiply by -1.0 just replace the '-' char with nothing if it has a negative value.

So, the lines:
lat=$(echo "$1" | awk '{if ($1 < 0) print $1*-1; else print $1}') #
lon=$(echo "$2" | awk '{if ($1 < 0) print $1*-1; else print $1}') #

are replaced with:
lat=$(echo "$1" | awk '{val = $1; if ($1 < 0) sub(/-/, "", val); print val}')
lon=$(echo "$2" | awk '{val = $1; if ($1 < 0) sub(/-/, "", val); print val}')

After doing it the coordinates are well taken for me.

exiftool-gps-wrapper 36.527924 -6.315497 100_3445.JPG
100_3445.JPG
36.527924, N, 6.315497, W, 100_3445.JPG, , 100_3445.JPG
    1 image files updated
GPS Version ID                  : 2.2.0.0
GPS Latitude Ref                : North
GPS Latitude                    : 36 deg 31' 40.53"
GPS Longitude Ref               : West
GPS Longitude                   : 6 deg 18' 55.79"
GPS Altitude                    : 0 metres
GPS Map Datum                   : WGS-84

And now the maps have an acceptable accuracy.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Bugzilla from aironmail@gmail.com
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         
aironmail gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #17776|0                           |1
        is obsolete|                            |



------- Additional Comments From aironmail gmail com  2006-09-16 14:17 -------
Created an attachment (id=17792)
 --> (http://bugs.kde.org/attachment.cgi?id=17792&action=view)
exiftool-gps-wrapper (fixed)

I've uploaded a new version of the script with the fix applied.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Gerhard Kulzer
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From gerhard kulzer net  2006-09-16 15:33 -------
Ok it works for me as well - I put it into the documentation.

My suspicion is that the field separators for awk might be different for you and me (and others). Can have to do with the language setting? Because it looks as if awk had taken the -6 of the -6.315207 on your machine.

Anyway, your solution seems the foolprove one.
Thanx a lot
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Gilles Caulier
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From caulier.gilles free fr  2006-09-21 14:52 -------
SVN commit 587073 by cgilles:

kipi-plugins from trunk : new plugin to synchronize pictures metadata with a GPS data file.

First beta version of GPSSync kipi-plugin is now available for testing.

To use it, you need a GPX xml file generated by your GPS device. The GPX file must be generated to render a wayspoints or trackpoints list.

If your GPS device do not support GPX, you can generate it using GPSBabel program like this :

# gpsbabel -w -i mapsource -f Driveback.mps -o gpx -F Driveback.gpx  

The plugin use the Exif time-stamp to correlate GPS data. Accuracy of 30s is used to diff camera and GPS time-stamp. Of course, the date of your GPS device and your camera must be set properly (:=))).

Some links:

GPSBalbel: http://www.gpsbabel.org
GPX file format: http://www.topografix.com/gpx.asp
Plugin in action: http://digikam3rdparty.free.fr/Screenshots/newkipigpssyncplugin.png

CCMAIL: kde-imaging kde org, digikam-devel kde org, digikam-users kde org, alexios.beveratos gmail com, gerhard kulzer net

BUG: 111560
CCBUGS: 133359

 M  +125 -34   gpsdataparser.cpp  
 M  +37 -6     gpsdataparser.h  
 M  +23 -5     gpslistviewitem.cpp  
 M  +3 -2      gpslistviewitem.h  
 M  +72 -45    gpssyncdialog.cpp  
 M  +9 -11     gpssyncdialog.h  
 M  +2 -1      plugin_gpssync.cpp
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Gilles Caulier
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From caulier.gilles free fr  2006-09-22 10:47 -------
SVN commit 587310 by cgilles:

kipi-plugins from trunk : GPSSync tool : added new option to set the max gap time in seconds to synchronize pictures with GPS data. default value is 30s.

CCMAIL: kde-imaging kde org, alexios.beveratos gmail com, gerhard kulzer net

CCBUGS: 133359, 111560

 M  +54 -11    gpssyncdialog.cpp  


--- trunk/extragear/libs/kipi-plugins/gpssync/gpssyncdialog.cpp #587309:587310
 @ -26,9 +26,8  @
 #include <qvgroupbox.h>
 #include <qgrid.h>
 #include <qpushbutton.h>
-#include <qframe.h>
-#include <qimage.h>
 #include <qfileinfo.h>
+#include <qwhatsthis.h>
 
 // KDE includes.
 
 @ -37,6 +36,7  @
 #include <kapplication.h>
 #include <kaboutdata.h>
 #include <khelpmenu.h>
+#include <ksqueezedtextlabel.h>
 #include <kiconloader.h>
 #include <kpopupmenu.h>
 #include <kstandarddirs.h>
 @ -45,6 +45,8  @
 #include <kconfig.h>
 #include <kmessagebox.h>
 #include <kglobalsettings.h>
+#include <knuminput.h>
+#include <kseparator.h>
 
 // Local includes.
 
 @ -62,15 +64,24  @
 
     GPSSyncDialogPriv()
     {
-        listView  = 0;
-        interface = 0;
+        listView       = 0;
+        interface      = 0;
+        maxGapInput    = 0;
+        gpxFileName    = 0;
+        gpxPointsLabel = 0;
     }
 
-    KListView       *listView;
+    QLabel             *gpxPointsLabel;
 
-    KIPI::Interface *interface;
+    KListView          *listView;
 
-    GPSDataParser    gpxParser;
+    KIntSpinBox        *maxGapInput;
+
+    KSqueezedTextLabel *gpxFileName;
+
+    KIPI::Interface    *interface;
+
+    GPSDataParser       gpxParser;
 };
 
 GPSSyncDialog::GPSSyncDialog( KIPI::Interface* interface, QWidget* parent)
 @ -96,7 +107,8  @
     QLabel *pixmapLabelLeft = new QLabel( headerFrame, "pixmapLabelLeft" );
     pixmapLabelLeft->setScaledContents( false );
     layout->addWidget( pixmapLabelLeft );
-    QLabel *labelTitle = new QLabel( i18n("Syncronize Picture Metadata with a GPS Device"), headerFrame, "labelTitle" );
+    QLabel *labelTitle = new QLabel( i18n("Syncronize Picture Metadata with a GPS Device"),
+                                     headerFrame, "labelTitle" );
     layout->addWidget( labelTitle );
     layout->setStretchFactor( labelTitle, 1 );
 
 @ -125,9 +137,36  @
     d->listView->setSelectionMode(QListView::Single);
     d->listView->setMinimumWidth(450);
 
-    mainLayout->addMultiCellWidget(headerFrame, 0, 0, 0, 1);
+    // ---------------------------------------------------------------
+
+    QWidget *settingsBox = new QGroupBox(0, Qt::Vertical, i18n("Settings"), plainPage());
+    QGridLayout* settingsBoxLayout = new QGridLayout(settingsBox->layout(), 5, 1,
+                                                     KDialog::spacingHint());
+
+    QLabel *gpxFileLabel = new QLabel(i18n("Current GPX file:"), settingsBox);
+    d->gpxFileName       = new KSqueezedTextLabel(i18n("No GPX file"), settingsBox);
+    d->gpxPointsLabel    = new QLabel(settingsBox);
+    KSeparator *line     = new KSeparator(Horizontal, settingsBox);
+
+    QLabel *maxGapLabel = new QLabel(i18n("Max gap time:"), settingsBox);
+    d->maxGapInput      = new KIntSpinBox(0, 2000, 1, 30, 10, settingsBox);
+    QWhatsThis::add(d->maxGapInput, i18n("<p>Set here the maximum distance in "
+                    "seconds from a GPS point that a photo will be matched."));
+
+    settingsBoxLayout->addMultiCellWidget(gpxFileLabel, 0, 0, 0, 1);    
+    settingsBoxLayout->addMultiCellWidget(d->gpxFileName, 1, 1, 0, 1);    
+    settingsBoxLayout->addMultiCellWidget(d->gpxPointsLabel, 2, 2, 0, 1);    
+    settingsBoxLayout->addMultiCellWidget(line, 3, 3, 0, 1);    
+    settingsBoxLayout->addMultiCellWidget(maxGapLabel, 4, 4, 0, 0);
+    settingsBoxLayout->addMultiCellWidget(d->maxGapInput, 4, 4, 1, 1);
+
+    // ---------------------------------------------------------------
+
+    mainLayout->addMultiCellWidget(headerFrame, 0, 0, 0, 2);
     mainLayout->addMultiCellWidget(d->listView, 1, 3, 0, 1);
-    mainLayout->setRowStretch(1, 10);
+    mainLayout->addMultiCellWidget(settingsBox, 1, 1, 2, 2);
+    mainLayout->setColStretch(1, 10);
+    mainLayout->setRowStretch(3, 10);
 
     // ---------------------------------------------------------------
     // About data and help button.
 @ -202,6 +241,8  @
         return;
     }
 
+    d->gpxFileName->setText(loadGPXFile.fileName());
+    d->gpxPointsLabel->setText(i18n("Points parsed: %1").arg(d->gpxParser.numPoints()));
     enableButton(Apply, true);
     matchGPSAndPhoto();
 }
 @ -228,6 +269,7  @
 {
     KConfig config("kipirc");
     config.setGroup("GPS Sync Settings");
+    d->maxGapInput->setValue(config.readNumEntry("Max Gap Time", 30));
 
     resize(configDialogSize(config, QString("GPS Sync Dialog")));
 }
 @ -236,6 +278,7  @
 {
     KConfig config("kipirc");
     config.setGroup("GPS Sync Settings");
+    config.writeEntry("Max Gap Time", d->maxGapInput->value() );
 
     saveDialogSize(config, QString("GPS Sync Dialog"));
     config.sync();
 @ -250,7 +293,7  @
     {
         GPSListViewItem *item = (GPSListViewItem*) it.current();
         double alt =0.0, lat=0.0, lng = 0.0;
-        if (d->gpxParser.parseDates(item->getDateTime(), 30, alt, lat, lng))
+        if (d->gpxParser.parseDates(item->getDateTime(), d->maxGapInput->value(), alt, lat, lng))
         {
             item->setGPSInfo(alt, lat, lng);
             itemsUpdated++;
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Gilles Caulier
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From caulier.gilles free fr  2006-09-22 12:42 -------
SVN commit 587322 by cgilles:

kipi-plugins from trunk : GPSSync tool : added new option to set camera time-zone in hours to match properly all pictures with GPS data using GMT time.

CCMAIL: kde-imaging kde org, alexios.beveratos gmail com, gerhard kulzer net

CCBUGS: 133359, 111560

 M  +13 -3     gpsdataparser.cpp  
 M  +2 -1      gpsdataparser.h  
 M  +45 -2     gpssyncdialog.cpp  


--- trunk/extragear/libs/kipi-plugins/gpssync/gpsdataparser.cpp #587321:587322
 @ -58,13 +58,23  @
     return m_GPSDataMap.count();
 }
 
-bool GPSDataParser::parseDates(QDateTime dateTime, int averageSecs, double& alt, double& lat, double& lon)
+bool GPSDataParser::parseDates(QDateTime photoDateTime, int accuracySecs, int timeZone,
+                               double& alt, double& lat, double& lon)
 {
+    // GPS device are sync in time by satelite using GMT time.
+    // If the camera time is different than GMT time, we need to convert it to GMT time
+    // Using the time zone.
+    QDateTime cameraGMTDateTime = photoDateTime.addSecs(timeZone*3600*(-1));
+
     for (GPSDataMap::Iterator it = m_GPSDataMap.begin();
          it != m_GPSDataMap.end(); ++it )
     {
-        int nbSecs = abs(dateTime.secsTo( it.key() ));
-        if( nbSecs < averageSecs )
+        // Here we check a possible accuracy in seconds between the
+        // Camera GMT time and the GPS device GMT time.
+        
+        int nbSecs = abs(cameraGMTDateTime.secsTo( it.key() ));
+        
+        if( nbSecs < accuracySecs )
         {
             GPSDataContainer data = m_GPSDataMap[it.key()];
             alt = data.altitude();
--- trunk/extragear/libs/kipi-plugins/gpssync/gpsdataparser.h #587321:587322
 @ -50,7 +50,8  @
 
     void clear();
     int  numPoints();
-    bool parseDates(QDateTime dateTime, int averageSecs, double& alt, double& lat, double& lon);
+    bool parseDates(QDateTime photoDateTime, int accuracySecs, int timeZone,
+                    double& alt, double& lat, double& lon);
 
 private:
 
--- trunk/extragear/libs/kipi-plugins/gpssync/gpssyncdialog.cpp #587321:587322
 @ -21,6 +21,7  @
 
 // Qt includes.
 
+#include <qcombobox.h>
 #include <qlayout.h>
 #include <qlabel.h>
 #include <qvgroupbox.h>
 @ -69,10 +70,13  @
         maxGapInput    = 0;
         gpxFileName    = 0;
         gpxPointsLabel = 0;
+        timeZoneCB     = 0;
     }
 
     QLabel             *gpxPointsLabel;
 
+    QComboBox          *timeZoneCB;
+
     KListView          *listView;
 
     KIntSpinBox        *maxGapInput;
 @ -129,7 +133,7  @
     d->listView->addColumn( i18n("Latitude") );
     d->listView->addColumn( i18n("Longitude") );
     d->listView->addColumn( i18n("Date") );
-    d->listView->addColumn( i18n("Extrapoled") );
+    d->listView->addColumn( i18n("Status") );
     d->listView->setResizeMode(QListView::AllColumns);
     d->listView->setAllColumnsShowFocus(true);
     d->listView->setSorting(-1);
 @ -153,12 +157,45  @
     QWhatsThis::add(d->maxGapInput, i18n("<p>Set here the maximum distance in "
                     "seconds from a GPS point that a photo will be matched."));
 
+    QLabel *timeZoneLabel = new QLabel(i18n("Time zone:"), settingsBox);
+    d->timeZoneCB         = new QComboBox( false, settingsBox );
+    d->timeZoneCB->insertItem(i18n("-12"), 0);
+    d->timeZoneCB->insertItem(i18n("-11"), 1);
+    d->timeZoneCB->insertItem(i18n("-10"), 2);
+    d->timeZoneCB->insertItem(i18n("-9"),  3);
+    d->timeZoneCB->insertItem(i18n("-8"),  4);
+    d->timeZoneCB->insertItem(i18n("-7"),  5);
+    d->timeZoneCB->insertItem(i18n("-6"),  6);
+    d->timeZoneCB->insertItem(i18n("-5"),  7);
+    d->timeZoneCB->insertItem(i18n("-4"),  8);
+    d->timeZoneCB->insertItem(i18n("-3"),  9);
+    d->timeZoneCB->insertItem(i18n("-2"),  10);
+    d->timeZoneCB->insertItem(i18n("-1"),  11);
+    d->timeZoneCB->insertItem(i18n("GMT"), 12);
+    d->timeZoneCB->insertItem(i18n("+1"),  13);
+    d->timeZoneCB->insertItem(i18n("+2"),  14);
+    d->timeZoneCB->insertItem(i18n("+3"),  15);
+    d->timeZoneCB->insertItem(i18n("+4"),  16);
+    d->timeZoneCB->insertItem(i18n("+5"),  17);
+    d->timeZoneCB->insertItem(i18n("+6"),  18);
+    d->timeZoneCB->insertItem(i18n("+7"),  19);
+    d->timeZoneCB->insertItem(i18n("+8"),  20);
+    d->timeZoneCB->insertItem(i18n("+9"),  21);
+    d->timeZoneCB->insertItem(i18n("+10"), 22);
+    d->timeZoneCB->insertItem(i18n("+11"), 23);
+    d->timeZoneCB->insertItem(i18n("+12"), 24);
+    QWhatsThis::add(d->timeZoneCB, i18n("<p>Set here the time zone where the "
+                    "pictures were taken in, so that the times of the pictures "
+                    "can be adjusted to match the GPS data"));
+
     settingsBoxLayout->addMultiCellWidget(gpxFileLabel, 0, 0, 0, 1);    
     settingsBoxLayout->addMultiCellWidget(d->gpxFileName, 1, 1, 0, 1);    
     settingsBoxLayout->addMultiCellWidget(d->gpxPointsLabel, 2, 2, 0, 1);    
     settingsBoxLayout->addMultiCellWidget(line, 3, 3, 0, 1);    
     settingsBoxLayout->addMultiCellWidget(maxGapLabel, 4, 4, 0, 0);
     settingsBoxLayout->addMultiCellWidget(d->maxGapInput, 4, 4, 1, 1);
+    settingsBoxLayout->addMultiCellWidget(timeZoneLabel, 5, 5, 0, 0);
+    settingsBoxLayout->addMultiCellWidget(d->timeZoneCB, 5, 5, 1, 1);
 
     // ---------------------------------------------------------------
 
 @ -270,6 +307,7  @
     KConfig config("kipirc");
     config.setGroup("GPS Sync Settings");
     d->maxGapInput->setValue(config.readNumEntry("Max Gap Time", 30));
+    d->timeZoneCB->setCurrentItem(config.readNumEntry("Time Zone", 12));
 
     resize(configDialogSize(config, QString("GPS Sync Dialog")));
 }
 @ -279,6 +317,7  @
     KConfig config("kipirc");
     config.setGroup("GPS Sync Settings");
     config.writeEntry("Max Gap Time", d->maxGapInput->value() );
+    config.writeEntry("Time Zone", d->timeZoneCB->currentItem() );
 
     saveDialogSize(config, QString("GPS Sync Dialog"));
     config.sync();
 @ -293,7 +332,11  @
     {
         GPSListViewItem *item = (GPSListViewItem*) it.current();
         double alt =0.0, lat=0.0, lng = 0.0;
-        if (d->gpxParser.parseDates(item->getDateTime(), d->maxGapInput->value(), alt, lat, lng))
+
+        if (d->gpxParser.parseDates(item->getDateTime(),
+                                    d->maxGapInput->value(),
+                                    d->timeZoneCB->currentItem()-12,
+                                    alt, lat, lng))
         {
             item->setGPSInfo(alt, lat, lng);
             itemsUpdated++;
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Bugzilla from aironmail@gmail.com
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From aironmail gmail com  2006-09-22 12:53 -------
I've just installed it. It's going to be really useful for people with gps devices. But for people without it, it would be also good to have an option (probably in the same dialog) to just enter the manually the latitude, longitude and altitude (not associated to any time) for the selected pictures, without needing to load a gpx file for each picture. I think that it will not overload the interface. But, anyways, great progress!
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Gerhard Kulzer
Am Freitag, 22. September 2006 12:54 schrieb Antonio E.:

> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
>
> http://bugs.kde.org/show_bug.cgi?id=133359
>
>
>
>
> ------- Additional Comments From aironmail gmail com  2006-09-22 12:53
> ------- I've just installed it. It's going to be really useful for people
> with gps devices. But for people without it, it would be also good to have
> an option (probably in the same dialog) to just enter the manually the
> latitude, longitude and altitude (not associated to any time) for the
> selected pictures, without needing to load a gpx file for each picture. I
Well for this you still can use the exiftool-gps-wrapper script from the
documentation. But you need to have exiftool installed!
Gerhard

--
http://www.gerhard.fr
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Gerhard Kulzer
In reply to this post by Bugzilla from aironmail@gmail.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From gerhard kulzer net  2006-09-22 14:12 -------
Am Freitag, 22. September 2006 12:54 schrieb Antonio E.:
[bugs.kde.org quoted mail]
Well for this you still can use the exiftool-gps-wrapper script from the
documentation. But you need to have exiftool installed!
Gerhard
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
12345