reverse
Category: Blog

Reverse Geocoding Updates

Camera Bits’ Development Team has been hard at work on updating our local Reverse Geocode server, and it’s now available for use! Reverse Geocoding is a feature of Photo Mechanic that when an image has GPS data associated with it, PM can do the look up of city name, country name, and/or other geographic tags and insert the names into the IPTC Metadata for the image, where they can then be used with variables such as {city}, {country}, etc. This feature has been a readily available tool for users of Photo Mechanic 6 and Photo Mechanic Plus, and the new server updates increase the depth of information that can be added. In this blog post from Pablo, our Director of Software Development, we’ll go over what Reverse Geocoding is, what has changed, and how you can help us improve the server.

An Overview of Reverse Geocoding

Reverse Geocoding is the process of converting a geographic coordinate to an easily understood address/place name. OpenStreetMap (OSM) is a “collaborative project to create a free editable geographic database of the world”.

Nominatim is a tool used to search OSM data for reverse geocoding. Camera Bits maintains a local server containing an instance of an OSM database of the world and Nominatim software used to query the OSM database.

As mentioned, OSM relies on collaboration from the user population to maintain its accuracy, similar to the Wikipedia model. Because of this it is possible that a location that you wish to reverse geocode may return with inaccurate or incomplete information. To correct this as a user, you have the ability to log in to the public OSM website and make edits to your area of interest. This can include: adding house numbers, updating businesses, correcting boundaries, etc. Some of the key steps in editing OSM data are highlighted at the end of this post.

Camera Bits Updates

We have recently completed upgrading the local Reverse Geocoding server to the latest version of Nominatim software (v4.2) as well as the latest OpenStreetMap (OSM) dataset of the world. These updates allow us to perform periodic updates of OSM data so that customers will always have the latest changes introduced by users around the world. It also allows us to enhance some of the data returned so that it is more usable by our customers.

A notable change that users will notice is that the IPTC ‘Location:’ field will have more detail after reverse geocoding.

Example: Comparison of ‘Location’ field data

Existing server “Location” New server “Location”
472 Camera Bits, 472 South 1st Avenue, Washington County, 97123
Eiffel Tower Eiffel Tower, 5 Avenue Anatole France, Gros-Caillou, Paris, Metropolitan France, 75007
Empire State Building Empire State Building, 350 5th Avenue, Manhattan Community Board 5, New York County, 10018

Participation in Server Evaluation

In order to help ensure a smooth transition to the new server, we offer our customers the opportunity to try out Reverse Geocoding on the new server and look forward to any feedback you may have. We greatly appreciate your involvement.

To access the new Reverse Geocoding server during this pre-release phase, you must be running a build of Photo Mechanic with a build number of 6645 or higher. Please visit https://home.camerabits.com/downloads/ to ensure you have the latest build.

You will need to create the following file and save it to your computer (location will depend on whether you are a Windows or Mac user). Regardless of your platform, you will need to create a new plain text file called: PMDebug.txt.

Contents of this file should be the following line of text:

REVERSE_GEOCODING_SERVER 23.227.170.157

For Mac users, copy PMDebug.txt to the Photo Mechanic Preferences folder

To get there, switch to Finder. Then use the “Go to Folder…” the Go menu in the Menu bar. In the window that appears, enter:

~/Library/Preferences/com.camerabits.PhotoMechanic

and press Return. The folder should now be displayed. Copy your PMDebug.txt file there.

For Windows users, copy PMDebug.txt to:

C:\Users\<your username>\AppData\Roaming\Camera Bits, Inc\PhotoMechanic

To get there, open a Windows Explorer window and Navigate to the C:\ drive and double-click on each folder in the path above (first Users, then your account’s user folder, then AppData, and so on.)

Next, it is best that you verify that Photo Mechanic is able to access the new server and retrieve the proper information:

  1. Ensure you have the latest Photo Mechanic (November 2022) and PMDebug.txt installed in the above location.
  2. Launch Photo Mechanic.
  3. Right click on an image and select “Set GPS Coordinates” from the pop-up menu that appears.
  4. Enter “Camera Bits, Oregon” in the entry field underneath the map, click ‘Get GPS’ and then click ‘ACCEPT’.
  5. Screenshot of GPS screen in Photo Mechanic

  6. Click the ‘…’ button (located to the right of the ‘Reverse Geocode’ checkbox) and verify the globe icons are green. If they are not, click the globe to the left of the name of the field that you would like to reverse geocode; the globe will turn green to indicate that it is enabled. Click OK to confirm your choices.
  7. This will take you back to the ‘Set GPS Coordinates dialog. Click ‘Apply’, then ‘Close’.
  8. You should now be back at the contact sheet. Open the Metadata (IPTC) Info dialog and verify that the Location: field looks similar to the example below:
    Screenshot of Photo Mechanic

If, after performing the above steps, the “Location” field only shows ‘472’, then either you are not running the latest version of Photo Mechanic or the application could not find PMDebug.txt. Please double check you installed things properly and try again. If there is still an issue, please contact Camera Bits Tech Support.

Editing OSM Database (Optional)

An addendum from the Development Team:

To learn more about how to edit OSM data, I suggest doing a web search for “openstreetmap edit tutorial”. There are numerous websites and YouTube tutorials available. Although I do not profess to be an expert in editing OSM data, I personally had to update OSM to include my house number which was missing from my home GPS location.

Disclaimer: OpenStreetMaps (OSM) is a third party resource that Camera Bits uses to perform Reverse Geocoding. Other than making use of the data on OSM, Camera Bits takes no responsibility for the accuracy of the data within OSM. Although OpenStreetMap has millions of users, geographic information is always changing, so it is always worth double-checking the results returned by our Reverse Geocoding tool, and updating the data yourself if you find an issue.

So, here is what I learned:

  • Go to: https://www.openstreetmap.org/welcome This will take you to a Welcome page describing OSM features, as well as help information.
  • You will need to create a free account in order to be able to edit the database. Click on Sign up to do so. Otherwise, you will not be able to perform edits.
  • Once you are logged in, enter an address in the Search box.
  • Verify it is within the area you are interested in, then click Edit -> Edit with ID

    Screenshot of OpenStreetMap

    You should now see a satellite image of your area of interest.

    Screenshot of OpenStreetMap

    Each red box denotes a house. If your residence of interest is missing any markings, then you can add them via the Area tool. You can then enter specific information for that location (such as house number and address).

    Finally, you publish the changes.

    Note: To see the changes in Photo Mechanic, you will need to wait approximately two hours for our local server to acquire your changes from the public database. You will need to restart Photo Mechanic in order to clear the cache that it stores, otherwise it will re-use the cached information from your previous query to that location when you re-apply Reverse Geocoding.

We hope that you get a chance to explore the updated Reverse Geocode server and welcome any feedback or questions you may have. Happy Photographing!

Prev. post
Alt Text: New Accessibility Metadata Fields in Photo Mechanic
< Back to grid
Next. post
Photo Mechanic 1.0
Archive