Wednesday, August 27, 2008

Installing ArcIMS 9.3 on Vista or Vista 64: Internal Error 2738

A quick note to the web: if you are trying to install ArcIMS 9.3 on Vista, you may run into the cryptic fatal error "Internal Error 2738". Apparently the ESRI installers require VB Script (say it ain't so!) and Vista doesn't register it by default (perhaps a security hole they wanted to plug?). You have to register it yourself by opening an administrator command prompt and running "regsvr32 vbscript.dll".

If you're on Vista, it's probably in C:\Windows\System32. If you're on Vista 64 there's one there but it won't do you any good, as the installer runs as a 32 bit process. (As you recall, System32 holds 64-bit DLLs on Vista 64. Makes perfect sense, right?) You'll need to register the vbscript.dll in C:\Windows\SysWOW64.

Thanks to Swapna at ESRI support services for resolving this issue in just a couple of hours on an otherwise quiet Wednesday afternoon.

Thursday, August 21, 2008

Okay, who broke Georgia?

The US has been "at war" for so long that I suspect most Americans don't think much of the current tussle over Georgia. While the stress of our wars (against drugs, against the Taliban, and against Iraqi militias) have stretched the military to its limits and hurt our economy, the fact is that most people are still not directly affected by them. Why would the threat of a war over Georgia worry us? The number of casualties has not impressed itself into our national consciousness yet. How could it? With approximately 30,000 wounded in a population of 300,000,000 (one hundredth of a percent), the Iraq war cannot affect our conscience the same way the Vietnam war (330,000 casualties in a population of 200,000,000, a fraction 15 times bigger) or World War II (875,000 casualties in a population of 130,000,000, fraction 70 times as large) did? But shouldn't the thought of war with Russia just scare the pants off everyone? Even a limited nuclear exchange would make the numbers above seem like the good old days. Why does no one talk about it?

An increasingly common thread is the one nicely summed up by Thomas Friedman at the NYT wondering why we would "cram NATO expansion down the Russians’ throats". Why was Georgia on a track for NATO membership? Why is Poland in NATO? Against the Soviet Union's stated goals of world domination promising to defend a divided Germany or a weakened United Kingdom with nuclear weapons seemed sensible enough. Against a modern Russia more keen to misspend its oil wealth and struggle with its shrinking population, why do we need to commit American troops to defend Poland, a land with no natural borders? Or Georgia, a charming yet tiny republic of limited geopolitical consequence? (Yes, they have an oil pipeline. There's only so often Russia can threaten to not sell their oil. It's all they've got as a source of national wealth.)

So I've been wondering this for some time. Why do we need to expand NATO to Russia's doorstep? So we look like fools when the question of "will you defend peripheral NATO members with nuclear force" comes up? If Russia invaded some separatists parts of Poland would we really pull a half million troops from Iraq, steam the Navy into the North Sea, and target our nukes at Moscow? Really?. It seems unimaginable.

Reading this article made me remember I've been wondering this a long time. Through the miracles of the Internet and, coincidentally, the Israeli embassy in the US, I found a transcript of me asking this question to then Secretary-of-State Madeline Albright over ten years ago. The full transcript is here.

(My question) It is clear that NATO's role must change in the post-Cold War era, but why does the administration think that expanding NATO's unilateral defense agreements into the former Soviet Bloc is a good idea? Russia's recent pressure on Belarus and some warmongering by its Generals indicate that even an unsteady Russia is not keen on the idea. In this century, Western Europe has offered defense of nations of Eastern Europe before and then reneged on those promises. Why emphasize military inclusion now rather than concentrate on economic inclusion and/or aid?

Her answer, emphasis mine

This is a very important question and it is clearly among the highest priorities that President Clinton has. He has stated that an undivided and stable Europe is very important to the United States.
I think that we all know as students of history that Central and Eastern Europe have, in fact, been the breeding ground of two World Wars. An instability in that region is something that concerns us all. We have made the decision that it is important to expand NATO to cover that region. We, however, also know that it is very important that the Russians do not feel that an expanded NATO is a threat to them or an adversarial move.
The purpose of an expanded NATO is, in fact, to create, or help to create, stability and deal with problems within that gray zone, that gray area in Central and Eastern Europe. We think that that is not only to our advantage but, frankly, also to the advantage of Russia. Because we are concerned about Russia and not letting that great country have a sense that it is being left out, we are also in the process of negotiating a charter between NATO and Russia which would, in fact, have the Russians understand that NATO itself is not an adversary.

How silly does that statement seem now with Russia making nuclear threats against Poland's new US-supplied missile defense system? Back in 1997, oil was about $15/barrel, Russia was divided and confused, and we were pressing our advantage in the cold war. With oil now at $115/barrel, and US power at a nadir thanks to poorly chosen wars at our periphery, how smart does it look to set up nuclear outposts in the bear's back yard? Why we might imagine how we'd feel if the Soviet Union had tried to place nuclear missiles 90 miles from Miami. Fences can indeed make good neighbors, and we ought to be happy to let Georgia be a fence.

Russia won't be strong forever. If we feel threatened by them, let's concentrate on worrying about what gives them strength: the high price of oil. We can wait out their inevitable population decline and foster responsible economic development. If we're going to make a multi-generational geopolitical bet, let's bet on demographics, work on energy independence, and reap the dividends of peace. Let's not bet with our youth that we can push Russia as far as we want, and that all wars are easily fightable on credit. We've already pushed them enough. A war with Russia can't be put on the nation's credit card. I think we knew this 10 years ago when we were uneasy with NATO expansion into the former Warsaw pact. Let's not lose sight of it again.

Wednesday, June 25, 2008

ArcGIS Explorer Build 480: Threading!

ArcGIS Explorer (AGX to its friends, apparently) has a new release out, with a great number of promised new features. I'd watched previous builds of AGX through an HTTP proxy to see what all it got up to while fetching images from the web. Investigation showed that it was brutally single-threaded and not terribly bright about what order to retrieve tiles in.

Build 480 changes those things a great deal for the better. Even when looking at a single layer, such as the default satellite/aerial imagery provided, you can see AGX running 2 to 4 simultaneous connections to fetch tiles. Their documentation promises multi-threaded downloads only on a dual core machine, which I've got, so your mileage may vary. I would have thought that even a single core machine would benefit from having several HTTP requests in flight, as they involve so much waiting around, but one suspects ESRI did some performance testing.

When connecting to a very slow service, such as most of the WMS servers out there, I was able to see AGX with as many as 10 connections in flight at once. This is good! There are still some starvation issues (the crappy WMS service kept the fairly snappy ESRI service from showing up for a long time), but this is a great improvement.

The order in which tiles are retrieved still seems suspect to me, with the world view first fetching Asia, the north pole, and Antarctica before the western hemisphere view which is the default. Grabbing multiple images at once compensates for the imperfect tile fetching strategy. And like before, shutting down AGX while it has several open HTTP connections is not pretty: it waits until they are timed out to shut down completely (even continuing to fetch new tiles while it tries). These flaws mean that you still need to be careful using any service which is slow or broken -- other imagery will get stuck behind it.

More news as investigations continue. So far, so encouraging!

Wednesday, June 18, 2008

Drilling for new oil in the USA

So the debate over drilling within the US has opened up again. There will be lots of debate about environmental impact that I don't feel sufficiently informed on to comment about. But given the success Bush has had redefining US foreign policy as a contest to see who can be the biggest asshole (read: tough on terrorists), I suspect the debate will revolve once again around that old canard: "energy independence". The idea is that if we drill more at home, we'll be less dependent on foreign oil.

Let me present a slightly different viewpoint I don't hear discussed much in the media. Allow me a couple of asides:

First, the notion that oil drilled in the United States will be consumed in the United States is of course not entirely true. Oil produced in Alaska may be much more cheaply consumed in Japan than in New York. That's just geometry. The market will make that decision based on shipping distances, quality of crude, availability of refining, and a thousand other factors. What domestic drilling may do is increase the world's supply of oil a bit (or at least slightly arrest the decline of US production), and thereby place downward pressure on the price of oil. This seems like a laudable goal.

Second, you will hear a few people say that it's not worth drilling for more oil because the amount is tiny and would not be felt for many years. Just because something won't have an effect for 5 years doesn't mean it shouldn't be done. But it's not often appreciated how much oil we consume and how much impact US exploration might have. Of course the numbers are always open to debate, but take the two extremely massive oil fields recently discovered off the coast of Brazil. These are game-changing fields, some of the largest on the planet. They total roughly 10-20 billion barrels of oil equivalent. That's a lot, right? What if we found those hiding in the Gulf of Mexico. Even though we're pretty certain there's nothing that big out there, even so... These fields, if drained completely dry, would only serve the US's oil consumption for less than three years. Three years. The numbers are staggering. Drilling activists like to suggest that there is a ton of oil in the ground that the tree-huggers are just hiding from us. That's true: but the amount of oil is not particularly significant if you look at it from a multi-decade point of view.

Which brings me to the point I was really trying to make. The point is actually very simple.

There's not a lot of oil left at reasonable prices given current consumption and growth trends. It's very hard to tell whether this price spike is the beginning of the end, or just a head fake, but the end is coming in our lifetimes. As any petroleum geologist will tell you, "the end" will arrive with lots of oil left in the ground, just too expensive for our means. When that end comes, when oil is $1000 per barrel, gasoline is rationed for national security reasons, when poorer countries without access to alternative energy technology are going to war to secure the oil they need to fertilize their crops so they can eat and drink, what situation do you want the US to be in? With major reserves already tapped to secure a few extra years of $4/gallon gasoline? Or with major reserves available within our borders to provide the fuel the army and navy require to secure peace in this dangerous world? Do you want the strategic oil reserve to have been run down to keep the cost of Summer road trips low? Or in place to ensure the smooth functioning of the military when Mexico, Venezuela, and Nigeria won't have any oil left to export? Do you want to have burned all the oil to light up Starbucks signs at night, or have some left over to maintain the crop yields which allow our nation to produce something the rest of the world thinks is worth buying?

Oil is running out. Aside from the obvious implication that we should be working on alternative sources of energy (and oil at $140/bbl is doing that much better than any Congressional plan would), it's not obvious to very many people that we should keep what's left for ourselves. Every nation should be looking towards energy security, just as they look for food security. Why should we pawn our future for a few years of fun in the present?