Categories
Technical

A Google Streetview History

Inspired by Alex – all the places I’ve ever lived:

Google’s UK streetview coverage isn’t quite ubiquitous – a couple of the images are snapped looking across fields from the nearest main road, and one of the images is pointing in the correct direction, but the house is completely hidden by all the trees in that general area.

The New York one should be pretty easy to spot, as well as my move to London and its terraced housing. The last picture is of my parent’s new house – the Google camera seems to have fallen onto its side when driving down this particular steep and twisty road.

Categories
OpenStreetMap Orienteering

OOM Presentation

I gave a talk on OpenOrienteeringMap at an (un)conference today – the slides are on my research blog.

Categories
Conferences OpenStreetMap

Wherecamp EU – Day 2

Today was the second day of Wherecamp EU, at the very swish Guardian offices in King’s Cross. More interesting talks, I mainly went to the OSM-themed ones this time, although I also spent a very interesting hour watching a simple iPhone map application being created from scratch. RichardF’s Potlatch 2 intro talk was probably my favourite of the day.

I also finally got around to giving my talk, a short description of orienteering and OpenOrienteeringMap. Highlight for me today though, perhaps because I did a 5K race this morning and then arrived at the conference too late for breakfast, was the excellent lunch, street-food wraps from Moolis – yum! Sponsors and unconferences rule.

OpenOrienteeringMap

View more presentations from oliverobrien.
Categories
Conferences

Wherecamp EU – Day 1

The first day of Wherecamp EU – a geo “unconference” – was today in London. Not having been to an unconference before, I wasn’t sure what was going to happen, but actually everything went pretty smoothly thanks to the efforts of the organisers. After a introduction session, talks (some lecture-style, some brainstorms/Q&As) were in six parallel streams, in strictly half-hour slots. People were given post-it notes and encouraged to stick on the “unconference wall” a topic that they would then talk about at the corresponding place and time:

The wall for today pretty much got filled, and there’s 15 up already for the final day, tomorrow, which is in the Guardian’s offices.

I generally enjoyed the talks I picked – particularly a talk by the ESRI UK CTO on the need to rethink how metadata in GIS is managed, especially in relation to delivering it through to mashups, to increase confidence in the final presented data. My favourite though was, without a doubt, a look at the ITO visualisations of OpenStreetMap and UK public transport datasets. The datasets are interesting on their own, but the polish on the visualisations are outstanding. For example, streams of sci-fi-style pulses representing the 24-hour flow of the UK long-distance coach network.

Tonight is “geo-beers” in King’s Cross, paid for by a sponsor – the entire conference is free, with free food and drink, thanks to the many sponsors of the event. Very impressed so far. Even the wifi held up. Possibly the only thing missing is a Twitter wall. Look forward to tomorrow’s sessions.

Categories
Orienteering

OOM Undocumented Feature – Rotating Control Labels

One problem which my club has come across when assembling Street-O maps using OpenOrienteeringMap is where control labels clash with other features on the map – they may obscure important underlying topology, or intrude on the circles denoting other nearby controls, as shown in the first image below.

To fix this, you can manually specify the angle that the label appears at with respect to the control circle. I haven’t yet built this in to the online map builder, partly because I didn’t want to clutter the UI with too many options, partly because I haven’t got around to it, and partly because the variables that allow labels to be positioned as such is not yet in the released version of OpenLayers (it is in the trunk) that the map builder is based on, so I’ve had to patch my version specially – I’m reluctant to do too much coding in this area before it’s formally released.

…anyway, to fix it, first produce your map as normal. Then, notice the faint horizontal black line on the bottom left of the PDF? This is actually text which represents a partial URL that allows the map to be recreated. Zoom in to the bottom left in your PDF reader, and copy the line of text into a text editor.

The next step is to edit the label angles. Find the section starting “controls=“. Everything beyond this is a control, each control is defined as four numbers, each seperated by a comma (and no spaces). A comma is also used to separate each control. e.g. controls=1a,1b,1c,1d,2a,2b,2c,2d – where 1a, 1b, 1c and 1d are the four attributes for control 1, etc. The attributes are control number, label angle (clockwise from north), latitude and longitude. The lat/lon coordinates look funny – they use the “EPSG900913” Google-style coordinates. The label angle is the one to change – they all default to 45 (top right), changing this to, for example, 180, will set the label to be directly below the circle.

Once this is done, copy the long line of text and append it to the URL http://casa.oobrien.com/maptiler/pdf? in your web browser. Make sure there’s no comma at the end. Press enter and you should get back a new PDF with the corrected angles, as seen in the second image below. (N.B. the URL may change in the future, I’m piggy-backing off one of my work project websites at the moment for this.)


Before


After

Categories
OpenStreetMap Orienteering

OOM Live-Updating

OpenOrienteeringMap now updates in near-real-time from the OpenOrienteeringMap database. It does what’s called “minutely” updates, although the actual time-lag from updating something in OpenStreetMap (say, using Potlatch), to it appearing in OpenOrienteeringMap, is typically around five minutes – occasionally the delay may be up to 15 minutes, or the update doesn’t appear at all if something wrong happens. This is, however, a vast improvement on the per-month updating I was doing before – that process took a couple of days to run, this only takes a few seconds each minute.

Note if you are viewing OOM in your browser, your browser will probably cache the tiles, including ones which have since been updated, so you will want to do a “super-refresh” of the page (Control+Shift+R) or reopen your web browser, if you’ve made changes and want to see them reflected. Creating PDF maps always uses the database so doesn’t suffer from this caching issue.

A huge amount of adding and updating is going on around the world in OpenStreetMap – the project is growing by around 5% a week – so it’s good to be able to take advantage of people’s efforts on a timely basis.

Categories
OpenStreetMap Orienteering

OOM Map Builder

OpenOrienteeringMap now has a map builder, that will create a PDF map of any area, optionally with score-course orienteering controls on it, for you to print out and run on. You choose the scale, orientation and style – street-O, pseud-O or a special street-O without railway lines. Adornments such as a title, north arrow, logo and attribution are added.

To use it, click on the “Create a Map” link. The builder (which is written in Javascript) doesn’t exactly match the final map 100% as it is just building up a URL that gets sent to another service, powered by Python, Mapnik and Cairo which actually creates the PDF map for printing – the latter is a high-quality vector map so should look great when printed out – no jaggies, except for point-features as Mapnik trunk doesn’t (yet) support SVG icons.

Tip: The URL used to create the map is reproduced in tiny-text on the bottom left of the map – it will look like a small black line until you zoom in to 1600% or so. Copy this text and add it to the end of “http://tiler1.censusprofiler.org/pdf?” to reproduce the map. You can tweak the size (in metres) of the PDF sheet, to accommodate unusual sheet sizes, and also change the title and control positions here rather than having to recreate the whole map in the builder.

I’m going to be documenting how the PDF map is produced, on my research blog, in the next few weeks.

Categories
Leisure Munros

A Day in the Mountains

One day last February, I stepped out of work and onto a sleeper train up to the Scottish Highlands with a friend, did a day’s hillwalking from Corrour, an outstandingly remote place, then got the evening train down and the sleeper back to London, rolling back into the office at an unusually early (for me) hour.

Last month I did the same thing again, this time with Dan and James. This time we got really lucky with the weather, so I decided on an ambitious (for winter) trek over two Munros to the south of Tulloch. We had just six hours between the morning train arriving and the evening train leaving, so we kept up a good pace. The snow depth wasn’t as bad as expected, with a 10-15cm layer of hoar frost sitting on top of some well-packed snow. Towards the end of the day we saw a front creeping towards us, that was to give a very heavy snowfall and avalanches in the area the following day.

Finding a good, straight path, we took a direct route up the ever-steepening slopes to the first summit (very boggy and nasty in summer apparently), then a pleasant and fast ridge-walk to the second Munro (again rough in summer) and finally a steep descent back down to the Narnia-like forest – the track being overgrown with trees bent double under the weight of the snow – and back to the station.

The area was a bit sparse on OpenStreetMap but I’ve gone back over the area and traced in the details, with the help of my GPS log, Landsat imagery and Scottish Popular Edition mapping that is now available in Potlatch (more on that soon).

A grand day out.

Route – for the full 3D experience you need the Google Earth browser plugin.

Categories
Mashups

It’s Back


#uksnow is great – it allows us Brits to indulge in our national pastime of talking about very minor weather events.

Categories
Technical

Prettier Maps with Mapnik 0.7.0

[Updated] The Mapnik 0.7.0 release last month has added a number of features, including one that makes choropleth maps, and others with numerous adjacent polygons, more pretty. The PolygonSymbolizer has a new parameter, gamma, which, when set to a value between 0 and 1, causes the polygon edges to bleed into each other slightly, removing distinctive hairlines that allow the background colour to “shine through” the joins.

Here’s a before-and-after of a choropleth of England & Wales. We don’t care much for the boundaries, as they are Middle-Level Super Output Areas (MSOAs), which are administrative boundaries that people are not familiar with, unlike say county boundaries. So, using the gamma parameter, we can hide them.


Mapnik 0.6


Mapnik 0.7

The new parameter is also useful for my OpenOrienteeringMap project, particularly to make large estuaries, which are typically made up of multiple polygons, appear contiguous. However, applying too low a value appears to affect the anti-aliasing of line features, even ones away from the affected polygons. Here, the gamma is just applied to the “water” style. Note the thin white line crossing the water, near the black dotted line that also crosses it, disappears, but the paths and roads start to distort too:


Mapnik 0.6 – thin white line running across the river.


Mapnik 0.7+patch (Gamma 0.8) – the thin white line has gone. Other features are unchanged.

The map tile, by the way, is showing the Greenwich Foot Tunnel crossing the River Thames in east London.

[Update – The crossed-out section highlights a bug that has now been fixed by the Mapnik development team. I’ve patched my Mapnik build and the gamma changes now only appear where expected.]