New Knitter features – plus UNDO

July 12th, 2011

With inspiration from some of my colleagues in Jerusalem, I’ve been chipping away at some small but important new changes to the Knitter map stitching tool (http://cartagen.org/maps/)

A few new features today:

- UNDO – I know i’ve said this would be a doozy, or impossible, but Shai helped me figure out a simple way to get a limited undo feature working. Now, when you select any image, you can undo any actions to it… until the last time you reloaded the whole page. Maybe soon we’ll store unlimited undo history, but this is a great start. Have fun undoing.
- KML – this one doesn’t completely work, but when you export you can now see some limited KML exported files.

small stuff:

- outlined images – sometimes you can’t see the background map because of all the images you’ve uploaded. Now you can set them to appear as just red outlines. Hopefully convenient
- arrow keys – For smaller and more controlled edits, you can now use the arrow keys to move images around.
- preserve rotation – if you’re scaling an image but don’t want to rotate at the same time, hold the shift key down to lock the rotation.

Have fun!

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!

OpenLayers with Canvas

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, 2010

I’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.

Largest balloon map so far in Mestia, Georgia

July 16th, 2010

For the last few weeks, I’ve been working with JumpStart International’s project, OpenMapsCaucasus in Georgia, teaching balloon-mapping workshops. With OMC’s Austin Cowley, I had the amazing opportunity to travel to Svaneti in the northwest of Georgia, where we collaborated with local OMC staff and a group of enterprising school kids to map the entire city of Mestia:

A grassroots map of Mestia, Georgia, in Cartagen Knitter

The map, 5.5 kilometers from end to end, is the largest area ever mapped using these techniques, and was completed in less than 3 days, with a 6-foot helium balloon flying up to 1.4 kilometers above the ground. Below, you can see the flight paths of our first 3 launches, recorded with a lightweight GPS which we attached to the balloon:

1400 meter balloon flights in Mestia

The trip is the first of a series of mapping expeditions and workshops I’ll be teaching with OMC staff across the country, and the imagery will be used to improve the public domain map that OMC is developing.

Reeling in 4500 ft of string with a bicycle... three times today

Map of the Microdot: a micronation at MIT

May 2nd, 2010

Sam Kronick (read his awesome page, esp. pictures at the bottom) created a micro-nation called the Microdot on the MIT campus, on the large circle of grass known to students there as ‘the Dot’. He briefly seceded from the US (or MIT, I wasn’t sure), and we managed to make a map of the tiny nation late on its second and last day of existence.

Grassroots balloon mapping is a great way to capture temporary events and document brief invasions of public space… even protests, as we did in the West Bank last December.

See more pictures of the Microdot on Flickr

View the map in Cartagen Knitter

Instiki ‘Permission denied’ problem

April 13th, 2010

I 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

First flights: NuVu Studio mapping workshop

April 13th, 2010

The NuVu workshop at Beaver Country Day School near Boston started today, and participants Mariah, Danielle, Hayley, and Nicky flew 3 different ‘DIY satellites’ over the school’s campus, capturing some great imagery, and assembling the map below.

Read more on Saeed’s post at the NuVu blog: “First day of balloon studio

Beaver Country Day School map

WhereCamp 2010, grassroots map of Google campus

April 9th, 2010

WhereCamp was a blast – lots of people brought kites and such, and we managed to get a pretty good set of photos of the area of the Google campus we were ‘camped’ at (almost entirely due to the expertise and kite-flying of Eric Wolf). I demoed the new Cartagen Knitter and on Saturday night a bunch of us started to knit a map together, called “Deathstar Plans“. Check it out!

Actually it was mostly them (see picture below) trying to knit, and me fielding bugs, new feature requests, and so forth… it was the first time a bunch of people had gotten together to stitch a map at the same time, each on their own laptop. The feedback was great, and I was writing code and publishing it until 3am.

You can now ‘lock’ images you’re done knitting, and the tool is quite a bit more useable. Thanks again to everyone!

Late night hacking session with Cartagen Knitter

Ruby singleton classes explained

April 6th, 2010

I’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!

Embed maps from Cartagen Knitter

March 31st, 2010

Progress on Cartagen Knitter continues; a lot of detail-work but you can now embed maps you make on your own website with the handy “Embed” link.

Above, the Cantagallo community as mapped in January.