Metadata Navigator

I’ve been resisting sharing a project here for two reasons. First, it involves metadata. Metadata is absolutely one of the most important and valuable things you can do. Like paying taxes. Second, what I did is such a total and complete hack I’m more than slightly embarrassed by it.

To make a long story short*, we decided we were getting off of ArcIMS’s metadata service. In the ESRI realm, that left us with the Geoportal extension to AGS. Due to cost (under price for the Geoportal extension it gives the dreaded please call your local ESRI sales office for a quote that will leave you crying for the rest of the day) and the sour taste the ArcIMS metadata service left in our mouth, we ruled that out quickly.

We looked at other options. The strongest contender was GeoNetwork Opensource, which is both really nice and which I’ve never been able to get working quite right. I’ve tried different versions over the years and something is always funny. Part of it might be the fact that ESRI likes to stick things like Required: The citation date is a required field in XML elements reserved for dates. Anyways, nothing was quite what we wanted.

When we looked at what we really needed, it boiled down to two things:


  • Search through metadata records by specific elements

  • Show the results in something other than brain-exploding XML


And that was it. We decided if we ever ran into a scenario where we needed WCS Z3950 or the like we’d deal with it then, and editing the metadata via ArcGIS Desktop was preferred by the only person that mattered - the one doing the metadata maintenance.

In 4 - count ‘em, 4 - hours, I put together a site that did just that. I give you that number not to brag, but to lower your expectations/beg for mercy. I spent another hour or two later on adding a RSS feed and some other niceties. But basically all it does is:


  • Search metadata via whatever elements you like, or do a full text search.

  • Shows the latest adds/edits.

  • RSS feed for latest adds/edits.

  • Shows metadata in 3 different styles (summary, FGDC Classic, FGDC FAQ) and raw XML.


You can see it at http://maps.co.mecklenburg.nc.us/metadata. You can grab the source code on the Projects page.

Be ye forewarned: it is a steaming pile of hacks. It’s composed of some JavaScript and some PHP and some dust tape and a whole lot of swearing (whenever I use the word metadata, you can mentally append very important and swearing next to it). It’s doing searches through actual XML files sitting on disk. That alone should get me sent to whatever version of Dante’s easybake you subscribe to. There’s only about 100 lines of JavaScript powering the site itself, and a couple of web services taking requests and shelling out data. The code itself is in the I-got-it-to-work-and-ran-away state.

But darn it, it works. If you’ve got < 500 metadata records, a low traffic metadata site, and no needs beyond what I listed, it works just fine, and I’ve gotten enough inquiries about it to justify tossing it out there, warts and all. If you decide to look at the code though, please just repeat to yourself: Tobin did this in 6 hours, it’s a hack, Tobin did this in 6 hours, it’s a hack, Tobin did this in 6 hours, it’s a hack….

*Short story long: The ArcIMS metadata service has always been a bit of a hack. It’s tricky to get working. It dies a lot. It stores data in its own tables in SDE that don’t really interact with anything else in the ESRI universe. The SDE and ArcIMS versions have to be exactly the same. To upgrade ArcIMS you have to do this funny little import/export command line dance, which without fail you will forget about until after an upgrade. All in all the best thing you can say about ArcIMS’s metadata service is that it occasionally works. One day we decommissioned a test SDE server due to hardware failures, only to realize weeks later it held our ArcIMS metadata, as it was the only SDE server we had at the exact version as the ArcIMS server. Since our new test server is on yet a different SDE version, we had to find an old box, dumping Windows/SQL Server/SDE on it, restoring the database, and mdexport out the data. Since we couldn’t really run this duct-tape SDE server full time, and we didn’t want to have a dedicated SDE server just for this, and we couldn’t upgrade the ArcIMS server for other reasons, we decided it was time to take our ball and go home.