Skip to main content


Showing posts from 2007

Elaborate Hack for Transparency

ArcGIS supports transparency*.
&#42 Some restrictions apply.

But if you really want to do anything with transparency you quickly learn that the functionality available is completely inadequate.

I work with a number of layers that rather than resembling a stain glass window with neatly segmented regions, come closer to resembling the outcome of tossing said window down a flight of stairs. The smashed bits all laying in a pile overlapping each other sometimes seven or eight layers deep.

But how to represent this mess? In ArcGIS you really can't because ArcGIS only draws the top most layer. Take a yellow piece of stained glass and drop it on top of a blue one and in the overlap you don't get green, but blue. Even when you set transparency!

The only way to complete our Glad bag analogy is to make two independent layers with transparency applied. Not bad when there's only two. But what if there's 582? That would take a while. And what if the layer with 582 is constan…

Democracy Player

I abhor Windows Media Player. I've been looking for a solid non-proprietary video player for some time. VLC is good, but could use some work on the user interface.

Today I downloaded Democracy Player, a free, open source, and built by a non-profit organization with the goal of keeping internet video from being dominated by any one source.

Here's there brief run down of why you should consider Democracy Player:

1. Can't play a video? Try us.
Play virtually any video-- Quicktime, WMV, MPEG, AVI, XVID, and more. Browse your collection, make playlists, stay organized.

2. Get Internet TV Shows
Subscribe to any video RSS feed, podcast, or video blog. Explore over 1,000 free channels with the built-in Channel Guide.

3. Search YouTube
Download and save videos from YouTube, Google Video, Yahoo Video, and other sites.

4. High Definition and Fullscreen
Your computer screen is a high-def display. Watch free HD videos in gorgeous fullscreen.

5. BitTorrent Animal
Easily download any BitTorrent fi…

Could AJAX Replace Flash?

In at least some applications I think the answer is yes.

The animation control included with the ASP.Net AJAX Control Toolkit is pretty impressive. Animate OnMouseOver, OnMouseOut, OnClick, OnDoubleClick and more. Transition effects, movement, visibility screening and the whole thing is controlled by an XML document.

Here's a 20 minute video (unfortunately only available in .wmv) on using the Animation Control packaged with the Toolkit.

I'm going to try using it in place of Flash in my next application.

AJAX without the work

I've been experimenting this week with ASP.Net's new AJAX Control Toolkit. I've hard-coded some of my own JavaScript and AJAX... and by comparison this is painfully slick. It's too easy. I'm sure I'll discover some serious limitations, but at least for the moment I'm pretty blown away.

Take a second to browse all the controls that are included in the download, which being JavaScript will work in any application not just ASP.Net.

Saving Label Expressions

Using the database querying label expressions I wrote about on Thursday, I got to learn a new "feature" of ArcGIS today: Disappearing label expressions on modification of a definition query

That's right, spend five minutes building a database query into your label expression, get it working perfectly and then to celebrate try limiting it with a definition query. Bam! No more label expression. Ain't ArcGIS beautiful?

In dealing with this "feature", I discovered ArcGIS has the ability to Save and Load label expressions.

I'm quickly developing a catalog of label expressions.

Ctrl -Alt -Delete in RDC and VM

I'm always bringing up the Task Manager in my machine when I lock up a process on a Remote Desktop Connection(RDC) or Virtual Machine(VM).

Turns out all you have to do is right click on the Task Bar in the RDC or VM to bring up the Task Manager.

We'll file this in the "Who Knew?" section.

Copy Error Messages to Clipboard

Don't you just love the error messages with just one prompt, OK, as if you are agreeable to it? ArcGIS is full of them. I'm especially fond of "Memory at XXXX08008878XXX cannot be found."

You know them well. But did you know not only can you copy and paste the error message into a picture editing software such as Office Picture Manager, but you can also use Ctrl-C to copy and paste the contents into Notepad, Word, Outlook or a textbox when updating your blog.
Provide your license server administrator with the following information:

Cannot find SERVER hostname in network database
The lookup for the hostname on the SERVER line in the
license file failed. This often happens when NIS or DNS
or the hosts file is incorrect. Workaround: Use IP-Address
(e.g., 123.456.789.123) instead of hostname
Feature: ARC/INFO
Hostname: Ifwis3b
License path: @Ifwis3b
FLEXlm error: -14,7. System Error: 11001 "Win…

URL Rewriting

Recently it came to my attention that google and other major search engines were no longer indexing querystrings. I'm not sure when the switch took place but on a number of sites I maintain the majority of the content is no longer indexed.

Enter URL Rewriting which allows us to convert:


This is extremely commonplace in the Apache world, but how do we accomplish it within IIS?

Today I downloaded Helicon's ISAPI_Rewrite 2.11 Lite. It's free and best of all it works off regular expressions.

Installation and Configuration
1.) Download ISAPI_Rewrite
2.) Install
3.) Open the global httpd.ini file
Start > Programs > Helicon > ISAPI_Rewrite > httpd.ini
4.) Add a rule to process querystrings, in this example we'll loop through the querystring of all files ending in .aspx

# Repath .aspx files
RewriteRule (.*?\.aspx)(\?[^/]*)?/([^/]*)/([^/]*)(.*) $1(?2$2&:\?)$3=$4$5 [NS,I]

This w…


Building on the vein of representing one-to-many relationships I've always been frustrated trying to display child records in tables and datagrids. Examples include showing multiple authors of publications, children in a classroom, and fish species observed in a lake.

Until today the two best methods I had were both hacks.
Method 1
Use Three Queries
1.) Build a crosstab
2.) Concatenate the output of the crosstab
3.) Join the product back to the parent table

- or -

Method 2
Loop through child records programmatically to build a comma-delimited list.

Today I discovered a far more elegant solution using COALESCE within a User Defined Function to build comma-delimited list in Views and Stored Procedures.

For this example we'll be building a comma-delimited list of fish species observed in each water (lakes and streams).

Step 1: Create a new User Defined Function(UDF)
CREATE FUNCTION dbo.udf_GetFishByWater(@WaterID int)

DECLARE @FishList varchar(1000)


ArcGIS One-to-Many Labeling

ArcGIS is just plain lousy at dealing with any relationship that isn't one-to-one.

We all have a slew of hacks just to deal with this limitation. I for one regularly am creating temporary cross-tab queries so I can represent multiple sample results at a collection point, fish surveyed at a cross-section and a host of other relationships.

The classic example for mapping comes from the cadastral community and condominium lots. It's an odd situation where more than one person has title to the same piece of ground. How do you represent this?

I've got a new trick thanks to Mohammed Hoque's article in ArcUser Magazine.

We're going to do a database query inside a label expression, loop through the results and output the entire list to label.

For our example we'll use Outfitting Areas in Idaho and we'll label them with the Outfitters and Guide License Numbers and Outfitter Names.

1.) Open ArcGIS and add your spatial layer with the unique identifier shared with your d…

When ArcIMS Site Restoration Fails

Every once in a great while you'll open ArcIMS Administrator and be confronted with Site Restoration Pending, Would you like to restore?

At least in my experience, it rarely restores. You can click Yes and wait all morning and nothing happens. So what to do?
Shutdown ArcIMS Services in this order: Tasker, Monitor, ApplicationBrowse to C:\Program Files\ArcGIS\ArcIMS\AppServer and delete ArcIMSSite.sezStart ArcIMS Services in reverse order: Application, Monitor, TaskerOpen AdministratorRecreate your services from .axl files

To speed the recreation process it is helpful to name your .axl files the same as the service names in your applications.I'd also recommend storing your ArcIMS site settings in an external configuration file (such as web.config in to better facilitate recovery and configuration/server changes on the fly.


One Idea

At our bi-annual training recently our boss challenged us to come up with one good idea every day.

Of course, this immediately became a joke around the office. By 8:05AM I'd be yelling out, "I've had my idea! I'm going home!"

But it got me thinking.

There is nothing about what I do that is static. Every single day I am challenged to learn a slew of new information just to keep up with the pace of technology. What if I documented those ideas? What would it look like after a month? A year?

oneidía - every day I will post one idea.

Or maybe, more accurately, What I Learned Today.

Most of the content will be based off solutions I find on other's websites and will be cited appropriately, but it may prove an interesting read for those of you interested in GIS, programming, the web and databases.

This is idea 1.