Could not load file or assembly

So, I changed jobs recently* and have been mostly brushing off my C# skills to write ArcGIS Addins. This has been largely frustrating, as Esri and Microsoft have joined forces to make things as difficult as possible. For example:

 

 

This error message was particularly annoying, as it is fairly ambiguous. The full text isn’t much more enlightening:

Could not load file or assembly xxxx or one of its dependencies. The system cannot find the file specified. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamTest\Microsoft.TeamTest.targets

If only there was a way for the system to tell my which dependency it was having a problem with. Never mind, I’ll go through them all one by one and get there eventually.

For the record, the culprit was ESRI.ArcGIS.Desktop.AddIns, and the solution is to change the CopyLocal flag to true. Makes sense that if the file isn’t copied locally, it can’t be found.

The question is, why was CopyLocal set to false in the first place? I’m sure it was true last time I looked. Not only that, but this bug has come back a few times. At least I know what the fix is this time. I still didn’t know why that flag kept changing, even though I’ve done many searches.

Finally today, I worked out what was going on – the CopyLocal flag is reset every time you update the file Config.esriaddinx. Why should it do this? Who knows, but at least I know the solution now, and I’ve written it down, so when I start searching for the answer in three months time, I’ll find it!

*Actually four months ago, but geologically speaking, that’s just a blink of an eye.

Advertisements

Thinking inside the box

This week’s @visualoop Vintage Infodesign roundup had a number of interesting entries, but this Soviet admin map caught my eye:

[Original image can be found here.]

Main Administration Regions of the Soviet Union in 1944

It reminds me of a map I made a few years ago. I had a dream where I saw a completely rectangular map of the lower 48 states of the USA. Perhaps I’d been reading too much Dr Seuss, but it made perfect sense, so when I woke up, I tried to recreate it.

Rectangular USA
Amazing, isn’t it?

I took a US States dataset and edited each state polygon down to just four points, then moved them around and added one or two more points where necessary. The result is quite pleasing, and most of the states are still a recognisable shape, though there are some notable exceptions. When distorting features in this way, there has to be some compromise and in the end, I chose to prioritise the state areas, then try to preserve  the shapes as much as possible. Some states, like Florida and Texas were never going to fit neatly into a rectangle, but I can at least make sure they stay the same size.

Let’s take a closer look at how the new “improved” map compares with the old.

USA NE

New England doesn’t really work at all when compressed into a rectangle, but most of the borders stay intact. Vermont and New Hampshire have shuffled westwards, so they now border New York instead of Massachusetts and Maine has moved across to take their place.

USA Midwest

Not such a bad fit in the Midwest, although the Great Lakes have dried up and Michigan now has a land border with New York.

USA NW

The larger states in the north west are probably the closest match to their original outlines.

USA SW

Likewise the southwest, though Texas has had a large part sliced off.

USA SE

Florida is probably the worst victim of this arrangement, but the panhandle was never going to fit into a neat rectangle.

Anyway, enough silliness for today, let’s get back to work.

The First Casualty of War

It seems like you can’t move without falling over a World War I anniversary at the moment, and in the Guardian last week there was a full page reproduction of a page from the Manchester Guardian of one hundred years earlier.

Manchester Guardian 5th August 1914

Fans of Alexander Gross’ Geographia Ltd will know all about his decision to sell high quality maps to the Telegraph in the run up to the war, but it looks like the Guardian had to throw something together at the last minute. This map of the North Sea is particularly ropey – it looks like I drew the coastlines of Norway and Denmark with my eyes closed. They say the first casualty of war is the truth, and this map seems to be telling more lies than most. If its only task is to show the rough position of May Island, however, it is performed adequately. There is at least a north arrow and a scale, and everything is spelled correctly. Maybe spending a bit more time on the Scottish border would have been good though. Compared to other cartographical cock-ups from media outlets, perhaps it is forgivable.

WWI_north_sea

The main map at the head of the page looks a little less rushed, but is still kept fairly simple. Some of the borders are obviously different to today’s maps, but contemporary maps show they are not far off.
WWI_naval_theatre

The other insert map, of eastern Belgium and surrounding countries, is also a bit scrappy. Some of the defects here could be due to the reproduction of a hundred-year-old newspaper though. I find it hard to get a sense of the region we’re looking at, without any coastline in view, but this map gives a good idea of how the Kingdom of Belgium looked at the time.
WWI_belgium

When is a map not a map?

I took a trip to Sheffield today, mostly to see an old friend, but also to visit Inside the Circle of Fire: A Sheffield Sound Map at the Millennium Gallery. This exhibition was put together by Chris Watson, a founder member of the legendary Cabaret Voltaire, but with a subsequent career as a sound recordist, specialising in natural history. I was intrigued by the idea of a sound map, and was interested to see how sounds could be placed in a geographical context. As the exhibition blurb says,

In this ambitious new exhibition, Chris will transform the Millennium Gallery into an immersive ‘sound map’ of Sheffield, charting its boundaries on the edge of the Peak and travelling its waterways to the bustling heart of the city.

Unfortunately, I must have misunderstood, as the exhibition is not a map in any sense that I’m aware of. It was interesting, and I would have stayed to listen to the whole work if I didn’t have a bored child with me who wasn’t having any of it (though he did raise a smile when the terraces of Bramall Lane started to reverberate to the sound of Seven Nation Army). The gallery was dimly lit, with projections showing black and white images of the city (though with no explanation or location). In the centre of the room were four couches set facing each other; other benches were placed along the walls, and cushions were on the floor, to give different perspectives of the work.

While we were there, we heard church bells, birdsong, a woodpecker tapping at a tree, various industrial sounds, football chants, etc., but they were just sounds, coming from nowhere (or from everywhere, depending on whereabouts in the gallery you sat). There was no sense of where these sounds were located, where they belonged. I know I’m probably being a square who’s trying to find meaning and force an explanation onto something, but that’s not the point. I’m quite happy to enjoy this piece as a sound installation, or a sound collage, or a soundscape (as the guy lying on the couch with his eyes closed clearly was. Unless he was asleep), but it’s not a map. To me a map shows the relationship between items, rather than randomly serving them up without explanation.

That said, I would love to see it again, or maybe get a podcast and while away those long train journeys listening to “an affectionate portrait of a city that the 19th century writer John Ruskin called ‘a dirty picture in a golden frame.’“.

Prometheus: lower your expectations.

I went to see Prometheus this week; it was so bad, it’s been irritating me ever since, so I just have to air some of my grievances about it. I had read some reviews in advance, so my expectations were lowered already, but they obviously weren’t low enough. It didn’t help that I chose to see the 2D version – talking to friends who saw it in 3D, it seems most of the plot devices are only there to enable whizz-bang special effects. When you take that away, everything makes a lot less sense.

I can’t stand 3D, I don’t think it adds anything to the experience, in fact the picture clarity and colour depth are reduced, and the light is given a metallic quality that makes it feel more like a video game than a film. I’m sure some people like this kind of thing, and will probably tell me that games are very realistic these days, but I’m not convinced. One of the most visually stunning films I’ve seen was Touching the Void – a documentary about a climbing accident. The aerial shots of the mountains were breathtaking, and didn’t need to be viewed through a flickery pair of glasses to appreciate it.

The best science fiction films leave you wondering, trying to make connections, and working out how it all fits together. Bad sci-fi, however, only makes you wonder why on earth nobody else has noticed the gaping holes in the plot or that fundamental laws of physics have been completely broken. For example:

Why start with a manned mission, when you could send a probe first? I guess because this is the movies, and not the real world, but I’d want to know a bit about where I was heading before setting off. Maybe by scanning and mapping the moon, you’ll find some likely landing spots, and … no forget it, just fly down between some enormous mountains and somehow land in exactly the right spot.

How come these “scientists” are acting like a bunch of excitable children? If you’ve spent most of your life (and two years hurtling across space) working towards a fundamental piece of research, would you take your time studying everything you find? Or have a quick look then hit the bottle because you didn’t get the answer you wanted in the first five minutes? And they all seem to have very broad knowledge base. Not only do the archaeologists know about ancient Egypt, stone age Scotland, the Aztecs, etc., Shaw also knows how to perform abdominal surgery. They’re scientists, it’s all science, yeah?

And how can Shaw do all that running about after major abdominal surgery? Has the human body evolved to magically heal many times quicker than at present, or was it those whizzy, futuristic paracetamol she took?

I was going to complain about Shaw’s wandering accent (as a child, she was clearly from southern England, but as an adult she’s more mid-European), but it seems that Noomi Rapace is Swedish, so I’ll half forgive her. Some actors can change accent convincingly (exhibit A: Idris Elba), but some find it more of a struggle (I’ve never been convinced by Hugh Laurie’s American accent. Maybe it’s because I just picture him dancercising with Stephen Fry).

If the “silicon storm” blowing in (what is it, sand?) is so dangerous to their space suits, how come the ship is ok to sit through it for a few hours?

Having brought the head back in for examination, why were the “scientists” so hasty to rip it open and examine it? What’s the rush? Why risk damaging it? And then, having opened the helmet, isn’t it amazing that after 2000 years, the head within is perfectly preserved? Not mummified, not fossilised, but looking like it had just died five minutes ago. That would probably explain why they were able to stimulate the nerves with a large needle behind the ear. Shame that their hasty actions resulted in the sample being lost before they could fully examine it.

When David went back into the bridge of the Engineers’ ship, how did he manage to get the dune buggy into the mound? We all saw them walk through a narrow opening and climb down a huge step to get in. Perhaps he found another door. He did seem to be strangely prescient.

When Vickers and Shaw were running away from the falling ship at the end of the film, why the hell did they keep running forwards? They were like a pair of rabbits running away from a car. Run to the side, you idiots! Maybe Shaw’s major abdominal injury was distracting her.

Why was Fifield turned into some kind of superhuman mutant, when everyone else who had contact with the black oily substance died? This is the point when I almost walked out of the cinema – this fight sequence was so ridiculous it was almost from another film entirely.

How come David knew how to open all the doors/press the right button on the bridge/play the recorder/etc.? Clearly he has a brain the size of a planet, perhaps he also got lucky quite often too.

There are many more questions ably answered here (thanks to @baxtron3000 for the link) – in particular I found the stuff about the relationship between Prometheus and Alien interesting. I thought the end was set up to completely align with the beginning of Alien, but clearly not.

The one thing I’m still struggling with though, is how the Engineer seeding human life on Earth in the prologue is supposed to fit in with contemporary knowledge. The short answer is: it doesn’t. How can individual strands of DNA flowing down a stream reform into complete humans? Do the humans grow in the stream then walk out fully formed? How does that fit in with evolution and the fossil record? We know that homo sapiens first evolved in Africa’s Rift Valley, but that scene looked more like Iceland, or maybe Alaska or Kamchatka. Or maybe he was just seeding life in general, but there were already grasses visible in the background, and in any case the DNA was an “exact match” with human DNA.

I know it’s only  a film, a story, a piece of entertainment, and I should be able to suspend my disbelief for a couple of hours and just sit back and enjoy it, but I think Prometheus just went too far over the line from the faintly plausible into the clearly ridiculous (Dr Who regularly dives into the ridiculous – he can time travel for a start – but any difficult explanations are handled pretty well). Maybe I’m mostly annoyed because I have to sit through a lot of children’s films these days and so rarely get to see a grown-up film, it needs to be a good one. Having said that, Aardman Animation’s The Pirates! In an Adventure with Scientists is great. Don’t go and see Prometheus, watch Pirates instead. There’s even a cartographic joke about the sea creatures drawn on ancient maps…

Tubular Fells

Spotted in the window of a Keswick bookshop:

Wainwright map

‘Tubular Fells’: All 214 Wainwrights on one colourful poster!

There is an endless amount of recycling in popular culture, from tv and movie remakes, to pop bands covering and re-covering old hits, to “Keep Calm and Carrry On” (which seems to be everywhere), to Harry Beck‘s famous tube map.

Often the imitators are of a lower quality or completely miss the point of the original. For example, the ‘Keep Calm’ poster’s great strength is not only its simplicity, but the choice of font, Gill Sans. Some of the reproductions use a different font, so don’t have the same impact.

There have been many reworkings of the tube map, and one of the earliest (and I think most successful)  was Simon Patterson’s ‘The Great Bear’. Stations were renamed after famous people and lines given themes such as explorers, philosophers, comedians, etc. The artist has obviously put a lot of thought into these, as some people fall into more than one category (for example, Gary Lineker was at the intersection of footballers and artists).

A little less thought has gone into the Wainwright poster though. The map is nicely and simply laid out, and I like how the Lakes have been generalized into rectangles, but I’m struggling a bit with the map’s actual purpose. I haven’t looked at a Wainwright book for a few years, but as far as I remember, each book contained a number of different walks over the peaks in a certain area (with the exceptions of the Cumbria Way and Coast to Coast of course). I don’t think each book showed just one continuous route over every summit, which is where the tube map analogy falls down.

Then again, maybe I’m just finding fault where there isn’t any. It’s certainly a lot better than this “map”:

Direction map

I think I’d need another map just to work out where it is. Oh well, at least they’ve given the postcode, so you can put it in your satnav…

Britain/England/Whatever

I know it’s only an illustration from a children’s book, but this kind of thing really irritates me:

England

Not to worry, I’ve fixed it. Just 30s work in GIMP and it’s much better. I think.

England, Wales, Scotland