Microsoft Research's MapCruncher project is another one of those cool, impressive pieces of software that sometimes slips out of the giant without garnering a price tag. For those of you who haven't heard of it, it's a powerful, easy-to-use visual tool for creating custom map tiles to overlay on Bing Maps (formerly Virtual Earth). I won't go too much into how to use it as that info can be found elsewhere (and it's pretty easily grasped from the help file provided anyway), but suffice it to say that you load up your source map in one of the raster or limited selection of vector formats it can process, and then start correlating distinguishable features on your map in the left pane with the Bing Maps tiles in the right pane. When you're finished, the program will automatically adjust your map to match the mercator and warp used in VE (and possibly Google Maps, as I believe it uses the same projection and tile size, though I don't know if the tile seams are compatible... that's one to look into). The more points you match, the better the result, of course. Click Render, and it splits up your original map art into the appropriate tiles for its bounds at every zoom level, plus writes some demo helper code to get you started quickly. It's fantastic!
I did, however, run into some trouble with it.
Every time I tried to load a PDF file, any PDF file I tried, I got the same strange error message in a dialog box:
Unable to cast object of type 'MSR.CVE.BackMaker.ExceptionMessageRecord' to type 'MSR.CVE.BackMaker.RectangleFRecord'.
Given that MapCruncher is a research project, and the last build was in November 2007, and the contact email address is just "cruncher@microsoft.com", I figured I might be out of luck for anyone shedding some light on this, but I figured I had nothing to lose and sent off an email. I kid you not, a reply came almost INSTANTLY from MapCruncher project lead Jeremy Elson, which read:
Thanks, and we’re glad you like the software!
Unfortunately our PDF rendering engine is 32-bit only – if you’re
using a 64 bit os (more and more common these days) try running the app in
32-bit mode.
Jeremy
...Wow. I AM using Server 2008 x64. Nice guess! It took me longer to look up the syntax to force 32-bit mode on a .NET assembly than it did for Elson to guess the problem and reply with a solution. Do this with corflags at a Visual Studio command prompt in the MapCruncher executable's directory:
corflags MapCruncher.exe /32BIT+
Sure enough, my issues disappeared after that. (Don't worry, corflags doesn't produce any output unless you screw up.)
Near-instant response to a research project support inquiry with a spot-on problem-eliminating answer? Nicely done, Jeremy, you've restored my faith in Microsoft.
P.S. Raymond Chen-style "Pre-emptive Comment": Yes, it's entirely possible that because the assembly has lacked that flag since at least Nov 2007, Elson gets that question all the time and knew the answer like the back of his hand. Maybe, but I'd think if it came up that often they'd put out a rebuilt release or at the least mention it on the MapCruncher page of the MSR site. More persuasively, you'll notice that Googling for that error message turned up NO hits, nor did I really see any from more generally trying to describe the problem, so it can't come up that often. That's actually why I'm blogging about it.