Skip to main content

Posts

Showing posts from April, 2008

Serving up KML in IIS 6

To serve up KML in IIS 6, you have to add a few MIME Types. The easiest way to do this is to apply new MIME Type settings globally by changing the properties on your server's "Web Sites" folder in IIS. Google Earth reads KML and KMZ files. The MIME type for KML files is * application/vnd.google-earth.kml+xml The MIME type for KMZ files is * application/vnd.google-earth.kmz Source: Google KML Tutorial To add a MIME type to a Web site or directory 1. In IIS Manager, right-click the Web site or Web site directory for which you want to add a MIME type, and click Properties. 2. Click the HTTP Headers tab. 3. Click MIME Types. 4. Click New. 5. In the Extension box, type the file name extension. 6. In the MIME type box, type a valid MIME type. If you define a MIME type that has already been defined at a higher level, you are prompted to select the level where the MIME type should reside. To create a MIME type for an undefined MIME type, type an asterisk (*) in the Ext...

Resultant table not allowed to have more than one AutoNumber field

Ever get this error on a create table or insert query? The work around is quite simple. Cast the autonumber as an integer. In query design view change your field definition for one of your autonumbers to read: XID: CInt([ID]) Or in SQL View: CInt([ID]) AS XID (Ran into this error message again this morning and it reminded me I should share the workaround.)

Simple Record-Level Auditing in SQL Server & ArcSDE

I've had simple auditing set up in my databases for years thanks to our old DBA. This is not robust transaction logging, it just answers the questions "Who created this?", "When was this created?", "Who last edited this?" and "When was this last edited?". After witnessing a brand new table audit itself without triggers, I set about to understand the setup. This seemed curious to me, so I thought it might also be curious to you. It turned out to be a two step system which rendered my insert triggers superfluous (at least I think so, tell me if I'm missing something and I need insert triggers after all). Our solution uses a combination of two methods. For inserts we are going to tie our audit fields to User Defined Data Types which inherit Defaults we have specified. For updates we will build a trigger to log the changes. We will use the following fields in our tables to track inserts and updates: AUD_NUser - Creator AUD_NDate - Creati...

Making Copies with a HP DesignJet 5000ps (Queue Management)

At my old job making copies on the plotter was a piece of cake. You went into the Queue, selected the job and number of copies and presto! For some reason, possibly because I hardly make paper maps anymore, learning queue management on the DesignJet 5000ps did not come intuitively. My latest map kept running out of memory on the plotter, so when it finally did print after spooling for three hours, I had the incentive I needed to explore the DesignJet 5000ps menus. I must admit that I have waited five years and wasted the total of several days spooling print jobs. It isn't even complicated. Starting at the Main Menu (use "Top" key to make sure you are at the Main Menu) Press the "ENTER" button (this will select the first option "Printing") Highlight "Queueing & Nesting..." and press "ENTER" Highlight "Queue Management" and press "ENTER" Highlight the job number (These are negative numbers in the order last ...

Recording a Booby Observation for Posterity

CC Licensed photo by Rileypie Building on the database that spurred my Color Considerations , I spent the better part of today debating the best way to log observers in a database. Having documented it to explore the pros and cons with my coworkers, I figured I'd share my musings with y'all as well. What way do you think is best? Is there a better pattern I left out? OUR EXAMPLE On a blue-footed booby capture Nov. 11, 2007 we had four biologists recorded on the capture event: Mike, Roy, Phil and Jay. How do I record this? Let’s review a few options: OPTION 1 Two Integer Fields to an Observer lookup table Observer1ID: “272” (MIKE) Observer2ID: “312” (ROY) NEGATIVE: The rest of the observers disappear in the data abyss. OPTION 2 One Integer Field to an Observer lookup, One Free Text Field Observer1ID: “272” (MIKE) OtherObservers: “ROY, PHIL, JAY” NEGATIVE: Nothing lost, but only able to reliably query on Observer1… Other Observers are listed, but there is no wa...

Color Considerations

I love the odd places my job takes me. Today I am building a database to house all of the "marks" we place on animals we capture. Tags, Collars, Leg Bands, RFID Tags (they're in fish and your passport), Tattoos, Radio Collars, GPS Collars, Backpacks, Wing Tags.... the list is seemingly endless. The fun thing about designing databases is figuring out ahead of time all the exceptions. For the moment at least, I now know more details about tagging animals than many field biologists. So far we have the following attributes: Tag Type Collar, Band, Round, Square Tag Location Right Leg, Left Leg, Right Wing, Left Wing, Neck, Nose, Right Ear, Left Ear Tag Construction Plastic, Metal, Leather, Ink (tattoo) Color Red, Green, Yellow, Black, White Mark R-2345, 562626849057, TIGGER, Y-7892-23 (We'll leave radio frequencies out of our discussion and focus purely on the visual aspects) The challenging part of this is deciding what to leave in, what to leave out. I can probably di...

Auto Format (and Color) Outlook Appointments

A few years ago I got turned on to the idea of indexing your life by color. In a quick glance your mind can comprehend really complex patterns. By coloring entries in my calendar I am able to tell immediately if I am available or if a future appointment conflicts with a work meeting. There are a number of ways to set this up. Outlook allows you to add a label to every appointment. However this is an Outlook specific feature and I sync my calendar across Outlook, Yahoo! and iCalendar. The later two don't even have labels. Besides, calendars should be simple. Complexity only hinders usability, so I prefer an automated solution. How to color appointments in Outlook automatically: In Calendar, right-click the calendar grid, and then click Automatic Formatting on the shortcut menu. Click Add, and then type a name for the rule. In the Label list, click a color. Click Condition to specify the conditions under which the color will be applied. Note: If you manually assign a color to a...