Jump to content

Digikam/GSoC2010/ReverseGeocoding: Difference between revisions

From KDE Community Wiki
Gvoicu (talk | contribs)
No edit summary
m Polish
Line 8: Line 8:
==Use Cases==
==Use Cases==


Lets say you are an user who wants to have for every photo the location where it was made. Also, let's say that you have some photos with coordinates inside metadata and some photos without coordinates.All the operations will be made inside Correlator2 Widget.
Lets say you are an user who wants to have for every photo the location where it was made. Also, let's say that you have some photos with coordinates inside metadata and some photos without coordinates. All the operations will be made inside Correlator2 Widget.


Now, before you apply the reverse geocoding service,you need to set some parameters.Firstly, you need to write some information in a configure dialog that will be used for every service appliance. The configure dialog contains information about: address elements returned(country, city, district, street), service used to retrieve data(google maps, open street map, geonames.org) and your language(needed special characters). Secondly,before every call to reverse geocoding service you need to select a base tag in your tag tree to let the program know where to put the new resulted "location tags". The location tags will reside on the next level below your selected base tag.
Now, before you apply the reverse geocoding service, you need to set some parameters. Firstly, you need to write some information in a configure dialog that will be used for every service appliance. The configure dialog contains information about: address elements returned (country, city, district, street), service used to retrieve data (google maps, open street map, geonames.org) and your language (needed for special characters and town names that are different in each language, for example Köln vs. Cologne). Secondly, before every call to the reverse geocoding service you need to select a base tag in your tag tree to let the program know where to put the new resulted "location tags". The location tags will reside on the next level below your selected base tag.


For example, if you have:
For example, if you have:

Revision as of 09:15, 16 May 2010

Reverse geocoding will be implemented for the new version of the GPSSync plugin as part of GSOC by Gabriel Voicu, mentored by Michael G. Hansen.


Short description

The idea of reverse geocoding is that when the coordinates on earth of an image are known, the application retrieves the associated human readable location: City, street, country, etc. and stores this information in the image. The location names can be stored in the images as new tags, allowing the user to easily search for all pictures he took in a country, city or even street.

Use Cases

Lets say you are an user who wants to have for every photo the location where it was made. Also, let's say that you have some photos with coordinates inside metadata and some photos without coordinates. All the operations will be made inside Correlator2 Widget.

Now, before you apply the reverse geocoding service, you need to set some parameters. Firstly, you need to write some information in a configure dialog that will be used for every service appliance. The configure dialog contains information about: address elements returned (country, city, district, street), service used to retrieve data (google maps, open street map, geonames.org) and your language (needed for special characters and town names that are different in each language, for example Köln vs. Cologne). Secondly, before every call to the reverse geocoding service you need to select a base tag in your tag tree to let the program know where to put the new resulted "location tags". The location tags will reside on the next level below your selected base tag.

For example, if you have:

  • myTag1
    • myTag2
    • myTag3

and you select myTag2 and your photo coordinates are (53.534325,-2.207343), your tag tree will be:

  • myTag1
    • myTag2
      • England
        • Manchester
          • M60
    • myTag3

If your photo has coordinates, you can click the "Apply Reverse Geocoding" button and digiKam occupies with the rest. If your photo doesn't have coordinates you can drag-and-drop the photos on the map found inside the Correlator Widget and the coordinates together with location tags will be added automatically based on your early configured settings.

Where is the code?

  • gsoc-geocoding: General place for experiments and small code snippets.
  • GPSSync2: New version of the GPSSync plugin.
  • WorldMapWidget2: Widget to display the location of images on both Google Maps and Marble. Required by GPSSync2.

Backends

Google Maps

Google Maps V3 API

  • provides both reverse geocoding and elevation information
  • for a given coordinate, returns the next address elements if they exists:
    • country
    • state
    • county
    • city
    • district
    • street
    • street number

OpenStreetMap Nominatim

OSM Nominatim

  • Marble already has integration for this service
  • Address elements returned, if they exists:
    • country
    • state
    • state district
    • county
    • city
    • city district
    • street

Geonames.org

geonames.org

  • provides both reverse geocoding and elevation information
  • returned address elements if they exists:
    • country
    • state
    • county
    • city
    • a list of nearby streets for non-USA
    • nearest street for USA only
    • distance from the the given coordinate to returned address

Storing information

The textual location descriptions can be stored as tags and in the dedicated location fields provided by XMP and IPTC. However, there are some competing tags which store the same information.