Catchy title, I know…

In the big GIS project I’m working on we have a large set of data, 100 million rows+, which needs to be rendered as an overlay.  This turned out to be tricky as I’m not really a GIS developer and learning as I go. I figured it out through trial and error so I’m writing this post to help those like me, hopefully I’m using the correct keywords I was looking for so that SEO picks this up!

Our frontend architecture is as follows;

To create the tiles in Geoserver we ended up creating a parametric SQL layer, more info on that here, and we are adding it as a WMS layer.  What I discovered in the end is that to pass the viewParams through to Geoserver you need to add a layerParams option with viewParams within it, for example with start and end as SQL parameters;

layerParams: {
    viewParams: "start:'2014-01-01T00:00:00.000Z';end:'2014-01-31T00:00:00.000Z'"

In a WFS call the equivalent would be to append the following and one thing to note in both cases is to properly escape the characters;

Hope this helps!


 I’ve a trusty paint of headphones I’ve had for ten years or so and used to use them when playing my electric drum kit, the long cable was particularly useful at the time but now I use them almost exclusively at my desk the cable is proving a pain in the neck.  I have a Bluetooth headphone adapter I use at the gym so figured a simple hack may be in order.

I shortened the cable, added a loop for the adapter to clip to and job done.  The end result is closed back headphones that, with an extension cable, can be used as normal and a headphone adapter I can still use at the gym.

WP_20140204_005 WP_20140204_006

Simple enough but fantastic sound quality and functionality by combining a few things I had lying around, saved my buying a new pair of wireless cans and gets more life out of kit that was underutilised.


Lifehacking!  Until recently I’ve spent more time blogging about it than doing it but in the last few months I’ve found a task/time tracking technique that seems to be working and today had an idea of how to adopt a complimentary method too;  Bullet Journal and Kanban.

Last year I started using Bullet Journal, which the guys at the source can explain far better than I, with a great deal of success.  I used a pocket sized Moleskine which I could take anywhere and it has helped keep track of what I’m meant to be doing long term and when.  The only irritation I found with it was that I tend to plan more than a month ahead so in my 2014 notebook I’ve written out January to December on pages 1 – 24 so my entire year is in one place and after that it follows the same idea as standard.

For my bigger projects I’ve long liked the idea of Kanban but I like to make notes and flesh out ideas in notes so using sticky notes to track the task as well as a separate notebook to track details of the task seemed a pain in the backside.  On the walk back from lunch today an idea, OneNote!

OneNote is a fantastic application, when it was initially pushed out at Microsoft it was a little bit of a pain but once coupled with FolderShare it became brilliant.  This pre-precursor to SkyDrive allowed notebooks to be sync’d across multiple machines via the internet which made the product very useful and with the later versions this is done automatically via SkyDrive.  I’ve been using OneNote for years for keeping track of ideas and research but using it as a Kanban board never occurred to me for long running tasks.  It turned out to be as simple as this;

OneNote Kanban

Create a new notebook called whatever you want, create a section for each state and a page per task.  The three in “In Progress” denotes the WIP (work in progress) limit and as a task changes state simply drag it to the relevant section, job done.  I think the two concepts will work quite well together as I can make a note on the go in my bullet journal notebook and when I get home add it to my backlog if it’s a longer term task or just do it if its a short one.  To handle the context switch between the two I’ve added a market to the bullet journal scheme which is a ‘K’, this denotes the task has been moved to my Kanban backlog and can be ignored from the perspective of the journal.

The journaling technique is working far better for me than the Master Planner or The Chain ever did insofar as I’m still using the journal six months later and as I use OneNote on a daily basis fingers crossed it’ll help too.  Time will tell!  If nothing else it’s a good place to throw all my ideas.


So I was working on a set of scripts to automatically commit and deploy HTML, JavaScript and CSS stuff using PowerShell however as I’ve just discovered WebStorm which does all this and allows for live preview and debugging of code I’m not going to bother anymore!

After installing it I quickly managed to configure auto-deployment to a Linux server via SFTP and live previews in Chrome.  Having spent the last few months getting to grips with JavaScript programming I have to say I’ve missed having a good IDE, live preview of code that updates on the fly really is a brilliant touch and should make things far easy moving forward as I rewrite our UI using AngularJS.

Note:- I had an issue testing my SFTP connection when I configuring the deployment location and received the following error;
“Conection to ’′ failed.  Invalid descendent file name “Accept:”.”

It turns out that I’d managed to somehow create a file called “Accept:” in my home folder in Ubuntu and the WebStorm IDE doesn’t appear to deal well with filenames that contain ‘:’, at least I think that is why.  All I know is I deleted the file and was then able to connect without issue.  Hope this helps someone as it took a while to figure out this morning in my pre-caffeinated fugue.


I cant imagine I’m the first to do this but a simple way to emboss a Moleskine notebook is to doodle on a postit note and to draw over your design with loads of pressure. Crude but a simple trick.

My 2014 notebook still needs to be laser engraved though, a project for after Christmas at the Reading Hackspace methinks.




So I’ve been trying to get to grips with scripting for git to allow me to commit then deploy via FTP on Windows. I discovered git-ftp which looked promising but it was Linux flavoured, I followed the rabbit hole all the way to installing Cygwin and attempting to build it for Windows before realising I could just use PowerShell with Posh-Git and PSFTP (PowerShell FTP) instead. More to follow on that in the next post however though I’d share a few things I learnt about Cygwin first, no point in my learnings going to waste, this post is mostly a link dump.

Git-FTP can be found here and information regarding installing packages into Cygwin can be found at the source and there is a packpage manager, apt-cyg, that I never tried but looked useful.

A few issues I hit were that I sit behind a proxy at work so following this guide to configure Cygwin to have internet access.  The guide works for http access and if you need https access, just used this command;

export https_proxy=https://user:pass@host:port/

To access my existing git folder which sits in my Documents folder I mounted my C: drive in Cygwin then created a symbolic link;

mkdir /c
mount c: /c
cd ~
ln -s /c/Users/Username/Documents

This creates a folder named Documents in your home folder which maps to your Documents folder in your Windows user folder.  I found this in a cheat sheet on a Stanford users site, very useful so my thanks to them.

All fun learning, more info on my PowerShell solution in the next post.


I’m working a lot with GeoServer at the minute and needed to get a start and end date for data available in a layer, I don’t have direct access to the backend so thought I’d have a go at using PowerShell to get what I need. PowerShell 3.0 onward has ConvertFrom-Json and Invoke-WebRequest so it turned out to be rather simple;

$array = @()
$json = Invoke-WebRequest -Uri "" | ConvertFrom-Json
$json.features | ForEach-Object { $array += $ }
$array = $array | Sort-Object
Write-Host "Start: " + $array[0] + ", End: " + $array[$array.Length - 1]

This code creates an empty array, invokes a webrequest to get the JSON from the specified layer, pushes the time property from each feature into the empty array then sorts it. Outputting the first and last element in the array gives start and end.

No doubt there is a max/min function I could have used that I’m not aware of so feel free to mention it in the comments if so. It all turned out to be surprisingly easy and I should be writing a similar block of code in JavaScript soon so will post it as comparison.


The thing a week challenge was a noble one and though I’ve not blogged about a thing a week I’ve certainly not stopped making things, doubly so in my new job in which I build cool things for a living though more on that when I’m allowed to talk about it… Of the random things I’ve made I’ve not documented a lot of them so can’t write them up here and to be honest the blogging part of it stopped being fun. It took a fun challenge of making something and made a chore of it so for that reason I’m going to call the challenge done with mixed results. This way I can carry on making things and don’t have the stressful overhead of documentation, other than for the really cool stuff.

When a hobby becomes a chore, you change the way you do it or you change hobbies. I choose the former as life is what you make it and I intend making to be fun.


The tripod strap I made in the previous post was when I was en route to London Film and Comicon to film the first video for our new webseries, The Series of Wonderful Nonsense.  I think it came out well, two days online and we’re over a thousand views already!  The facebook page is online though all but empty at the minute, should be up and running along with the site before too long.



So the bag straps I added a while back to hold my tripod didn’t work, this morning I threw together a simple shoulder strap to make it easier to carry.

%d bloggers like this: