Time manager is a fantastic plugin allowing you to create a time lapse video of geospatial data provided it comes with a date-time attribute. The following video shows data on where energy advice visits took place using the created date time stamp from the survey plotted every 24 hours.
Once a routable network has been set up we can start to find the shortest path (using Dijkstra’s algorithm) between two points. From here on, I will be using the OSM data for the London road network.
The query use’s a ‘cost’ column – which could be anything thing you like – to calculate the shortest cost from one node to another. In this example I decided to use travel time (rather than distance).
First, I changed the distance of each vertex (the way table) from km to miles, and then calculated the time it would take to traverse each vertex whether walking, cycling or driving. To make this more accurate, I updated the max speed (forward and backward) along each vertex dependent on its class (as listed in the class table).
Following on from an earlier post updating OS Codepoint data , this post will now look at how to process OS Codepoint with polygons. This dataset provides a polygon for each postcode, including vertical streets (represented by squares) which is where a building has more than one postcode.
1) From the data provided by OS all the shapefiles (for each postcode sector) need to be merged into one. This can be achieved using QGIS ‘Merge to one’ tool under the vector toolbar or by writing a simple python script in arcmap utilising the merge tool.
2) We are going to create two extra fields in the attribute table ‘PCOutcode’ and ‘PCSector’ – this will provide us with additional symbology options with GIS. For ‘PCOutcode’, use =RTrim(Left(Postcode,4)) to capture the first part of each postcode, and for ‘PCSector’ use =RTrim(Left(Postcode,5)) where Postcode is the postcode field and RTrim removes any trailing spaces.
A common task within GIS is geocoding; the process of plotting postcodes within a GIS using an address locator. Cleaning the data for this process requires several steps. The format requires postcodes to be a length of 7 characters. This is easily achieved using the following formula in Excel:
=IF(LEN(A2) = 6,REPLACE(A2,3,1,MID(A2,3,1)&” “),IF(LEN(A2)=7,A2,IF(LEN(A2)=8,SUBSTITUTE(A2,” “,””))))
This works for postcodes of lengths 6,7 and 8. Other lengths can be added but it is rare you would encounter these. Save this as a csv file, ensuring the column has a header.
QGIS has many fantastic plugin’s, but one of these I use most in my day to day work when creating maps is the Mask tool. This allows me to either completely, or partially, mask the base map outside my area of interest, so the user can concentrate fully on the features you have mapped within their area of interest.
It’s so simple. Just select the polygons you want outside of which you want the mask and then enter the symbology parameters. I personally make the mask completely white to remove the base map but you could alter transparency levels to really bring the base map alive within the polygon.