Skip to content

Extract better GPS coordinates from images using exiftool

Sometimes I have to extract Exif information from images, mostly the GPS coordinates. The coordinates coming raw from the images are not very helpful. Let's look at a picture I took today:

Bowl of ice cream

darktable shows the following coordinates:

latitude: N 52° 40,198'
longitude: E 013° 16,852'
elevation: 93,90 m above sea level

Now that is not very helpful, because neither OpenStreetMap nor Google recognize this format out of the box:

N 52° 40,198' E 013° 16,852'

Coordinates not working in OpenStreetMap

Coordinates not working in Google

Bummer. And I don't have the time or energy to fix that every time I need the coordinates. Luckily exiftool can output the coordinates in different formats, which is super helpful. For my use cases I choose the Degrees.MinutesSeconds format, also named "Decimal degrees", or DD. This format shows latitude and longitude geographic coordinates as decimal fractions of a degree.

exiftool -time:all -location:all -G -a -s -c "%.6f"

The explanation for the options used here:

  • -G: Print group name for each tag
  • -a: Allow duplicate tags to be extracted
  • -s: Short output format
  • -v: Print verbose messages
  • -q: Quiet processing
  • -c "%.6f": Set format for GPS coordinates

Using these settings, I get the following coordinates:

[Composite]     GPSAltitude                     : 93.9 m Above Sea Level
[Composite]     GPSLatitude                     : 52.669959 N
[Composite]     GPSLongitude                    : 13.280862 E
[Composite]     GPSPosition                     : 52.669959 N, 13.280862 E

Which sure enough brings me right to the ice cream place "Il Pistacchio" in Hohen Neuendorf, which I visited earlier today.

Il Pistacchio on OpenStreetMap

Enable and disable window dimming in KDE

When I make changes in OpenStreetMap, I often need to extract the object colour from a picture or a video, as example for a building, bench or a roof. This collides with a feature in KDE which I really like: Dim Inactive Windows.

The setting is in the KDE settings, under Desktop Effects -> Dim Inactive. As the name implies, it dims (makes them a bit more dark) all non-active windows - which makes it visually clear which window is currently active. Quite useful.

For picking a colour from a picture/video I'm using KColorChooser, which provides the colour in Hex code - exactly what I need in OSM.

However when KColorChooser is the active window, and all other windows are dimmed, it extracts the wrong colour from the picture/video - the colour which is already dimmed. Not what I need. Therefore when I do OSM edits, I temporarily disable this feature.

At first I went into the KDE settings, twice, but this is too many clicks. Then I figured out the commandline arguments to disable and enable this feature.

Disable "Dim Inactive":

kwriteconfig5 --file kwinrc --group Plugins --key diminactiveEnabled false
qdbus org.kde.KWin /KWin reconfigure

Enable "Dim Inactive":

kwriteconfig5 --file kwinrc --group Plugins --key diminactiveEnabled false
qdbus org.kde.KWin /KWin reconfigure

Now all I need to do is execute a small script which is in my personal ~/bin directory. Let the edits continue.

Note: I wish JOSM would have an integrated video player which also allows to pick colours. But so far I haven't found any such plugin.

Find fire stations in OpenStreetMap using Overpass Turbo

My kid got a new project: find fire stations. Google Maps is not really helpful here, obviously. And searching in the OpenStreetMap web interface is also a lot of work. But Overpass Turbo is able to find all the places.

 

Continue reading "Find fire stations in OpenStreetMap using Overpass Turbo"

Search objects based on a specific criteria (Key:name:etymology) in JOSM

This posting is mainly a reference for myself, because I was looking for this specific issue a couple times.

OpenStreetMap (OSM) is a map of the world, created by anyone who wants to contribute. It so happens that data might be missing (just go and add it, if you see that something is not on the map). It also happens that someone adds too much data.

In my case someone added "Wikidata" entries to each and every footpath.The OSM folks in Berlin made a great effort to find the etymology of names, and add them to Wikidata. And then link the street names to the Wikidata entries. That's nice and very useful, but it's enough to do that for streets. Not for every path, including the underground parking.

I raised this in the Berlin Telegram channel, and we agreed that it's best to keep the etymology tags to the main streets. Now I had to find all the entries which were tagged with a Wikidata entry, and update most of them.

 

Continue reading "Search objects based on a specific criteria (Key:name:etymology) in JOSM"

Traveling in Cuba (offline)

In 2019 I was in Cuba for a conference that took place there.

During the preparation of the trip it occured to me that internet access in the country is on the one hand slow and not well developed. On the other hand, that mobile internet access via roaming is obscenely expensive. It was foreseeable that I would have to do without mobile internet for a week, and consequently without online navigation. Preparations are in order.

 

Continue reading "Traveling in Cuba (offline)"

Unterwegs auf Kuba (offline)

2019 war ich auf Kuba, für eine Konferenz welche dort stattgefunden hat.

Bei der Vorbereitung der Reise stellte sich heraus dass der Internetzugang im Land einerseits langsam ist, und nicht gut ausgebaut. Und andererseits dass der mobile Internetzugang über Roaming obszön teuer ist. Es war also abzusehen dass ich eine Woche ohne mobiles Internet auskommen muss, und demzufolge auch ohne online Navigation. Vorbereitungen waren notwendig.

 

Continue reading "Unterwegs auf Kuba (offline)"

How I improve OpenStreetMap

OpenStreetMap is an awesome project. Contributors constantly improve a online map and add new data, fix items in the map which did change in the real world, or improve the data for a number of projects (1, 2, 3, 4, 5, 6, List) building on top of the map. Being outside a lot, I figured that I can contribute as well. It's just a question of how to transport the data from "out there" back to the laptop in my office. After probing around and trying a few tools, I came up with 3 different ways, depending on the situation and amount of changes.

 

Continue reading "How I improve OpenStreetMap"