Thursday, March 3, 2011

converting number units in Magik

I was looking at some 3rd party custom code today and noticed what seemed like really helpful methods...
simple_number_mixin.cm_per_foot
simple_number_mixin.cm_to_feet

I think the 3rd party product developers thought this would be a very convenient method. It definitely is, but the problem is that other product developers working on other components made use of these methods. When the 3rd party product was removed, the other custom components broke. The 3rd party product developers rightly declared these methods as RESTRICTED, so the custom product developers should not have called these methods... but we all know that method classifications are widely ignored.

So, how can you make use core Magik classes to do exactly the same thing? Make use of the class unit_value.

Where the custom code might look like...

53.5.cm_to_feet

... you can do exactly the same thing with supported core functionality...

unit_value.new(53.5,:cm).value_in(:feet)


In the same way that each Magik reference to coordinate should really have a corresponding coordinate_system (another pet peeve of mine), most numbers in Magik should ideally be represented as unit_value objects in order to avoid these customized unit conversion methods.

Wednesday, March 2, 2011

This is not your parents' SIAS client

With the advent of GSS a lot of new client possibilities open up for viewing Smallworld data. This video by GEIS shows their Flash-based client that provides some nice intuitive and interactive functionality. Good job guys!

Tuesday, March 1, 2011

Smallworld + ESRI = GIS Love

Someone pointed out to me recently that ESRI provides some really cool web services that you can host as a data appliance behind your firewall. And with existing WMS SOM functionality or other tile-based Smallworld client code, you can easily expose those ESRI data layers as layers in Smallworld. With a data appliance approach you can host it all in-house. If you decide you don't want to host the server in-house you can probably also arrange to use ESRI's cloud-based web services.

Stop reading here if you don't want to see a commercial appeal. (I don't use Google AdWords on my blog so I have created my own ads :) )

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.


iFactor Consulting (my employer) has a really cool product called Web Maps Connector. It was originally built to integrate Bing Maps services into Smallworld. But now it can do so much more... from Commercial map service providers, satellite imagery providers, air-photo suppliers, country-specific map providers, open source data, 3rd party data built on open source data and WMS read capabilities, there is something for everyone. Oh, and now it can also integrate ESRI web services into Smallworld. Request more information at info@ifactorconsulting.com