Comparison of SVG and Canvas in OpenLayers
July 30th, 2010
Tobias Sauerwein recently emailed me about my mapping framework Cartagen, and linked to his fantastic analysis of SVG/Canvas suitability for map rendering. Thanks!
Oh, of course, it bears mentioning this earlier comparison I dug up some months ago, which focuses on SVG/Canvas different sized rendering areas and different #s of objects.
gdalwarp cannot perform perspectival distortion
July 26th, 2010I’ve been banging my head against a wall for a few days on this one, first struggling with ImageMagick, then switching to gdal to get full-resolution geoTIFFs from Cartagen Knitter. I had a ‘duh’ moment just now when I realized that gdalwarp can only do polynomial or thin plate spline warps, neither of which are what I want – that is, perspectival warping. I want to map 4 corner ground control points or GCPs to four latitude/longitude positions. Back to ImageMagick…
I know there are 5 GCPs in the image above – it was the same deal with just 4… it can’t do more than a shear unless you either add the minimum 6 GCPs for a single polynomial warp, or go for a thin plate spline (TPS) distort. A good way to think about TPS is as if the image were a sheet of thin metal (the reason it’s called a TPS) and that you’re bending it in the z-dimension, aplanar. This causes funny curved edges and is not what I’m looking for.
OK, one more note for future reference: see this page for a discussion of different warping techniques and also for the minimum number of GCPs required for different-order polynomial warps.
Morozov: examples of ‘bad’ uses of internet and new media
July 24th, 2010In reading for my thesis, I came across Evgeny Morozov’s article “How dictators watch us on the web” – in one section of which he lists a number of uses of the internet and new media which he classifies as bad:
In Russia, the internet has given a boost to extreme right-wing groups like the Movement Against Illegal Immigration, which has been using Google Maps to visualise the location of ethnic minorities in Russian cities and encouraging its members to hound them out. Criminal gangs in Mexico are fond of YouTube, where they flaunt their power by uploading videos of their graphic killings. Generally, in the absence of strong democratic norms and institutions, the internet has fuelled a drive for vigilante justice rather than the social variety Miliband was expecting.
He’s writing about whether the internet can be used to promote democracy, really, not ‘good’. But I can’t help but think he’s basically arguing that the internet is a neutral force. He’s challenging pro-democracy uses and providing examples of anti-democracy uses. Isn’t he just describing a kind of information technology arms race, though? (Clay Shirky agrees, though in my opinion their debate devolves into semantic static) Is there a clear winner yet, or will there every be? Maybe we just can’t generalize this broadly. These examples were pretty interesting anyways.
And it doesn’t help that anyone with a computer and an internet connection can launch a cyber-attack on a sovereign nation. Last year I took part in one—purely for the sake of experiment—on the websites of the Georgian government. As the Russian tanks were marching into South Ossetia, I was sitting in a cafe in Berlin with a laptop and instructions culled from Russian nationalist blogs. All I had to do was to input the targets provided—the URLs of hostile Georgian institutions (curiously, the British embassy in Tbilisi was on that list)—click “Start” and sit back. I did it out of curiosity; thousands of Russians did it out of patriotism. And the Russian government turned a blind eye. The results of the attack were unclear. For a brief period some government emails and a few dozen websites were either slow or unavailable; some Georgian banks couldn’t offer online services for a short period.
Patrick Meier has also been responding to Morozov’s article, and egads, there’s been a lot of debate on this one.
Shuttle launch timelapse
June 3rd, 2010Instiki ‘Permission denied’ problem
April 13th, 2010I run a few Instiki sites on Phusion Passenger, and they occasionally break – namely, they give a ‘Permission denied’ message which is hard to track.
The problem is that there are temp files like /tmp/passenger.1234 which have some kind of permissions problem.
To resolve this, you can simply delete those files, like with:
sudo rm -r /tmp/passenger*
and reboot Instiki (Apache, really):
sudo apachectl graceful
Ruby singleton classes explained
April 6th, 2010I’ve become used to JavaScript (gasp! cringe!) in writing Cartagen and sometimes find myself wanting to assign arbitrary attributes to objects I just made up. Unfortunately this JavaScript code:
var new_object = { we: 'can', make: 'up', any: 'thing' }
doesn’t work in Ruby:
new_object = {}
new_object.latitude = 'lalalala'
It yields:
undefined local variable or method `latitude' for []:Array
But you can create what are called ‘singleton objects’, as described on contextualdevelopment.com:
foobar = Array.new def foobar.size "Hello World!" end foobar.size # => "Hello World!" foobar.class # => Array
Hooray!
Help fund Trade School’s second semester
April 5th, 2010Trade School is a fantastic ‘teach people things for barter’ program organized by Caroline Woolard in NYC. Read about them on the New York Times City Room blog: blog post where they’re described as “A Trade School Where Ideas Are Currency”
I donated $150! Donate here: Trade School on Kickstarter
What is Trade School?
At Trade School, students barter for instruction. We turn storefront space into a platform for learning, a place where enthusiasts and specialists teach in exchange for basic items from students. Anyone can offer to teach a class. Students sign up for classes by agreeing to meet the teacher’s barter needs. We ran Trade School for 35 days and we want to open again!
A Chinese wall/ A toilet stall.
March 15th, 2010My friend Pete Feigenbaum’s recent album “%” got a poor review on Pitchfork, which is probably what Pete was hoping for. His band Dinowalrus will be playing at Great Scott in Allston (Boston) on April 1st, around 9:30.
I have to love the Pitchfork review, which includes such gems as:
About the only thing that holds it together is an almost joke-y baritone from Feigenbaum that barks lyrics like, “A Chinese wall/ A toilet stall.”
which I’m sure just makes Pete extremely proud.












