<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>geotagging &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/geotagging/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Mon, 06 Apr 2026 14:28:44 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>geotagging &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Android now stops you sharing your location in photos]]></title>
		<link>https://shkspr.mobi/blog/2026/04/android-now-stops-you-sharing-your-location-in-photos/</link>
					<comments>https://shkspr.mobi/blog/2026/04/android-now-stops-you-sharing-your-location-in-photos/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Mon, 13 Apr 2026 11:34:48 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[geotagging]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[OpenBenches]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=70143</guid>

					<description><![CDATA[My wife and I run OpenBenches. It&#039;s a niche little site which lets people share photos of memorial benches and their locations. Most modern phones embed a geolocation within the photo&#039;s metadata, so we use that information to put the photos on a map.  Google&#039;s Android has now broken that.  On the web, we used to use:  &#60;input type=&#34;file&#34; accept=&#34;image/jpeg&#34;&#62;   That opened the phone&#039;s photo picker…]]></description>
										<content:encoded><![CDATA[<p>My wife and I run <a href="https://openbenches.org">OpenBenches</a>. It's a niche little site which lets people share photos of memorial benches and their locations. Most modern phones embed a geolocation within the photo's metadata, so we use that information to put the photos on a map.</p>

<p>Google's Android has now broken that.</p>

<p>On the web, we used to use:</p>

<pre><code class="language-html">&lt;input type="file" accept="image/jpeg"&gt;
</code></pre>

<p>That opened the phone's photo picker and let the use upload a geotagged photo. But a while ago Google deliberately broke that.</p>

<p>Instead, we were <a href="https://issuetracker.google.com/issues/243294058#comment27">encourage to use the <em>file</em> picker</a>:</p>

<pre><code class="language-html">&lt;input type="file"&gt;
</code></pre>

<p>That opened the default file manager. This had the unfortunate side-effect of allowing the user to upload <em>any</em> file, rather than just photos. But it did allow the EXIF metadata through unmolested.  <a href="https://issuetracker.google.com/issues/428397711">Then Google broke that as well</a>.</p>

<p>Using a "Progressive Web App" doesn't work either.</p>

<p>So, can users transfer their photos via Bluetooth or QuickShare? No. <a href="https://issuetracker.google.com/issues/485307531">That's now broken as well</a>.</p>

<p>You can't even directly share via email without the location being stripped away.</p>

<p>Literally the <em>only</em> way to get a photo with geolocation intact is to plug in a USB cable, copy the photo to your computer, and then upload it via a desktop web browser?</p>

<h2 id="why"><a href="https://shkspr.mobi/blog/2026/04/android-now-stops-you-sharing-your-location-in-photos/#why">Why?!?!?</a></h2>

<p><del>Because Google run an anticompetitive monopoly on their dominant mobile operating system.</del></p>

<p>Privacy.</p>

<p>There's a worry that users don't know they're taking photos with geolocation enabled. If you post a cute picture of your kid / jewellery / pint then there's a risk that a ne’er-do-well could find your exact location.</p>

<p>Most social media services are sensible and strip the location automatically. If you try to send a geotagged photo to Facebook / Mastodon / BlueSky / WhatsApp / etc, they default to <em>not</em> showing the location. You can add it in manually if you want, but anyone downloading your photo won't see the geotag.</p>

<p>And, you know, I get it. Google doesn't want the headline "Stalkers found me, kidnapped my baby, and stole my wedding ring - how a little known Android feature puts you in danger!"</p>

<p>But it is just so <em>tiresome</em> that Google never consults their community. There was no advance notice of this change that I could find. Just a bunch of frustrated users in my inbox blaming me for breaking something.</p>

<p>I don't know what the answer is. Perhaps a pop up saying "This website wants to see the location of your photos. Yes / No / Always / Never"? People get tired of constant prompts and the wording will never be clear enough for most users.</p>

<p>It looks like the only option available will be to develop a native Android app (and an iOS one?!) with all the cost, effort, and admin that entails. Android apps have <a href="https://developer.android.com/training/data-storage/shared/media#location-media-captured">a special permission for accessing geolocation in images</a>.</p>

<p>If anyone has a <em>working</em> way to let Android web-browsers access the full geolocation EXIF metadata of photos uploaded on the web, please drop a comment in the box.</p>

<p>In the meantime, please leave a +1 on <a href="https://github.com/whatwg/html/issues/11724#issuecomment-4192228562">this HTML Spec comment</a>.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=70143&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2026/04/android-now-stops-you-sharing-your-location-in-photos/feed/</wfw:commentRss>
			<slash:comments>18</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Reverse Geocoding is Hard]]></title>
		<link>https://shkspr.mobi/blog/2025/04/reverse-geocoding-is-hard/</link>
					<comments>https://shkspr.mobi/blog/2025/04/reverse-geocoding-is-hard/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 25 Apr 2025 11:34:39 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[geotagging]]></category>
		<category><![CDATA[OpenBenches]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=59857</guid>

					<description><![CDATA[My wife and I run OpenBenches - a crowd-sourced database of nearly 40,000 memorial benches.  Every bench is geo-tagged with a latitude and longitude. But how do you go from a string of digits to something human readable?  How do I turn -33.755780,150.603769 into &#34;42 Wallaby Way, Sydney, Australia&#34;?  Luckily, that&#039;s a (somewhat) solved problem. Services like OpenCage, StadiaMaps, OpenStreetMap,…]]></description>
										<content:encoded><![CDATA[<p>My wife and I run <a href="https://openbenches.org/">OpenBenches</a> - a crowd-sourced database of nearly 40,000 memorial benches.  Every bench is geo-tagged with a latitude and longitude. But how do you go from a string of digits to something human readable?</p>

<p>How do I turn <code>-33.755780,150.603769</code> into "42 Wallaby Way, Sydney, Australia"?</p>

<p>Luckily, that's a (somewhat) solved problem. Services like <a href="https://opencagedata.com/">OpenCage</a>, <a href="https://stadiamaps.com/">StadiaMaps</a>, <a href="https://nominatim.openstreetmap.org">OpenStreetMap</a>, and <a href="https://geocode.earth/">Geocode.Earth</a> all provide APIs which transform co-ordinates into addresses.  Done! Let's go home.</p>

<p>Except… Not everywhere <em>has</em> an address.  <a href="https://openbenches.org/bench/35905">Some benches are in parks</a>. They typically don't have a street number, but might have an interesting feature nearby to help with location. For example a statue or prominent landmark.</p>

<p>And… Not every address is relevant. <a href="https://openbenches.org/bench/26061">Some benches are on streets</a>. But we probably don't want to imply that the bench is <em>inside</em> or belongs to a specific nearby house.</p>

<p>Let's step back a bit. <em>Why</em> do we want to display a human-readable address?</p>

<p>We have two use-cases.</p>

<p>"As a visitor to the site, I want to:"</p>

<ol>
<li>Read a (rough) textual representation of where the bench is.</li>
<li>Click on a component of the address to see all benches within that area.</li>
</ol>

<p>The first is easy to explain:</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2025/04/OB-Address.webp" alt="Map. Under it is an address of &quot;Middlewich, Cheshire East, England, United Kingdom&quot;." width="1134" height="638" class="aligncenter size-full wp-image-59858">

<p>The second is harder.  Suppose a bench is in Wellington, New Zealand. We want to create a URl like <a href="https://openbenches.org/location/New%20Zealand/Wellington/">openbenches.org/location/New Zealand/Wellington/</a>. That way, users can click on the word "Wellington" and find all the benches nearby. A user can also manually edit that URl to increase or decrease precision.</p>

<p>Both of these are problems of <em>precision</em>.</p>

<p>Let's take a look at <a href="https://nominatim.openstreetmap.org/reverse?lat=51.476845&amp;lon=-0.295296&amp;format=jsonv2">how one of the reverse geocoding services</a> deals with transforming <code>51.476845,-0.295296</code> into an address:</p>

<blockquote><p>Royal Botanic Gardens, Kew, Sandycombe Road, Kew, London Borough of Richmond upon Thames, London, Greater London, England, TW9 2EN, United Kingdom</p></blockquote>

<p><strong>That is <em>too much</em> address!</strong></p>

<p>Yes, it is technically accurate. But it contains far too much detail for humans, the postcode is irrelevant, and the weird-subdivisions are nothing that a local person would use.</p>

<p>Looking at the full API response, we can see:</p>

<pre><code class="language-json">{
  "place_id": 258770727,
  "licence": "Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright",
  "name": "Royal Botanic Gardens, Kew",
  "display_name": "Royal Botanic Gardens, Kew, Elizabeth Cottages, Kew, London Borough of Richmond upon Thames, London, Greater London, England, TW9 3NJ, United Kingdom",
  "address": {
    "leisure": "Royal Botanic Gardens, Kew",
    "road": "Elizabeth Cottages",
    "suburb": "Kew",
    "city_district": "London Borough of Richmond upon Thames",
    "ISO3166-2-lvl8": "GB-RIC",
    "city": "London",
    "state_district": "Greater London",
    "state": "England",
    "ISO3166-2-lvl4": "GB-ENG",
    "postcode": "TW9 3NJ",
    "country": "United Kingdom",
    "country_code": "gb"
  }
}
</code></pre>

<p>Aha! Perhaps I can build a better address using just those components!</p>

<p>Except… Not every country has states. And not all states are used when giving addresses. Not every location is in a city. Some places have villages, prefectures, municipalities, and hamlets.</p>

<p>New York, New York is a valid address, but <a href="https://blog.opencagedata.com/post/99059889253/good-looking-addresses-solving-the-berlin-berlin">Berlin, Berlin</a> is not!</p>

<p>There's an <a href="https://github.com/OpenCageData/address-formatting">address formatter by OpenCage</a> which is pretty sensible about stripping off irrelevant details. But, to go back to my first point, not every map location on OpenBenches is a street address and - even if it is on a street - it probably shouldn't have a house number.</p>

<p>Well, there's kind of a solution to that! Most mapping provider have a <abbr title="Point of Interest">POI</abbr> function - we can find nearby things of interest and use them as a location.</p>

<p>Here's a <a href="https://openbenches.org/bench/36734">bench in Cook County, Illinois, USA</a>. The POI address is:</p>

<pre><code class="language-json">{
…
   "name": "Central Park",
   "coarse_location": "Des Plaines, IL, USA",
…
}
</code></pre>

<p>I <em>assume</em> there's only one Central Park in Des Plaines. Do people know that "Il" is Illinois? Would "Cook County" be useful?</p>

<p>On the subject of localisation, not everywhere speaks English. Do I want to display addresses like "<span lang="ja">原爆の子の像, 広島, 日本</span>"? How about "原爆の子の像, Hiroshima, Japan"?</p>

<p>We're an international site, but most benches are in Anglophone countries.</p>

<p>Of course, just because something is <em>physically</em> near a POI, that doesn't mean it is <em>logically</em> close to it.</p>

<p>Consider a bench situated <a href="https://www.openstreetmap.org/query?lat=50.580682&amp;lon=-3.467831">at the edge of this park</a>
<img src="https://shkspr.mobi/blog/wp-content/uploads/2025/04/map.webp" alt="A map, with a marker situated just across a river." width="1328" height="1060" class="aligncenter size-full wp-image-59864"></p>

<p>The nearest POI is "Gay's Creamery" - across the river. Is that what you'd expect?  Is there any way to easily say "if a point is <em>inside</em> an amenity* then use that as the address?</p>

<p>I don't want the users of our site to have to select from a list of POIs or addresses, this should be as automated as possible.</p>

<h2 id="the-plan"><a href="https://shkspr.mobi/blog/2025/04/reverse-geocoding-is-hard/#the-plan">The Plan</a></h2>

<p>For each bench:</p>

<ol>
<li>Use StadiaMaps to get the nearest POI.</li>
<li>Get the data in English.</li>
<li>Concatenate the name and coarse location.</li>
<li>Save the "address".</li>
<li>Wait for complaints?</li>
</ol>

<p>Thoughts?</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=59857&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2025/04/reverse-geocoding-is-hard/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Dabr - Reply to all and Geotagging]]></title>
		<link>https://shkspr.mobi/blog/2010/03/dabr-reply-to-all-and-geotagging/</link>
					<comments>https://shkspr.mobi/blog/2010/03/dabr-reply-to-all-and-geotagging/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 24 Mar 2010 11:36:39 +0000</pubDate>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[dabr]]></category>
		<category><![CDATA[geotagging]]></category>
		<category><![CDATA[twitter]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=1881</guid>

					<description><![CDATA[People have been very excited to see some new functionality in Dabr - the mobile Twitter client I develop for.  But what is it and how does it work?  @@ and geotag  Reply to All  The @@ symbol allows you to reply to all the people mentioned within the tweet. It only shows up on tweets which mention other users - so you should only ever see it when it can be used.  Hitting @@ on the above tweet…]]></description>
										<content:encoded><![CDATA[<p>People have been very excited to see some new functionality in <a href="http://m.dabr.co.uk/">Dabr</a> - the mobile Twitter client I develop for.  But what is it and how does it work?</p>

<p></p><div id="attachment_1882" style="width: 456px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-1882" class="size-full wp-image-1882" title="@@ and geotag" src="https://shkspr.mobi/blog/wp-content/uploads/2010/03/@@-and-geotag.png" alt="@@ and geotag" width="446" height="60"><p id="caption-attachment-1882" class="wp-caption-text">@@ and geotag</p></div><p></p>

<h2 id="reply-to-all"><a href="https://shkspr.mobi/blog/2010/03/dabr-reply-to-all-and-geotagging/#reply-to-all">Reply to All</a></h2>

<p>The <strong>@@</strong> symbol allows you to reply to all the people mentioned within the tweet.
It only shows up on tweets which mention other users - so you should only ever see it when it can be used.</p>

<p>Hitting <strong>@@</strong> on the above tweet will pre-populate the text box with "@topgold @whatleydude @dabr".</p>

<p>It should remove any duplicates and should also remove your username.</p>

<h2 id="geotagging"><a href="https://shkspr.mobi/blog/2010/03/dabr-reply-to-all-and-geotagging/#geotagging">Geotagging</a></h2>

<p>Twitter recently allowed the geotagging of tweets.  This allows you to set the longitude and latitude of where you are when you wrote your message.
Clicking on the green globe (it just looks like a dot at that size!) takes you to a mobile mapping service.</p>

<p></p><div id="attachment_1884" style="width: 330px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-1884" class="size-full wp-image-1884" title="Google Maps Mobile" src="https://shkspr.mobi/blog/wp-content/uploads/2010/03/snap20100324_110828.png" alt="Google Maps Mobile" width="320" height="480"><p id="caption-attachment-1884" class="wp-caption-text">Google Maps Mobile</p></div><p></p>

<p>It only shows up on tweets which are geotagged - so you should only ever see it when it can be used.</p>

<h2 id="how-does-it-work"><a href="https://shkspr.mobi/blog/2010/03/dabr-reply-to-all-and-geotagging/#how-does-it-work">How Does It Work?</a></h2>

<p>You can see <a href="http://code.google.com/p/dabr/source/list">all the code in the SVN</a>, but here's a quick rundown.</p>

<p>Geotagging is very simple.&nbsp; Statuses now have a &lt;geo&gt; field.&nbsp; If this is populated, it will contain a longitude and latitude.</p>

<p>﻿We can take those values and pass them to Google Maps Mobile (or your favourite mobile mapping service).</p>

<pre>if ($geo !== null)
{
   $latlong = $geo-&gt;coordinates;
   $lat = $latlong[0];
   $long = $latlong[1];
   $actions[] = theme('action_icon', "http://maps.google.co.uk/m?q={$lat},{$long}", 'images/map.png', 'MAP');
}</pre>

<p>Reply to all is a little more involved.
Twitter provide an <a href="https://blog.x.com/engineering/en_us/a/2010/introducing-the-open-source-twitter-text-libraries">excellent set of Text Libraries</a>.  These provide officially sanctioned regular expressions to help your project find URLs, hashtags and usernames.</p>

<p>Using the <a href="http://github.com/mzsanford/twitter-text-php/">Twitter Text Extractor class</a> we can determine how many usernames are mentioned in a tweet.  Any duplicates are removed - as is the user's username.</p>

<p>Any questions - just ask!</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=1881&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2010/03/dabr-reply-to-all-and-geotagging/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
