Announcement

  •  » Extensions
  •  » GPS tags to Openstreetmap plugin

#1 2015-10-30 18:47:31

Irmage
Member
2014-06-29
9

GPS tags to Openstreetmap plugin

Hello forum,

I have ~10.000 pictures with GPS tags in metadatas (exif and xmp).
I have installed OpenStreetmap plugin 2.7.c as I prefer open source maps.

Unfortunately the location of my pictures are not shown in Openstreetmap plugin unless I insert the position manually.

Is there a way to transfer the GPS information of the meta datas to Openstreetmap Plugin?

I would appreciate this very much :-))

Here an example of meta datas:

Code:

$ exiftool SN851776.JPG 
ExifTool Version Number         : 9.90
File Name                       : SN851776.JPG
Directory                       : .
File Size                       : 2.9 MB
File Modification Date/Time     : 2015:10:30 17:41:36+01:00
File Access Date/Time           : 2015:11:01 22:13:49+01:00
File Inode Change Date/Time     : 2015:10:30 17:41:36+01:00
File Permissions                : rw-------
File Type                       : JPEG
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Exif Byte Order                 : Little-endian (Intel, II)
Make                            : SAMSUNG TECHWIN CO., LTD.
Camera Model Name               : Samsung S85
Orientation                     : Horizontal (normal)
X Resolution                    : 96
Y Resolution                    : 96
Resolution Unit                 : inches
Software                        : Shotwell 0.14.1
Modify Date                     : 2010:08:19 03:09:10
Y Cb Cr Positioning             : Co-sited
Copyright                       : Copyright 2007
Exposure Time                   : 1/88
F Number                        : 2.8
Exposure Program                : Program AE
ISO                             : 50
Exif Version                    : 0220
Date/Time Original              : 2010:08:19 03:09:10
Create Date                     : 2010:08:19 03:09:10
Components Configuration        : Y, Cb, Cr, -
Compressed Bits Per Pixel       : 3.023555644
Shutter Speed Value             : 1/85
Aperture Value                  : 2.9
Exposure Compensation           : 0
Max Aperture Value              : 2.8
Metering Mode                   : Multi-spot
Light Source                    : Unknown
Flash                           : No Flash
Focal Length                    : 6.3 mm
User Comment                    : Freiburg (im Breisgau)
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 2448
Exif Image Height               : 3264
Interoperability Index          : R98 - DCF basic file (sRGB)
Interoperability Version        : 0100
Sensing Method                  : One-chip color area
File Source                     : Digital Camera
Scene Type                      : Directly photographed
Exposure Mode                   : Auto
White Balance                   : Auto
Digital Zoom Ratio              : 1
Focal Length In 35mm Format     : 38 mm
Scene Capture Type              : Standard
Contrast                        : Normal
Sharpness                       : Normal
GPS Version ID                  : 2.3.0.0
GPS Latitude                    : 48 deg 0' 3.60"
GPS Longitude                   : 7 deg 49' 40.80"
Compression                     : JPEG (old-style)
Thumbnail Offset                : 1076
Thumbnail Length                : 3500
XMP Toolkit                     : Image::ExifTool 9.90
Subject                         : Freiburg, Restaurant, Urlaub
Current IPTC Digest             : 3a4963643dc62beb4cc5ee948894e4b8
Application Record Version      : 4
Originating Program             : Shotwell
Program Version                 : 0.14.1
Keywords                        : Freiburg, Restaurant, Urlaub
Image Width                     : 2448
Image Height                    : 3264
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:4:0 (1 2)
Aperture                        : 2.8
GPS Latitude Ref                : North
GPS Longitude Ref               : East
Image Size                      : 2448x3264
Megapixels                      : 8.0
Scale Factor To 35 mm Equivalent: 6.0
Shutter Speed                   : 1/88
Thumbnail Image                 : (Binary data 3500 bytes, use -b option to extract)
Circle Of Confusion             : 0.005 mm
Field Of View                   : 50.7 deg
Focal Length                    : 6.3 mm (35 mm equivalent: 38.0 mm)
GPS Position                    : 48 deg 0' 3.60", 7 deg 49' 40.80"
Hyperfocal Distance             : 2.85 m
Light Value                     : 10.4

I am a little familiar with "exiftool"
http://www.sno.phy.queensu.ca/~phil/exiftool/
so I could edit/manipulate GPS information/meta data with a bash script if necessary

Kind regards

Irmage


Piwigo-Version 2.7.4
Linux: Raspian Jessie
PHP: 5.6.14-0+deb8u1
MySQL: 5.5.44-0+deb8u1
grafik library: GD 2.1.1-dev

Last edited by Irmage (2015-11-01 22:32:01)

Offline

 

#2 2015-11-03 22:53:16

TheDoc
Member
Munich / Germany
2015-10-18
173

Re: GPS tags to Openstreetmap plugin

Hi Irmage,

can you verify that the coordinates are properly read from exit when uploading/synching pictures? I have the issues that latitude and longitude aren't set correctly in PiWigo (proabably due to shortcomings in the php library used to read exif data) and pictures don#t show up on the openstreetmap (see discussion in http://piwigo.org/forum/viewtopic.php?id=25997).

Once I overwrite the exit data directly in the database things work correctly. But a bit slow with approx. 8000 pictures with coordinates...

HTH,
Thomas

Offline

 

#3 2015-11-04 15:19:19

flop25
Piwigo Team
2006-07-06
7037

Re: GPS tags to Openstreetmap plugin

Hello
I'm using openstreetmap. I upload from Lightroom for those pictures

How do you upload? Do you have something in your local config?

Let me remind you that the plugin has its own repository https://github.com/xbgmsharp/piwigo-openstreetmap/


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#4 2015-11-04 23:09:58

Irmage
Member
2014-06-29
9

Re: GPS tags to Openstreetmap plugin

Thank you very much for supporting in this issue, as I got stuck on my own..

TheDoc wrote:

can you verify that the coordinates are properly read from exit when uploading/synching pictures?

Hm. At the moment I can only state, that the OSM icon (globe) is missing, when I view those pictures in Piwigo. What do I have to do to verify this?

The coordinates are stored in the meta data in the images as mentioned above. I have re-downloaded some images from Piwigo to verify that GPS datas are truly there and so they are.

TheDoc wrote:

I have the issues that latitude and longitude aren't set correctly in PiWigo (proabably due to shortcomings in the php library used to read exif data) and pictures don#t show up on the openstreetmap (see discussion in http://piwigo.org/forum/viewtopic.php?id=25997).

Sorry, I do not fully understand how this solved the problem :-/
You also show a link to the source code, but I am not that familiar with coding to use this information :-//

TheDoc wrote:

Once I overwrite the exit data directly in the database things work correctly. But a bit slow with approx. 8000 pictures with coordinates...

How exactly did you overwrite the exif data in the database?

flop25 wrote:

How do you upload? Do you have something in your local config?

To upload I used ftp transfer to /gallerie and then syncing files and folders including meta datas.
I also used the upload function of Shotwell, also including meta datas

By the way: Keywords (tags) from exif data are only shown, if uploaded by Shotwell (but still no GPS datas). Upload by ftp transfer (including sycing) does not show any of those tags.

Only little information is shown (ftp and shottwell connect):

Exif-Metadaten
Make
    SAMSUNG TECHWIN CO., LTD.
Model
    Samsung S85
DateTimeOriginal
    2015:08:23 14:26:10
ApertureFNumber
    f/4.9


flop25 wrote:

Do you have something in your local config?

What do you mean with local config?

Thanks for guiding me further through this issue :-)

regards

Irmage

----------------
BTW: As the space of the / partition is limited due to a 16 GB microSD card, I shifted all big datas of Piwigo to the external drive mounted at /media/pi/core/piwigo.
http://piwigo.org/forum/viewtopic.php?id=26033

Offline

 

#5 2015-11-06 15:58:49

TheDoc
Member
Munich / Germany
2015-10-18
173

Re: GPS tags to Openstreetmap plugin

Hi Irmage,

let me try to be a bit more clear with my remarks :-)

TheDoc wrote:

can you verify that the coordinates are properly read from exit when uploading/synching pictures?

The plugin doesn't use the data from the exif. Instead in the piwigo database there are fields latitude and longitude for each image that are used. Those fields are filled from the exif info while synching/uploading new files into the database.

In my case the php exif parser fails and therefore the data in the piwigo database (not the exif of the pictures!) is wrong. As a result the pictures don't show up in the map.

TheDoc wrote:

Once I overwrite the exit data directly in the database things work correctly. But a bit slow with approx. 8000 pictures with coordinates...

I do that via a SQL script that sets the fields latitude and longitude in the database to the correct values (the ones form the exif info). Afterwards, the pictures are shown in the map.

Have you tried looking at the exif info for a picture in your gallery? Thats the info you get when clicking on the kamera icon. In my case its all garbage - indicating that piwigo didn't manage to read the exif info properly.

HTH,
Thomas

Offline

 

#6 2015-11-06 22:40:18

Irmage
Member
2014-06-29
9

Re: GPS tags to Openstreetmap plugin

TheDoc wrote:

The plugin doesn't use the data from the exif. Instead in the piwigo database there are fields latitude and longitude for each image that are used.

OK, I understand

TheDoc wrote:

In my case the php exif parser fails and therefore the data in the piwigo database (not the exif of the pictures!) is wrong. As a result the pictures don't show up in the map.

Could be the same with me

TheDoc wrote:

I do that via a SQL script that sets the fields latitude and longitude in the database to the correct values

I have no clue with SQL scripting - would you let me use your script? This would be a great favour :-))

TheDoc wrote:

Have you tried looking at the exif info for a picture in your gallery?

Yes, but there is very little information shown (ref. my posting above), there is much more meta data in the picture. Information looks correct.

Do you know, if there is a bug report filed regarding the issues with exif parsing?
Its quite a drawback in usability :-(

Thanks for your great help so far

Irmage

---------------
PS: Now I also installed and activated Exif View 2.7.c and I resynced all files an folders including meta data.

Metadata synchronisation results

    26 photo information synchronised with file metadata
    26 candidate photos for metadata synchronisation
    Metadata used : filesize, width, height, date_creation, latitude, longitude

But still no GEO tags available.

Then I checked the database with phpMyAdmin.
In piwigo_images there are columns for latitude and longitude but they all contain NULL (except for those, I localized manually)

So my conclusion: It seems to be a synchronization issue

Last edited by Irmage (2015-11-07 17:53:24)

Offline

 

#7 2015-11-10 22:22:10

CChiappa
Member
2014-07-25
6

Re: GPS tags to Openstreetmap plugin

Irmage wrote:

flop25 wrote:

How do you upload? Do you have something in your local config?

To upload I used ftp transfer to /gallerie and then syncing files and folders including meta datas.
I also used the upload function of Shotwell, also including meta datas

By the way: Keywords (tags) from exif data are only shown, if uploaded by Shotwell (but still no GPS datas). Upload by ftp transfer (including sycing) does not show any of those tags.

I can't help with the GPS data (mine is correctly read), but for images developed with Darktable, I find I need to do this to get keywords to show up:

  exiftool -P -overwrite_original "-keywords+<subject" *.jpg

Essentially, there are multiple places you can keep tags/keywords/etc in the EXIF/IPTC/whatever metadata and php only looks in one.

Offline

 

#8 2019-02-11 19:06:58

Atari-Frosch
Member
2019-02-11
3

Re: GPS tags to Openstreetmap plugin

Hi, it seems I'm stuck with the same problem.

System: Debian GNU/Linux 9 (Stretch) with nginx, PHP 7.0 (php7.0-fpm), MariaDB;
current version of Piwigo (2.9.3 I guess, cannot find the version in the dashboard);
Plugins: OSM, Photo Update, (later) Exiftools GPS (and others that do not matter here);
Camera: Canon EOS 750D with gps receiver Canon GP-E2

I bought the gps receiver only a short time ago and used it the first time a few days ago for a series of around 120 photos. The gps data are in the exif data; exif (from exiftools) can „see“ them. The OSM plugin cannot. The files are in Piwigo's batch manager and additionally in an internal album I use for uploads.

What I already tried:

* installed Exiftools GPS (nothing happenend);
* updated one of the photos with the idea that the gps data might only get read in that process, but it did not help;
* tried to upload one of the photos again, but the photo_add got stuck for an unknown reason;
* tried synchronizing the meta data, but it said it processed 0 photos (dry mode and real mode).

What I found out: The problem could be the so called maker notes, a binary, proprietary data block of around 8kB in the exif data of each file. The description of the plugin Exiftools GPS explicitly mention those. I have no clue what happens if I try to remove them with the exiftools (and as I don't have experience with them, I even don't know how to accomplish that).

Example for the gps data in the exif data the gps receiver writes:

Code:

GPS Tag Version     |2.3.0.0
North or South Latit|N
Latitude            |51, 12.0512,  0
East or West Longitu|E
Longitude           | 6, 50.2843,  0
Altitude Reference  |Sea level
Altitude            |45.4
GPS Time (Atomic Clo|13:56:11.00
GPS Satellites      |12
GPS Receiver Status |A
GPS Measurement Mode|3
Measurement Precisio|2.3
Geodetic Survey Data|WGS-84
GPS Date            |2019:02:09

So, how am I supposed to get those data into Piwigo's database so that the OSM plugin can and will use them?

Offline

 

#9 2019-02-11 19:26:20

flop25
Piwigo Team
2006-07-06
7037

Re: GPS tags to Openstreetmap plugin

Tools/metadata.php is a file in the Piwigo folders to help users to check what the server reads from the Metadata of a file
Please open a new thread Thank you ?


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 
  •  » Extensions
  •  » GPS tags to Openstreetmap plugin

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact