Archive for the ‘geo’ Category

Geolocated websites on the go?

Monday, June 22nd, 2009

Want to quickly access location based websites, while on the go?

Then enter:

into your mobile browser.

Very privative, only goes to the nearby location links service, and a few pages on geograph. But between them give access to a fair number of (UK esp) websites.

Disclaimer: Only tested on a Google Android phone so far. Doesn’t seem to pickup GPS position (yet). To be honest surprised not found something like this in the Android Market.

If works out will probably add direct links to other websites, and possibly make it configurable so can choose which sites to show :)

ITM <-> WGS84 (<-> Irish Grid <-> British National Grid) PHP code

Wednesday, May 13th, 2009

With Ireland soon to be moving to ITM (Irish Transverse Mercator) coordinates, over IG (Irish Grid) that has been used since about 1965 in Ireland, many websites – including and will be looking to support ITM coordinates – even if they still use Irish Grid.

So to that end have been looking for PHP code to do the conversion, but thanks to a little bit of inspiration from’s Javascript Ireland Coordinate Converter (an excellent resource in its own right!), realised it would be simple to add to the conversion class we already use. In fact as ITM is based on GRS80 which is effectivly WGS84 the conversion was just a matter of plugging in the constants used by ITM, and the code just worked.

Better yet as Geograph is Open Source (and we got permission to open source the code based on OSGB’s conversion spreadsheet), the code is available for anyone to use as a PHP class. It should be trivial to add support to our Javascript class – which will do shortly!

Grab the class from Geograph SVN (or even better do a SVN checkout!) and put it somewhere safe. (but you will probably want to remove the “extends Conversions” bit from the definition – we use that for convience in Geograph source)

Then can just use it

$conv = new ConversionsLatLong;
list($lat,$lng) = $conv->itm_to_wgs84($e,$n);

But as we already use the same code for Irish Grid, and OSGB36 British National Grid, can also use it for them, and even IG< ->ITM conversion

list($lat,$lng) = $conv->itm_to_wgs84($e,$n);
list($lat,$lng) = $conv->irish_to_wgs84($e,$n,true);
list($lat,$lng) = $conv->osgb_to_wgs84($e,$n);

list($e,$n) = $conv->wgs84_to_itm($lat,$lng);
list($e,$n) = $conv->wgs84_to_irish($lat,$lng,true);

list($e,$n) = $conv->wgs84_to_osgb36($lat,$lng);
//even a short convience function to create a 10 figure grid reference
$gr10 = $conv->osgb36_to_gridref($e,$n);

See it used in anger here and here.

Geo Photo Websites

Monday, October 27th, 2008

In my travels I’ve come accorss many different photo websites, many of which I would like to explore further but dont have the time at the time. So as somewhere to keep note:

Geo Photo Websites

Any I have missed or should checkout? Let me know in comments…

Content on Google somehere, somehow?

Saturday, August 16th, 2008

I don’t know if anyone is interested in this stuff, but have been for a long time being trying to make sence of the various ‘geo’ properties operated by Google and quite a bit on how to get indexed and exposure for your content.

Update: There has been some misconception about what this diagram represents – it is only intended to cover getting content in KML/KMZ files on your website listed and indexed in Google Properties. It’s sort of murky in that content you submit to other websites are sort of included to show they end up in various indexes. It does not cover business listings at all which for the most part is sepetate totally. 


GeoIndex Overview Diagram

GeoIndex Overview Diagram

Links for the purple circles:


probably incomprehensible, but hopefully useful to someone? Questions or feedback welcome.

Update: notable perhaps for its exclusion, is Outreach – Oops, version 2 perhaps?

Google Earth – the API

Friday, May 30th, 2008

I’ve been following the blogosphere re the recent introduction of the Google Earth API. Which is a slightly lightweight version of Google Earth packaged in a browser, but with a quite rich Javascript/KML hybrid scripting interface.

There has (IMHO) been some misconceptions about exactly what this is, the hype (and I partly fell into the same trap) seems to surround its bringing Google Earth (aka 3D) to the browser – which it certainly does, but as Ed Parsons notes:
“in that context it should become clear that the big announcement of the Google Earth plug-in, is more about adding a API to earth, than bringing 3D functionality to the browser.”
its not the biggest thing – its that it opens Google Earth to scripting!

And being browser based brings reasonably familiar, and cross platform, Javascript to the table, effectively obsoleting the unsupported COM API (and ActionScript?).

As many blogs note 3D in the browser is not that new, LiveMaps (or what ever it called now. virtual earth?) has had it for a while, not to mention WorldWind (java), and the myriad of other 3D globes.

(however the one area this is good on the web, is it allows much larger datasets to be displayed and intereacted with – in already existing Google Maps API mashups – with little work)

Google Earth in the Browser

Wednesday, May 28th, 2008

Google has just announced a new Google Earth API – which allows embedding and fully functional Google Earth in just about any webpage. Even is easily intergratable with Google Maps API mashups – with very little extra code. (takes a number of seconds for that news to sink in!)

Be sure to checkout the samples, (particularly the milktruck demo!), I’ve also started trying it out with a few demos of my own

…Windows only btw…

Expect A LOT MORE from this very flexible looking API – the JS interface can quickly interact with objects (API is based around KML) and gets pretty good control of interface options.

Update: mentioned on which is a good introduction about what this is and what its not!

Update2: and to show it can basically be added to a ‘real world’ Gmaps mashup, in a few lines of code, see here

Geohash converter; API limit upped

Thursday, February 28th, 2008

Recently was released; the premise: short easy links that encode a location. The website offers instant conversion, but as the algorithm is Public Domain, Lordelph was quick to implement a php class, and I could quickly add the conversion to my existing conversion API. Convert a postcode to geohash anyone?

Updating the documentation noticed the API was last updated in 2005 – gulp, how time flies! Anyway as a celebration have upped the throttling on the API, now three times the previous limit. Running on much improved hardware than when it was launched so maybe the limit can be tweaked even more, will run some analysis of its impact – it already seems the API is a minor part of the overall load on the server – particularly against the Google Earth layers. : short (network) links for KML

Wednesday, February 27th, 2008

For a project wanted to create a small script to make generation of network link wrappers to KML content easy, but then I thought could have it create ‘short’ urls, ala, to make reuse easy. But then thought if going to that trouble might as well make it a full blown mini application, so I give you :: Short Links to KML content

I think it turned out pretty well (esp for just an evenings hacking) – it even has an element of ‘design’ – which is saying something! : short (network) links for KML

So if you want to create a network link wrapper with the minimum of fuss, and might enjoy having it as a short url, then give it a go.

Of course there are still a few things that could be done, but will leave these for another day…

  • Auto discover the ‘title’
  • Intelligence for ‘My Map’s – eg support multiple pages, and maybe some other KML types.
  • Actually make the admin page useful – display stats (they are stored already) , and edit the link
  • A public gallery of popular/new etc links – maybe even some sort of search – esp if we can do rudimentary indexing of the content (when fetch the title)
  • Support for named links eg could choose
  • Complete the support for the various network link options – particulaly making it easier to select the appropriate settings.
  • Maybe even support for forwarding the link by email (and/or sending the admin link to yourself)
  • Any thing you can think of :) – let me know!

More inc KML2RSS

Tuesday, October 16th, 2007

The people at (Microsoft!) have been making some huge improvements to their map system of late, adding lots of data in both 2D and 3D. has long been good in the UK as it uses imagery from getmapping which is at least 2m resolution, but 25cm in many places. It’s now been backed up by lots of Birds Eye imagry which are static photos taken at an angle, which is great for visualising cities. How these are available in the 3D view (which is currently downloading so havent tried it…) ! Also now supported is visualling KML, GPX and GeoRSS files.
Anyway that was kinda rambley, the point of this post was to highlight small feature I found by accident and not sure it been highlighted on other blogs, namly you can subscribe to a RSS feed for many collections, including a KML or GPX file directly, effectively giving a KML to (Geo)RSS converter!

Example: Recent Geographs KML file as GeoRSS

(looks like we can input any KML/KMZ url in there!)

Building the UK one block at a time!

Monday, August 20th, 2007

Ever played Tetris? Know your geographical areas? If so then its time to play Statetris,

Statetris is an interesting game mixing aspects of the popular game ‘Tetris’ and geography. Instead of positioning the typical Tetris blocks, you position states/countries at their proper location.”

…even better a UK version has just been released!

As the project diversifies to new areas, the creators are facing some interesting challenges to cope with our diverse world. For example the UK is a problem as its so tall, so doesn’t fit on screen as nice as some other areas, not to mention our confusing and changing geography! The Netherlands on the other hand is quite small, so has capitals added to add interest.

What’s your best time?