Monday, June 20, 2011

Hiding behind #debug

I saw code like this today...

_for a_key,a_pred _over preds.fast_keys_and_elements()
_loop
#debug write(a_key, ": ", a_pred)
_endloop


... clearly the developer had wanted to only have the output write while in #debug mode. That seems like a good idea to me. But what would make the code even more efficient is to put the entire _loop structure behind a #debug tag like this...

#debug _for a_key,a_pred _over preds.fast_keys_and_elements()
#debug _loop
#debug write(a_key, ": ", a_pred)
#debug _endloop


... that way you don't have to worry about the expense of running an iterator at all when not in debug mode.

Thursday, May 19, 2011

How to understand those integrity checker error codes

One of the things I like most about travelling to conferences is seeing the new and innovative applications that are available for Smallworld users. One such innovation that particularly caught my interest was the Data Quality Toolkit by Realworld ECHO. This tool picks up where the core Smallworld integrity checker leaves off and provides a better interface for identifying data quality issues in the database. If you have ever been overwhelmed by the cryptic output of the integrity checker, then you owe it to yourself to review this product.

A few years ago, a PNI customer asked me to review his PNI integrity checker log files and make recommendations about ignore/fix for each error type. It turns out that there was absolutely no documentation available for understanding the error codes. The only way I could understand the codes was to use global text searches or even print_users_of() to find the place where the code was raised and then try to deduce what the actual data condition was. Well, that was good for me as a billable consultant, but not so good for the customer.

If they had had a tool like the Data Quality Toolkit, this problem would not have been as acute. What I find particularly nice about the Data Quality Toolkit is the associated QCDB Knowledge Database. This is essentially an on-line wiki that has been keyed to those cryptic error codes. So now, when your integrity checking process encounters an error code, the Data Quality Toolkit gives you a link to the appropriate web page in the Knowledge Database which provides you with a detailed explanation of causes and fixes for that error type. And because this wiki is a living document, if you ever encounter an error code that has not yet been documented, let Realworld ECHO know and they will update the relevant page. The nice thing about that is future users of the service will now automagikally have access to the same analysis. No need to wait for a TSB to be issued with updated documentation. What we have here is a slick use of online tools to improve the data quality of the entire PNI/LNI/Office community.

Good job folks! Keep up the good work.

Wednesday, May 18, 2011

MrSID files on Smallworld - another approach

While Smallworld SOMs provide a plugin for reading LizardTech's MrSID format files, I wanted to let you all know of another approach. LizardTech has a product called Express Server that lets you take one or more MrSID (or JPEG2000 or ESRI Image Server data) files and place them on a server and then serve them up as a single layer for a WMS-compliant layer. The nice thing about this is that the Express Server does all the georeferencing/tile-stitching for you. So you no longer need to configure a MrSID SOM with things like multiple path names, coordinate system, etc. You can use the GE WMS SOM to simply connect to the Express Server layers and you get all the imagery stitched together. Very cool!

And if you want to try something other than the GE WMS SOM, you could give the Web Maps Connector a try. Have a look at the demo below to see an example of how seamlessly MrSID data is integrated with Smallworld using Express Server.