Saturday 29 November 2014

Save a village

I've been checking out a few new roads in the area. That took me to North Ferriby, a place I know well as I lived there for many years. A housing development, known as Melton Fields, was proposed about three years ago for a piece of land that is not actually in Ferriby, but in the next-door parish of Welton. The land is next to a wood in an open field and the developers dared to suggest that a footpath and cycleway would connect the development to Ferriby through the wood, as well as by a road joined into a recently modified junction - modified with this purpose in mind in my opinion. The development caused outrage that the extra people would swamp the village services and destroy the character of the village.

Three years on and the planning application has been turned down by the local authority and there's an enquiry under way. Enquiries like this seem pointless to me, everyone knows the dice is heavily loaded in favour of the developers, so why waste millions on an enquiry that will ultimately allow the development to go ahead anyway? We need new houses.

The one thing I have noticed over the past few years is the number of very ugly signs scattered all over the village, protesting about the development. This ugliness is something the village should be saved from - it is a real mess. I wonder if the owners of these signs got planning permission to erect the signs as they don't seem temporary to me. It is interesting that some recent developments in the village have these signs outside their properties (the one pictured is not a recent development). So squeezing poky little in-fills in that don't match the surroundings and all strain the services is OK but building an integrated new development outside of the village, which includes extra services is not. Save the village, but from nimbys not sensible development.

Tuesday 9 September 2014

Lock in

I've been adding lots of buildings in Hull. Tracing from imagery is a bit tedious, but I have got into a rhythm. Adding the house numbers I find easier with a printed map with the buildings already drawn then I can note significant points like house numbers near junctions, any extras (like 4a), any gaps in numbering and whether there is a 13 or not. I was working on Beverley Road. Wanted some shopping so I decided to go shopping there, so I could see the layout of the shops as well as any numbering. I also remembered a couple of developments that were worth looking at to see if they were accessible.

I went to The Jacobs Homes off Askew Avenue. The place was complete, smart
and easy to go round, number one complete. Then I went to The Sidings. This is still only partly complete, with two road names (neither called The Sidings of course, this was a railway goods yard many, many years ago). One small road joined these two named ones - I got its name from a house number with the street name under it. Number two complete. I then set off towards the junction between Beverley Road and Cottingham Road to look at the shops and buy a few things.

Before I got to the shops I saw a yellow board with a development name on it I didn't recognise, Scholars Gate, so I followed it. The development is far from complete but a substantial number of houses have been built and many look occupied. Once again no name board, but once again a house number had the road name on it so I could get the details. Number three complete.

When I got to Cottingham Road shops I took lots of photos of the shop fronts from across the street, got asked what I was doing and handed out a leaflet about OSM. When I'd done my shopping I set off for home.

I noticed another new development off Cottingham Road. When I had turned round and got back to it I realised it was gated and the gate was shut. The sign said Chancellor's Court (private road). As I sat in front of the gate I saw a sensor on a wall inside the gate and guessed that if I could get in, the sensor would open the gates to let me out. Just then a van pulled up near the gates at the otherside and they opened, so I drove in, hoping I was right. I drove down the road, turned at the end and set off out. The gates didn't open. I sat near them waiting for someone else to open the gates and a few seconds later a car pulled past me and the gates opened. I followed the car out and my lock in was over. Number four complete.

As I drove home I saw another yellow board for a development, this time in Cottingham at Cleminson Gardens. I had added bit of the development when it was first accessible. Now the whole road loop is accessible and most of the houses look complete and occupied. That completed number five.

Monday 1 September 2014

Floods

In 2007 large parts of Hull and surrounding areas were flooded. The reasons why are still being debated. Drainage capacity, pumping capacity, pumping failures and poor coordination of various agencies have been blamed in reports.

Most flooding in the UK in the past has been either due to rivers bursting their banks or coastal flooding. Coastal flooding along the east coast is often somewhat predictable as it is often the combination of a spring tide, a deep depression and winds from the north or north west blowing down the North Sea. The low pressure allows the sea level to rise, the wind blows the water into the bottle-neck of the southern North Sea and combined with a spring tide the winds blow waves over sea defences which quickly floods land behind the defences.

Rivers bursting their banks is a bit more obvious. Heavy rainfall runs off land and fills water courses, which may burst their banks downstream and flood surrounding land. What we are beginning to see in Britain are more cases of another kind of flooding: direct flooding from heavy rainfall. Here saturated ground and impermeable ground cannot hold any more rainfall, so water sweeps across the surface of land to a low point where it forms a temporary flood, as it did in Hull in 2007. Britain's existing drainage infrastructure tries to deal with this using ditches and other water courses but they are now unable to cope more and more often.

I think more concentrated, heavier rainfall is causing part of this, some of which is down to climate change no doubt. Some of the flooding is man-made in other ways too. Ditches and other water courses are badly maintained and even being filled in. Building causes more run off from roofs, roads and other impermeable surfaces.

One decision made, I think, in the 1950s is also having a devastating effect and that is where any land run off water goes. In most cases the water boards of the 1950 decided to direct run off into sewers. At the time most areas with access the coast simply dumped untreated sewage into the sea and land run off was seen as a way to dilute it. Now all sewage is supposed to be treated before discharge. I said 'supposed to be treated' because the Water Act allows water companies some discretion to pump untreated sewage into the sea when their infrastructure is overwhelmed in an excessive rainfall event. At Bridlington a new pipe has been built for this purpose.

Adding relatively clean land run off to sewage has two big effects. Land run off water ends up getting treated as sewage in expensive treatment works. This water could reasonably be discharged directly into natural water courses or the sea without much problem, instead sewage works with greatly inflated capacity have to be built and run to deal with it. The second big effect is that when unusually heavy rainfall events overwhelm the drainage system, the bottlenecks are the sewage pipes which overflow, putting not just land run off into streets, gardens and homes but sewage too. Fixing this is not easy and will be very, very expensive and disruptive but as climate change progresses some changes will be needed.

I have been helping Cottingham Flood Action Group to understand the drainage and sewer network for that low-lying village by using their knowledge and surveys to add the ditches, drains, culverts, sewers and manholes to OSM and produce a map to help them understand the issues. You can see the map here. So far only a small part of the sewer network of the village has been added but various people in the group have enough knowledge to add the whole network I think. Then the onward link to Hull's network needs adding, which is a much bigger task. All of the network ends up in a single treatment works at the east of Hull at Salt End.

I hope CFAG find my map useful.

Monday 2 June 2014

Local radio

Just got a plug for OSM on BBC Radio Humberside. Maybe there's scope for more info there ...

Wednesday 16 April 2014

Images to map overlays

I have been working on a project that needs maps to make sense of it, more of that in a later post. It is a history project for my village so I wanted to overlay maps from the 19th century and early 20th century with the modern map. The modern map is easy, I know a good contemporary map I can use. For the historical map layers I need maps laid out as tiles so I can use Leaflet to display them.

I was given a scanned map of the village dated 1824 and found another set of maps dated 1910. All of these are out of copyright, so I can comfortably use them. Scans of the 1910 maps and a lot of fiddling and joining gives me a .jpg file for the village. Now the two scans need aligning to be the same projection as the OSM map.

I chose to use Mapwarper to rectify the scans to match OSM. The process is straightforward. I uploaded the .jpg file and the site overlays it on the OSM map. You can add control points on the uploaded image and matching ones on the OSM map. The more control points you add, the better the final alignment. I used road junctions mostly as the control points, though the 1824, pre-enclosure map has far fewer roads and I had to make the most of what I could find. The image is then rectified and a GeoTIFF is available to download. A GeoTIFF is a bitmap with georeferencing information added. Once this has been downloaded it can be turned into tiles.

GDAL has a set of utilities to work with geo-data. One of these is gdal2tiles.py which is a python program to turn a GeoTIFF into a set of tiles. It creates TMS tiles, TMS stands for Tile Map Service which I think was intended to be a standard. The numbering of the Y-axis tiles is inverted compared to OSM tiles. It is easy to rename the tiles to match the OSM convention, but Leaflet (and OpenLayers) supports TMS and none-TMS layers and can use them interchangeably. 

Running gdal2tiles (e.g. gdal2tiles.py -z13-19 xxxx.tif tiledir) gives set of tiles from the GeoTIFF (xxxx.tif) for the zoom levels specified (13-19) and stores them in the directory specified (tiledir). These are now ready for use with leaflet.

I want to overlay the older maps on the modern map. All of these layers are opaque, so if the three layers are just stacked then only the last one will display as it will hide the other two. Leaflet lets you specify the opacity of a layer, so by altering that the details of each layer can be visible simultaneously.  These can then be used as the base to show an extra layer of detail, but more that another time.

I have created a simple page to show these layers. There are sliders to control the opacity. I spent a bit of time aligning the 1910 map and I'm fairly happy with the result. The 1824 map was a bit crude so I used fewer control points and the result is not as good. It is still interesting. I'm looking for any more maps of this era for my village.

Tuesday 25 February 2014

Signed at last

I went out to buy some seeds for the allotment today. On the way home deliberately drove home down Hawthorn Avenue in Hull to see the point where Woodcock Street joins it.

I have written to Hull City Council traffic department a few times in the past about that junction. Woodcock Street runs from Hawthorn Avenue to St Georges Road. Hawthorn Avenue has a 30 mph and St Georges Road has a 20 mph limit. There was no speed limit sign at either end of Woodcock Street nor at any point along it, so from St Georges Road you would assume it to be a 20 mph road but from Hawthorn Avenue you would assume it to be a 30 mph road and if you drove onto St Georges Road you would also expect it to be 30 mph until you see a repeater for 20 mph.

Woodcock Street has been part of the substantial redevelopment in the Hawthorn Avenue area, much of which is still under way though Woodcock Street looks to be pretty complete. The council have put a cherry on it by erecting a 20 mph sign at the Hawthorn Avenue end to remove any doubt.

Well done Hull City Council, eventually.

Saturday 1 February 2014

Visualising changes

When someone edits OSM their changes get rendered quickly so they can see their handiwork. That's really good feedback and is valuable in attracting new mappers. When it comes to checking what has changed in an area, just looking at the rendered map is rarely enough to spot any changes. Looking at changesets is the next option.

Changesets were introduced with the API version 0.6. They group together edits by a mapper made over a short period of time. They can be open for up to 24 hours, but changesets are normally closed within an hour of being created and often changesets are opened, edits uploaded to the API and the changeset closed within seconds. Changesets have a bounding box that covers the area the edits are made in. You can request a list of changesets from the API that cover a specific bounding box. Edits by a mapper are normally wrapped in a changeset that covers a small area, but some edits range across very large areas even across the whole world. These are known as big edits. These are usually some sort of mass-edit or bot edit. These will show up in a request for changesets even though no actual changes are made in the requested area.

Looking at changesets can be useful, but apart from trying to work out which of the so-called big edits to ignore, there's the bigger problem of knowing what has actually changed. If you see an added node or way that's easy, but the modified nodes or ways is a bit harder to understand and looking at some relations can be a long job to work out the changes. Has a node been moved? Has a way's nodes been moved? Has a way had nodes removed or added? Has a node or way had its tags changed? Is there some combination of all this?  Deleted nodes and ways are also a bit of a problem as they no longer render and seeing what has gone can be hard to visualise, especially as some people delete a way and add a new one to replace it, losing the way's history. What would be nice is to see a before and after view of a changeset.

I looked at the problem, initially for nodes and ways, and quickly realised that the way the API delivers information about ways makes things harder than you'd want. When you request the details of a way from the API it returns the way with attributes like ID, version, changeset etc, a list of tags and a list of nodes as node ids. This fine for the current state of the way. The nodes in the list are the most recent version of the node. You need the nodes to find the geometry of the way as longitude and latitude are only stored on nodes. As soon as you look at an older version of a way the list of nodes is suddenly not clear at all. Which version of each node does it refer to?

I think the timestamp on each API object can be used to work out which version of a node matches each version of a way. That assumes that I have, or download, all of the versions of every node in the area I'm interested in. Another idea is to store the data for the area I'm interested in from a snapshot, such as Geofabrik's, and apply every changeset for the area on from there. In that way I could store the geometry of the way with the way rather than in nodes, which sounds much more practical. I can then show the before and after view of every changeset, but only from the date of my snapshot and only if I apply every changeset. I'll think about this some more.