I do wonder if the process of working groups really works. I have asked the Licence Working Group to make a simple action to prevent a falsehood being repeated. They did nothing and did not even respond to my emails.
I have now asked the Data Working Group to revert undiscussed mass edits. Again, no action and not even an acknowledgement email. If we are serious about stopping undiscussed mass-edits, the only real way forward is to revert them as quickly as possible to force people to follow the guidelines. If an ordinary mapper, like me does the revert that risks an edit war, especially if the ordinary mapper has already engaged with the mass-editor to no effect as in my case. The longer it takes to revert a mass-edit the harder the revert becomes because of other small-scale edits.
If the working groups are not going to take action or at least acknowledge a request or contact, then they should resign and close down the group so everyone knows that the only process open to an ordinary mapper is down to him.
Open Maps
Making not just the best free map, but the best map
Monday, 6 May 2013
Friday, 5 April 2013
Enclosures
I had a meeting today about a project in our village. Ian had a map that he has assembled of Swanland & North Ferriby that shows the villages pre-Enclosure Acts. It would be good to create an overlay with the modern OSM map for people to see how things have changed in nearly 200 years. In case you haven't guessed, the answer is lots.
I need to warp Ian's map to fit the EPSG:3857 projection, make its background transparent and then build a little app to show one layer over the other. I'll see how I get on.
I need to warp Ian's map to fit the EPSG:3857 projection, make its background transparent and then build a little app to show one layer over the other. I'll see how I get on.
Sunday, 3 February 2013
A Park, Hawthorn and Rugby
I've been trying to fill the gaps in land use in Hull. I think that, generally, everywhere in a city can and should have a landuse tag and that land use areas probably should join at their edges. I have been joining, say, a residential land use to a commercial land use, sharing the nodes, so there is no gap between them. I have not been joining land use areas to roads. That is just wrong. A few land use areas stop at a boundary with a fence or a hedge, so I sometimes reuse the land use nodes to add a barrier tag, but never a road. Roads are, I think, too complex to be shared with a land use edge. Roads do fall into the land use. I residential road is part of the residential area along with the houses and occasional shop and pub too. Parks, schools, recreation grounds, cemeteries and other large areas I've generally left out of other land use - layering land use on top of, but another land use seems wrong to me. I have tried not use too many multipolygons with land use, so a pond in a park will not be a hole in a multipolygon, though it would work well if it was.
This had involved a lot of staring at aerial imagery followed by surveys to try to determine where one land use type gives way to another. There have also been a lot of areas that seem to have no land use. I have resorted to landuse=grass for space between a river bank and, say, an industrial area nearby. I'm not happy that 'grass' is a land use, but then many OSM tags have grown to be useful without their actual keys or values being completely logical. OSM is about a map database not some kind of taxonomy after all. I have also used natural=scrub in some places too. Again not sure but I think it is better than nothing. It is really urban waste ground, but that doesn't seem to be in the wiki. I have used landuse=railway for the inaccessible land fenced off beside railways which seems right to me. I think there should be a landuse=highway tag for major roads and motorways too. They often have an area of inaccessible land reserved beside them, sometimes beyond the verge perhaps up an embankment. In Britain this is usually grassed sometimes with bushes or small trees on to too. They have become useful wildlife havens.
I noticed on the aerial images a largish piece of grass on the outskirts of the city that I didn't recognise. When we went to look we found a large grassy park so I added that. It was very, very wet - flooded in parts, so I didn't venture onto it, though I will later in the year just for a look around at what lies beyond some trees and bushes and whether they too are part of the park or not.
Part of my work has been focussed on areas of Hull that are being redeveloped - and I haven't completed them yet. Hawthorn Avenue had a lot of terraced streets of it on both sides. Some had fallen into disrepair and even dereliction and the council declared the will to redevelop some of the area. I don't want to give the impression that it was or is a slum. Just some areas where becoming a mess and the houses were getting harder to maintain and costing more to heat, for example. Yesterday we took a look at the work that is progressing. Areas of Woodcock street have been transformed, with a mixture of size and styles of houses, a small park, sensible car parking, cycle ways and foot ways and the whole area looks impressive. I don't know anyone who lives there to see if there is a community spirit building, but somehow there is a feeling of a place that could be very pleasant to live in.
Further north along the eastern side Hawthorn Avenue the work is much less well advanced. Some streets have been partly demolished and others are boarded up ready for demolition. Sadly there are a few people who have refused to leave their homes yet and are living in tiny islands surrounded by derelict houses.
To the western side of Hawthorn Avenue little remains of the old buildings with new buildings steadily going up, again in a mixture of styles. I have marked the areas boarded up as brownfield until construction starts. This does currently include the few houses still occupied, but I suspect not for long.
We also took a look at the old Hull FC rugby league ground, the Boulevard. The main entrance lies off Airlie Street, hence the team was nicknamed the Airlie Birds. They moved to share the KC stadium with Hull City football club in 2003. The old ground was used for greyhound racing for a while but now construction is under way for a new school, The Boulevard Academy. I wonder if they will have any rugby league teams?
This had involved a lot of staring at aerial imagery followed by surveys to try to determine where one land use type gives way to another. There have also been a lot of areas that seem to have no land use. I have resorted to landuse=grass for space between a river bank and, say, an industrial area nearby. I'm not happy that 'grass' is a land use, but then many OSM tags have grown to be useful without their actual keys or values being completely logical. OSM is about a map database not some kind of taxonomy after all. I have also used natural=scrub in some places too. Again not sure but I think it is better than nothing. It is really urban waste ground, but that doesn't seem to be in the wiki. I have used landuse=railway for the inaccessible land fenced off beside railways which seems right to me. I think there should be a landuse=highway tag for major roads and motorways too. They often have an area of inaccessible land reserved beside them, sometimes beyond the verge perhaps up an embankment. In Britain this is usually grassed sometimes with bushes or small trees on to too. They have become useful wildlife havens.
I noticed on the aerial images a largish piece of grass on the outskirts of the city that I didn't recognise. When we went to look we found a large grassy park so I added that. It was very, very wet - flooded in parts, so I didn't venture onto it, though I will later in the year just for a look around at what lies beyond some trees and bushes and whether they too are part of the park or not.
Part of my work has been focussed on areas of Hull that are being redeveloped - and I haven't completed them yet. Hawthorn Avenue had a lot of terraced streets of it on both sides. Some had fallen into disrepair and even dereliction and the council declared the will to redevelop some of the area. I don't want to give the impression that it was or is a slum. Just some areas where becoming a mess and the houses were getting harder to maintain and costing more to heat, for example. Yesterday we took a look at the work that is progressing. Areas of Woodcock street have been transformed, with a mixture of size and styles of houses, a small park, sensible car parking, cycle ways and foot ways and the whole area looks impressive. I don't know anyone who lives there to see if there is a community spirit building, but somehow there is a feeling of a place that could be very pleasant to live in.
| Greek Street boarded up |
Further north along the eastern side Hawthorn Avenue the work is much less well advanced. Some streets have been partly demolished and others are boarded up ready for demolition. Sadly there are a few people who have refused to leave their homes yet and are living in tiny islands surrounded by derelict houses.
To the western side of Hawthorn Avenue little remains of the old buildings with new buildings steadily going up, again in a mixture of styles. I have marked the areas boarded up as brownfield until construction starts. This does currently include the few houses still occupied, but I suspect not for long.
We also took a look at the old Hull FC rugby league ground, the Boulevard. The main entrance lies off Airlie Street, hence the team was nicknamed the Airlie Birds. They moved to share the KC stadium with Hull City football club in 2003. The old ground was used for greyhound racing for a while but now construction is under way for a new school, The Boulevard Academy. I wonder if they will have any rugby league teams?
Friday, 1 February 2013
Local recycling
I wanted to take some stuff to the local recycling site and was turned away because they were rebuilding it. I hadn't seen any warning about this so I searched for it by name - only I got the name wrong. I had added the site to OSM in 2008 and added the name from memory as Humberdale Waste Site when it is really Humberfield Household Waste Recycling Site.
What surprised me was that the top of my Google search came back with the OSM Node Browse results for the site - presumably because nothing else matched my erroneous name that I searched for. It probably won't work now anyway because I've corrected the name.
I should just add that I used the word Google above without stating that Google is a registered trademark. I didn't have to say that because I was not attempting to provide any services that Google offer, nor was I trying to pass off my goods or services as though they were Google's. I mention it because of a recent OSMF missive about a newly trademarked word that they are frantically removing all references to from our Wiki and Help system. We gather data and publish it under an open licence. I'm not sure I see how that might breach a patent troll's dubious US trademark that was refused in the EU, but then I'm not a lawyer, all the happier for that.
What surprised me was that the top of my Google search came back with the OSM Node Browse results for the site - presumably because nothing else matched my erroneous name that I searched for. It probably won't work now anyway because I've corrected the name.
I should just add that I used the word Google above without stating that Google is a registered trademark. I didn't have to say that because I was not attempting to provide any services that Google offer, nor was I trying to pass off my goods or services as though they were Google's. I mention it because of a recent OSMF missive about a newly trademarked word that they are frantically removing all references to from our Wiki and Help system. We gather data and publish it under an open licence. I'm not sure I see how that might breach a patent troll's dubious US trademark that was refused in the EU, but then I'm not a lawyer, all the happier for that.
Saturday, 12 January 2013
Soft style
I'm working on a project for the Hull area. I want to display overlays on a map. I want the map to be there, but not in your face. I don't want any shops, pubs or other such objects to detract from the overlay, but I do want people to be able to relate the overlay to places in the city and to the road layout. I needed my own render for the city.
At one time I might have turned to Maperitive to create a custom render. It works well but it uses .net so is best used in Windows. Windows leaves me cold. I have used the excellent Mapnik in the past to customise map rendering. Although the end results from Mapnik are superb, wrangling the xml to produce the required result was not easy to understand, so my customisations were tweaks rather than rewrites. Then MapBox released TileMill. I quickly saw how powerful it was. It uses a new style of coding called Carto to define the map style and uses easily defined layers to determine how the map is built up. Under the skin it uses Mapnik to render the example each time you save a change. One of the options is to export the Mapnik XML of your current design so you can throw that at a Mapnik instance and either generate a static image or a set of tiles for a slippy map - which is what I want.
Like any new environment it does take a little understanding. OSM data is best used by importing it into a PostgreSQL database using a recent version of osm2pgsql. This is a lossy process, intended to populate a database schema laid out for use by a renderer. Coastline is created by using a huge shapefile. I have a cut-down version just for the UK which is smaller and quicker to use. If you want to generate images at low zoom levels there are other short-cut shapefiles such as a simplified coastline and named places for example. These speed up processing at low zoom levels when massive amounts of OSM data would otherwise be needed.
Using TileMill is really about getting to grips with Carto and its relationship with the layers. Layers are each a definition of a data source such as a shapefile or a database table or a selection of part of a database table for example. The order they are listed defines the order that image of the map is built up. Carto, which is a lot like CSS, then applies the detailed use of the data in a layer to define the style of each object, such as its colour, opacity and so on. Some objects on the map may use separate layers to define them and be rendered by separate Carto statements. A road may be made up of a casing (its edge), the centre space which may well be coloured differently from the casing, and text for the name of the road to be displayed. These will be built up in different layers to make the joints between roads seamless and to ensure the casing is covered by the filler and then the text lays on top again. Then there are tunnels and bridges and all the other options the real world throws at cartographers. Layers and specific Carto statements together sort all of this out.
I have been helped in my growing understanding of the best ways to do some of this by reading examples, both that come as part of the download of TileMill and by reading the details of Andy Allan's excellent recreation of the Standard OSM map in TileMill.
To create my map, I downloaded the OSM data I needed from Geofabrik's download server, which is a simple and reliable way to get OSM data that is only a day old. I loaded it into a PostgreSQL database with the PostGIS extensions using osm2pgsql just using the default schema. It probably has all sorts of stuff I won't render, but it is quick and easy to do. Then I pointed TileMill at that and the UK coastline shapefile and set to work. Just to check all was well, when I had some of the style working I exported the Mapnik XML file to render some tiles and it quite quickly produced zoom 11 to zoom 18 for the area. I uploaded the tiles just to see how my web server responds with the tiles and all is well. The style needs a lot more work, but the process works very well, so I'm happy to put the hours in to become more of a cartographer as well as a mapper. I'm just not sure how good I'll be at it.
You can see the crude first pass here. The city will also look better not only when I've improved my style but also when the landuse gets tidied up with fewer gaps and overall more careful coverage - something Bing imagery will help with a lot.
At one time I might have turned to Maperitive to create a custom render. It works well but it uses .net so is best used in Windows. Windows leaves me cold. I have used the excellent Mapnik in the past to customise map rendering. Although the end results from Mapnik are superb, wrangling the xml to produce the required result was not easy to understand, so my customisations were tweaks rather than rewrites. Then MapBox released TileMill. I quickly saw how powerful it was. It uses a new style of coding called Carto to define the map style and uses easily defined layers to determine how the map is built up. Under the skin it uses Mapnik to render the example each time you save a change. One of the options is to export the Mapnik XML of your current design so you can throw that at a Mapnik instance and either generate a static image or a set of tiles for a slippy map - which is what I want.
Like any new environment it does take a little understanding. OSM data is best used by importing it into a PostgreSQL database using a recent version of osm2pgsql. This is a lossy process, intended to populate a database schema laid out for use by a renderer. Coastline is created by using a huge shapefile. I have a cut-down version just for the UK which is smaller and quicker to use. If you want to generate images at low zoom levels there are other short-cut shapefiles such as a simplified coastline and named places for example. These speed up processing at low zoom levels when massive amounts of OSM data would otherwise be needed.
Using TileMill is really about getting to grips with Carto and its relationship with the layers. Layers are each a definition of a data source such as a shapefile or a database table or a selection of part of a database table for example. The order they are listed defines the order that image of the map is built up. Carto, which is a lot like CSS, then applies the detailed use of the data in a layer to define the style of each object, such as its colour, opacity and so on. Some objects on the map may use separate layers to define them and be rendered by separate Carto statements. A road may be made up of a casing (its edge), the centre space which may well be coloured differently from the casing, and text for the name of the road to be displayed. These will be built up in different layers to make the joints between roads seamless and to ensure the casing is covered by the filler and then the text lays on top again. Then there are tunnels and bridges and all the other options the real world throws at cartographers. Layers and specific Carto statements together sort all of this out.
I have been helped in my growing understanding of the best ways to do some of this by reading examples, both that come as part of the download of TileMill and by reading the details of Andy Allan's excellent recreation of the Standard OSM map in TileMill.
To create my map, I downloaded the OSM data I needed from Geofabrik's download server, which is a simple and reliable way to get OSM data that is only a day old. I loaded it into a PostgreSQL database with the PostGIS extensions using osm2pgsql just using the default schema. It probably has all sorts of stuff I won't render, but it is quick and easy to do. Then I pointed TileMill at that and the UK coastline shapefile and set to work. Just to check all was well, when I had some of the style working I exported the Mapnik XML file to render some tiles and it quite quickly produced zoom 11 to zoom 18 for the area. I uploaded the tiles just to see how my web server responds with the tiles and all is well. The style needs a lot more work, but the process works very well, so I'm happy to put the hours in to become more of a cartographer as well as a mapper. I'm just not sure how good I'll be at it.
You can see the crude first pass here. The city will also look better not only when I've improved my style but also when the landuse gets tidied up with fewer gaps and overall more careful coverage - something Bing imagery will help with a lot.
Monday, 7 January 2013
Road search fixed
A friend from my school days pointed out that my previous post about finding a road had a browser problem. The drop-down list of road names get hidden by the map. All things MS and Internet Explorer especially are irritating to me. Quite how a company can grow to be so huge based on such poor quality products still confounds me, but still. The problem is that most people by far who use a computer use an MS operating system on it and a large number of them still use a version of Internet Explorer. If I want wide range of people to be able to use a web page it has to work on IE 7+, there is no option.
It seems that amongst the plethora of inconsistencies that IE demonstrates, there is a horrible process of not supporting the z-index style. z-index should determine which item on a web page should appear above another, with the highest z-index being on top and visible. In IE, anything that uses relative or absolute positioning can cause a separate z-index set to be created, starting at zero which causes the z-index of other objects to be seemingly disregarded. The map tiles use absolute positioning so the drop-down can have a huge z-index and yet it is hidden behind the map. There seems to be various ways to overcome this, but forcing the z-index of the map div to -1 seems to be the simplest solution. Hopefully now anyone trying this simple page will see the list of suggested names above the map.
Some good has come from this. Apart for becoming aware of this problem and trying out the various solutions, I have set up a much better test environment for Windows and IE. A Twitter exchange with Iván Sánchez Ortega also turned up with the concept that Win8 should really be renamed to Fail8 which made me chuckle.
It seems that amongst the plethora of inconsistencies that IE demonstrates, there is a horrible process of not supporting the z-index style. z-index should determine which item on a web page should appear above another, with the highest z-index being on top and visible. In IE, anything that uses relative or absolute positioning can cause a separate z-index set to be created, starting at zero which causes the z-index of other objects to be seemingly disregarded. The map tiles use absolute positioning so the drop-down can have a huge z-index and yet it is hidden behind the map. There seems to be various ways to overcome this, but forcing the z-index of the map div to -1 seems to be the simplest solution. Hopefully now anyone trying this simple page will see the list of suggested names above the map.
Some good has come from this. Apart for becoming aware of this problem and trying out the various solutions, I have set up a much better test environment for Windows and IE. A Twitter exchange with Iván Sánchez Ortega also turned up with the concept that Win8 should really be renamed to Fail8 which made me chuckle.
Friday, 28 December 2012
Finding a road
I've been working on a project in the City of Hull. Part of that needs to find a specific road in the city. I wanted to use a type-ahead style search, showing a list of roads that meet a partial match of whatever is typed - a fairly normal modern requirement. In OSM we have the Nominatim search, but it is intended for searching the World - my requirements are more modest.
I extracted a list of road names from an OSM extract for Hull to take a look at. The first hassle is that there seemed to be loads and loads of duplicates. These mostly turn out to be roads that have small spurs with the same name and small 'T' or 'Y' endings of dead ends which again get tagged with the road name. The next next hassle is that I need to be able to zoom a map to show the selected road, so I thought I needed to know the centre point of each road. I thought about creating a bounding rectangle for the road and then calculating the centre point. Suddenly that rang a bell.
That format is what the open data OS Locator is presented as. So I decided to see what was needed to use that. First I extracted the roads for Hull from the GB dataset, converting the OSGB grid references to longitude and latitude in the OSM projection. There were a few duplicate road names. OS break a road at an administrative boundary, so as a road crosses a ward boundary it is split. There were about 160 of these (a tiny fraction of the OSM duplicate names) which I recombined into a single rectangle and recalculated the centre point.
One thing I know about in OS Locator data is that there are mistakes. Having surveyed all of Hull and recorded the anomalies with the not:name tags I could use these to correct the OS Locator data to reflect the names on the ground. I then changed the OS names to title case (lowercase with capitalised names) and removed apostrophes which would make searching harder. I then added all these roads with their centre points, about 2700, into a database table. Python scripts made short work of all of this.
I wrote a quick couple of lookups to make the jQuery ajax type ahead work, one returns the list of matches of road names based on a search term and one returns the details for a specific named road. I used the longitude and latitude of the centre point to zoom to that location on the map. Quickly I realised that didn't work well for all roads, because the zoom level needed to vary to show the whole road, some are much longer than others. Fortunately the OS Locator data holds the rectangle that encloses the road, so I zoomed the map to the maximum zoom that shows that rectangle. The Leaflet library makes all of this pretty simple.
You can see an example of the end result here. I chose the Mapquest Open tiles because they will suit another part of the project, more of that another time ...
I extracted a list of road names from an OSM extract for Hull to take a look at. The first hassle is that there seemed to be loads and loads of duplicates. These mostly turn out to be roads that have small spurs with the same name and small 'T' or 'Y' endings of dead ends which again get tagged with the road name. The next next hassle is that I need to be able to zoom a map to show the selected road, so I thought I needed to know the centre point of each road. I thought about creating a bounding rectangle for the road and then calculating the centre point. Suddenly that rang a bell.
That format is what the open data OS Locator is presented as. So I decided to see what was needed to use that. First I extracted the roads for Hull from the GB dataset, converting the OSGB grid references to longitude and latitude in the OSM projection. There were a few duplicate road names. OS break a road at an administrative boundary, so as a road crosses a ward boundary it is split. There were about 160 of these (a tiny fraction of the OSM duplicate names) which I recombined into a single rectangle and recalculated the centre point.
One thing I know about in OS Locator data is that there are mistakes. Having surveyed all of Hull and recorded the anomalies with the not:name tags I could use these to correct the OS Locator data to reflect the names on the ground. I then changed the OS names to title case (lowercase with capitalised names) and removed apostrophes which would make searching harder. I then added all these roads with their centre points, about 2700, into a database table. Python scripts made short work of all of this.
I wrote a quick couple of lookups to make the jQuery ajax type ahead work, one returns the list of matches of road names based on a search term and one returns the details for a specific named road. I used the longitude and latitude of the centre point to zoom to that location on the map. Quickly I realised that didn't work well for all roads, because the zoom level needed to vary to show the whole road, some are much longer than others. Fortunately the OS Locator data holds the rectangle that encloses the road, so I zoomed the map to the maximum zoom that shows that rectangle. The Leaflet library makes all of this pretty simple.
You can see an example of the end result here. I chose the Mapquest Open tiles because they will suit another part of the project, more of that another time ...
Subscribe to:
Posts (Atom)