(╯°□°)╯︵ ┻━┻

Don't take life too seriously. You'll never get out of it alive.

Google Maps polygons with holes

The last couple of weeks I have been experimenting with Google Maps trying to draw filled polygons that look alright. I’m using matplotlib for making the polygons and I’ve figured out that the output from contourf(…) is like a plotting routine where you first get a polygon that should be filled with the current level and the following ones are holes in it. Before I just draw them all, coloring the holes with a lower color. This forced me to sort the polygons according to size which worked ok but didn’t look good.

Improving Google Maps polygons with b-splines

Google Maps is great, you get an extremely nice background map for free. I know that there are alternatives (Bing, OpenLayers, etc) out there but since I’m running Google App Engine it seems easier to go Google all the way. I’m plotting polygons and polylines (that’s what weather is about) and it works great but my input data is kind of sparse so the polygons look very rough. To improve them I’m using b-splines. Found a very nice article here. I just changed the javascript so it works with lat/lon-arrays and the output is an array of google.maps.LatLng.

Google App Engine ReferenceProperty and HTML5 local storage

The best thing with my job is that I work with the same things that I can spend hours doing in my free time. Too bad you don’t have 40 hours a week free time. It’s been a while but I have finally made som progress. I had some troubles with BigTable (the database that you use in Google App Engine). I put pretty large arrays with weather data in db.BlobProperty but when I read this back from the database GAE ran out of memory, even if I didn’t touch the blob. After reading up on this I found out that I had to use db.ReferenceProperty.

Solving the UTC problem again and again... (Setting default time zone in JVM)

I the world of weather everything is done according to UTC and this causes problems, time zones always does. Yesterday I was debugging an error (not related to weather) in a Spring/GWT/Hibernate app where we are scheduling things. Everything works perfect in the development and test environments but as soon as it is deployed to EC2 it fails. I had a hunch that this was time zone related (EC2 servers on Ireland). Some debugging code was added and the problem was found.

Kindle

Given the exchange rate for dollars and my never ending need for toys I got a Kindle yesterday. During unboxing I thought that they had glued the instructions onto the screen until I realized that it was the screen. The books I have bought on the iPad earlier synced right in and it remembered which page I was reading. My hope is that it will help me start reading regular books again and I really like the idea that I can buy a book anywhere (where there is 3G coverage) and get it delivered instantly. Also nice that I can listen to my audible books and buy new ones.