We have a number of automated tests for our flood and contaminated land report products, and I’ve been looking into how we can make it easier to create sets of test locations throughout the country that highlight particular aspects of our reports. For example, if you are testing how the new HS2 line is reported then it is little use just picking random points

Previously, the answer was to have a set of standard test locations. This is fine for checking that a report looks similar to how it used to (aka “regression testing”) but it doesn’t have much variety. We have now have

  • locations of ‘tricky’ sites
  • locations of interesting things, e.g. Crossrail stations, which we can run through all report types
  • tests that pick a random position nearby within say 500 metres
  • areas of interest, e.g. central London, which we can then say for 30 random points from
  • areas of type, e.g. coastal areas, which are much more likely to have coastal flooding say

Our first implementation was to hold all these points in code, but I soon realised that it would be helpful to be able to quickly and easily see them all on a map to see exactly what we are about to test for.

Second implementation was in Google kml. This can be viewed directly in Google Maps. The minor problem is that Google Maps is built to display points anywhere in the world and hence uses WGS84 projection. Most of our data is in the UK so we use the UK National Grid (i’ll ramble at a later date about projections). I solved this by looking points up on gridreferencefinder.com and including the Easting and Northing as part of the description.

My third attempt is in geojson. This is a format that is fairly human readable, and also very program friendly. The other major benefit is that after watching a presentation by Ben Balter at http://ben.balter.com/make-maps-better-together/ I discovered that any file on Github with a .json, .geojson, or .topojson will be displayed as a map, whilst the data could be read by a program.

I converted my kml to goejson using node.js and togeojson.

How are we doing?

We aim to deliver the best service possible, so please take a moment to click on our feedback link and let us know how you think we're doing.