Hello!
Unfortunately most of my photos haven't had GPS coordinates because they was scaned or made photo by camera without GPS.
I have marked IPTC position/city/state/country for them and it will be good idea!
I have a few thinks about how it will be good to work:
Many places may be out of cities, but may contain searchable names (for example "Sognefjorden" is the fjord in Norway. I can search it by Google maps (https://www.google.com/maps/place/Sogne b81323cb38), but cann't search it by http://stevemorse.org/jcal/latlon.php because I nave to type city in this service)
It will be good if OpenStreetMap read ("city" OR/and "state") and "country" OR "position" (free text, like "Sognefjorden") if "city" is empty (for example)
If it worked with not only English (like Google Maps) it would be great!
In attachment photo with filled IPTC fields Country = "Norway" and Position "Norway, Sognefjorden" http://media.aronov.su/tools/metadata.php show for it file:
2#005 = Ñîãíå-ôüîðä
2#025 = Sognefjorden,Íîðâåãèÿ,Ñîãíå-ôüîðä
2#080 = Leonid Aronov
2#092 = Norway, Sognefjorden
2#101 = Norway
2#116 = Leonid Aronov
**Reported by xbgmsharp on 19 Mar 2015 17:19**
**Version:** 2.7.4
From http://piwigo.org/forum/viewtopic.php?pid=158156#p158156
Hello!
Unfortunately most of my photos haven't had GPS coordinates because they was scaned or made photo by camera without GPS.
I have marked IPTC position/city/state/country for them and it will be good idea!
I have a few thinks about how it will be good to work:
- Many places may be out of cities, but may contain searchable names (for example "Sognefjorden" is the fjord in Norway. I can search it by Google maps (https://www.google.com/maps/place/Sogne b81323cb38), but cann't search it by http://stevemorse.org/jcal/latlon.php because I nave to type city in this service)
- It will be good if OpenStreetMap read ("city" OR/and "state") and "country" OR "position" (free text, like "Sognefjorden") if "city" is empty (for example)
- If it worked with not only English (like Google Maps) it would be great!
In attachment photo with filled IPTC fields Country = "Norway" and Position "Norway, Sognefjorden"
http://media.aronov.su/tools/metadata.php show for it file:
2#005 = Ñîãíå-ôüîðä
2#025 = Sognefjorden,Íîðâåãèÿ,Ñîãíå-ôüîðä
2#080 = Leonid Aronov
2#092 = Norway, Sognefjorden
2#101 = Norway
2#116 = Leonid Aronov
[Piwigo Bugtracker #3213](http://piwigo.org/bugs/view.php?id=3213)
<!-- github-sync-id:97252312 -->
**Comment posted by xbgmsharp on 19 Mar 2015 17:20**
A working PoC.
Install curl module for PHP
Code:
# apt-get install php5-curl
Add in you configuration the following parameters:
Code:
$conf['show_iptc'] = true;
$conf['use_iptc'] = true;
$conf['iptc_to_gps'] = true;
$conf['show_iptc_mapping'] = array(
'iptc_keywords' => '2#025',
'iptc_caption_writer' => '2#122',
'iptc_byline_title' => '2#085',
'iptc_caption' => '2#120',
'iptc_country' => '2#101',
'iptc_countrycode' => '2#100',
'iptc_state' => '2#095',
'iptc_sublocation' => '2#092',
'iptc_city' => '2#090',
);
Replace the file /include/functions_metadata.inc.php by the one attach.
When you sync metadata, it will populate the latitude and longitude with the data from http://nominatim.openstreetmap.org if any.
<!-- github-comment-id:124899254 -->
Check for any of the location IPTC metadata are present
If any run a CURL query to nominatim.openstreetmap.org
If any reply, check for lat and lon.
If any valid lat and lon return it an array to be sync in the database.
**Comment posted by xbgmsharp on 19 Mar 2015 17:49**
The code does the following:
- Check for $conf['iptc_to_gps'] to be true.
- Check for any of the location IPTC metadata are present
- If any run a CURL query to nominatim.openstreetmap.org
- If any reply, check for lat and lon.
- If any valid lat and lon return it an array to be sync in the database.
<!-- github-comment-id:124899271 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Reported by xbgmsharp on 19 Mar 2015 17:19
Version: 2.7.4
From http://piwigo.org/forum/viewtopic.php?pid=158156#p158156
Hello!
Unfortunately most of my photos haven't had GPS coordinates because they was scaned or made photo by camera without GPS.
I have marked IPTC position/city/state/country for them and it will be good idea!
I have a few thinks about how it will be good to work:
In attachment photo with filled IPTC fields Country = "Norway" and Position "Norway, Sognefjorden"
http://media.aronov.su/tools/metadata.php show for it file:
2#005 = Ñîãíå-ôüîðä
2#025 = Sognefjorden,Íîðâåãèÿ,Ñîãíå-ôüîðä
2#080 = Leonid Aronov
2#092 = Norway, Sognefjorden
2#101 = Norway
2#116 = Leonid Aronov
Piwigo Bugtracker #3213
Comment posted by xbgmsharp on 19 Mar 2015 17:20
A working PoC.
Install curl module for PHP
Code:
apt-get install php5-curl
Add in you configuration the following parameters:
Code:
$conf['show_iptc'] = true;
$conf['use_iptc'] = true;
$conf['iptc_to_gps'] = true;
$conf['show_iptc_mapping'] = array(
'iptc_keywords' => '2#025',
'iptc_caption_writer' => '2#122',
'iptc_byline_title' => '2#085',
'iptc_caption' => '2#120',
'iptc_country' => '2#101',
'iptc_countrycode' => '2#100',
'iptc_state' => '2#095',
'iptc_sublocation' => '2#092',
'iptc_city' => '2#090',
);
Replace the file /include/functions_metadata.inc.php by the one attach.
When you sync metadata, it will populate the latitude and longitude with the data from http://nominatim.openstreetmap.org if any.
Comment posted by xbgmsharp on 19 Mar 2015 17:49
The code does the following: