Friday, July 9, 2010

FME Import Zoom to Smallworld Map

In the SWAF version of the Smallworld-FME plugin, it would be nice to have the current Smallworld map "goto" the bounds after the FME import has completed. This comes in handy when you want to easily find your just-imported data for subsequent review.

Apparently this functionality used to exist in the pre-SWAF version of the FME plugin.

I have uploaded a sample of some tweaks you can make that will enable this functionality at Smallworld version 4.x (SWAF).

The basic steps are:
  1. in fme_tics_client.private_run(), determine if there are any smallworld_product.applications that might be interested in knowing where the FME-imported geometry bounding box is
  2. if there are any such applications, then create a dynamic variable geometry_set that fme_tics_client.int!received_feature() can add newly-created geometries to
  3. back in fme_tics_client.private_run(), send a :goto_request databus message to all the relevant applications with the geometry_set populated in fme_tics_client.int!received_feature()

Have a look at this file (fme_goto_import_geometry_set.magik) to see the details of how it is done.

Thursday, July 8, 2010

WMC Webinar Next Week

http://bit.ly/bu9Iwv

iFactor Consulting (my employer) is putting on a webinar next week featuring the Web Maps Connector. There's some pretty cool stuff in there in terms of integrating Smallworld with outside data sources (landbase, weather, satellite imagery, street routing, geocoding, reverse geocoding). If you are interested, please click here for more information.

Thursday, July 1, 2010

FME SmartCleaner makes things easy

I recently had a customer requirement to:
  1. read Lot lines and lot labels as two separate layers from a single DWG file
  2. where possible, stitch the lot lines together to make a polygon
  3. where possible, figure out which lot label is inside each of the newly generated polygons and aggregate those two geometries into one RWO in Smallworld

It turns out that step#3 can easily be done with PointOnAreaOverlayer and Aggregator.

But step#2 didn't seem that easy. I had tried Intersector, TopologyBuilder and Snapper but I never seemed to be able to get the over/under shoots to snap. Then I remembered to check http://fmepedia.com and discovered that there is a custom transformer that does exactly what I needed. It is called the SmartCleaner and is described here.

You can choose to either link or embed this Custom Transformer. I chose to embed it into my existing workspace. This made it transportable across user machines without having to ensure that each user explicitly installed the custom transformer.

When I looked at the internal workings of the SmartCleaner, I realized why my efforts to use Intersector and Snapper were inadequate. The following screen snapshot shows the complexity of the SmartCleaner.




All I can say is a hearty "thank you" to Dave Campanas at Safe Software for creating this Custom Transformer and making this over/under shoot snapping so easy to implement.