Neighborhood boundaries are a fascinating topic. Where do people see their neighborhood extending to, how clear are those boundaries, and how do they shift with time.
This is a topic that has been tackled a number of times around the world, and with different types of locations (like cities). With the general public asked to draw their own neighborhood, or the ones they are familiar with, on a map. But there are challenges.
Sometimes the results are successful, like in Boston. Boston only has around 60 neighborhoods, which are relatively clearly defined based on the mapping results. And Bostonography clearly had a great readership, with over 2300 responses.
Older cities, like Glasgow are much more complex. In 2016 I did a similar survey, and from 367 responses I received 241 unique neighborhoods. You would need a much bigger set of responses to come to any real conclusions. But I still mapped the results for the West End of Glasgow, where most neighborhoods had multiple responses: Glasgow Regions Mapped
The challenges for Dublin neighborhoods is similar to Glasgow, although not as complex. But anything worth doing would require a lot of responses.
Luckily the Dublin InQuirer decided to run a similar survey, polling their subscribers for responses. The number of submissions was good, not quite beating the Boston yet, but getting close. 2200 responses and 133 unique neighborhoods mapped. They also did a few great things. One was making the data available to download. This meant that anyone could map the results, which is great. Additionally they are reaching out to areas with less responses, which is a great effort on their part.
Postcodes were then created based on the ONS Postcode Directory, filtering for postcodes that were live in 2011 (which is the latest census data). The postcode centroids were turned into polygons using voronoi polygons.
Then we simply select all of the buildings in a postcode from Ordnance Survey, Open Map product, filtering out most schools and hospitals. Then we put a random point in a random building for each person in that postcode.
I would have loved to include Northern Ireland, but the Ordnance Survey of Northern Ireland do not have an equivalent open building outline dataset, like Open Map from the Ordnance Survey.
I ran into a process where I wanted to create copies of rasters in PostgreSQL. While seemingly a simple process this took me a bit of work to figure out.
For my workflow I had three rasters, which all have the same size, and I want to load them into the same PostGIS table with three raster geometry columns. I don’t think this will work for different sized rasters since the rid’s will not match.
Three rasters: raster1
raster2
raster3
Which I want to copy into: merged_raster
First to create the merged raster table:
CREATE TABLE merged_raster
(
rid serial NOT NULL,
raster1 raster,
raster2 raster,
raster3 raster
);
Then to add the rid’s. These are the id’s of the tiles that the raster was split into when loading. If your tile size is large enough then you may only have one.
INSERT INTO merged_raster(rid)
(SELECT rid FROM raster1);
Then copying the actual data is straighforward (this assumes the raster column in the raster1 datasets is called rast):
UPDATE merged_raster m
SET raster1 = r.rast
FROM raster1 r
WHERE r.rid = m.rid;
UPDATE merged_raster m
SET raster2 = r.rast
FROM raster2 r
WHERE r.rid = m.rid;
UPDATE merged_raster m
SET raster3 = r.rast
FROM raster3 r
WHERE r.rid = m.rid;
Now I still have an issue that QGIS will not load these layers. It will always load the initial raster column no matter what is chosen.
Due to GDPR, you will have to log in with an OSM id to download the full history extracts. User ID’s are personal data.
Process:
The workflow is pretty simple. Osmium-tools provides pretty easy API access to the history files, where you can provide a data, and it will extract what OSM was like at that date. We simply need to loop through the desired dates we want to extract, and pipe the results into a workflow that loads the data into PostgreSQL. The final step is simply rendering in QGIS using the time manager plugin.