|| No. Files
|| Total Storage
|OS VML Col
|OS VML BW
|OS VMD Col
||0.2 – 2.2MB
||0.8 – 2.2MB
There are number of things to look at in terms of optimising images for web mapping:
- File size and total storage required
- Draw performance
- Image quality Continue reading Image Optimisation – Comparison Table
The previous post showed how to process panchromatic and colour TIFF images on Windows to optimise them for web mapping. Here I’ll show you how to do the same thing using bash scripts on Linux. This assumes you have GDAL installed (gdal-bin and python-gdal on Ubuntu/Debian/Mint). Continue reading Optimising Raster For Web Mapping (on Linux)
I have been working through an exercise to find alternatives to storing raster data in an expensive proprietary database format. We have a lot of raster data in various formats (ECW, jpg, LZW and Packbits compressed TIFF, uncompressed TIFF, GeoTiff) and of different types (historic black and white mapping, full colour aerial photography, panchromatic (greyscale) aerial photography, full colour base mapping tiles at different resolutions). Continue reading Optimising Raster For Web Mapping
Drive time isochrones with pgRouting and PostGIS on Windows 7 Pro. I am using Postgresql 9.0, 9.1 and 9.2, PostGIS 2.0.3 and pgRouting 1.0.7-dev. Anita Graser has some excellent pgRouting resources on her blog and I used them in conjunction with Jo Cook’s pgRouting with ITN guide to load and build my network dataset.
One of the problems I had while following this post was that I had more than the three airports she used in her example and to manually update the table 116 times for each play park in the county was not an option.
So, how to write a looping function in Postgresql to loop through all the play parks and calculate all the drive times for each facility in one go?
Postgresql docs are a good place to go and this is what worked for me in the end. Once the table is complete finish up using Anita’s how to.
-- 1. create calculate playpark costs function
CREATE OR REPLACE FUNCTION insertPlayParkCosts() RETURNS INTEGER AS $$
-- NOTE: function returns an integer representing the next play park nearest node id
-- NOTE: loops through every nearest_node, calculating drive times and inserting records into the table
FOR nn IN SELECT nearest_node FROM osplayparks_pts LOOP
INSERT INTO catchment_pp (
(SELECT sum(cost) FROM (
SELECT * FROM shortest_path('
SELECT objectid AS id,
source::int4 AS source,
target::int4 AS target,
traveltime::float8 AS cost
nn, -- this updates each time with a new value for nearest_node
false)) AS foo ) AS cost
$$ LANGUAGE 'plpgsql';
-- 2. run calculate playpark cost function
SELECT * FROM insertPlayParkCosts();