Hi Keith,
In theory it's possible, but I just don't think it's going to work here. 

Firstly I'm not altogether certain the AreaGeneralizer will help much.
It's not really a tool for finding overlaps, but more importantly
there's no feedback from it. eg the AreaOnAreaOverlayer returns an
attribute called _overlaps, so you can keep going until _overlaps = 0.
The AreaGeneralizer has no such attribute, so I don't know what you
will test against.

Secondly the loop process in a custom transformer only usually works
on a feature by feature basis. There's no way to do group-based
processing, therefore there's no way to check for overlaps (which by
definition needs a group of at least two features).

I hope this information is helpful - even if it's just saving you time
going down dead-ends. 

As for alternatives, well usually we do this sort of thing within a
transformer rather than require the user to do looping. 

I can think of a couple of ideas. It depends on how you want the
boundary to be resolved. I think the best solution is this...

I assume your features have an ID number (if not use the Counter to
create one). Use an AreaOnAreaOverlayer with a list attribute set,
followed by a Tester (test _overlaps>0). On the passed output use a
ListIndexer (index=0) to grab the ID of the first overlap. Then route
everything into a Dissolver with a group by of ID. That will remove
all your overlaps - the only issue being is it acceptable to merge the
overlap into one polygon or the other on a virtually random basis?

If you're really set on doing a loop process then something I have
tried before is setting up a workspace to do one iteration of the
process, set the output to over-write the input, and run the workspace
a number of times. It works for Shape, but not many other formats will
let you overwrite the input. It was effective, but not pretty and
there's no feedback to tell you when to stop. 

Anyway, I'll stop now before this email gets way too long....

Regards,

Mark

Mark Ireland, Senior Product Specialist
Safe Software Inc. Surrey, BC, CANADA
support@ http://www.safe.com
Solutions for Spatial Data Translation, Distribution and Access

--- In [email protected], "Campbell, Keith A" <[EMAIL PROTECTED]>
wrote:
>
> Is it possible to test whether the output from a transformer contains
> any features, and if it does, route these back through the transformer
> in a loop until none remain? I am using the AreaGeneralizer on a dataset
> which mainly contains topologically correct polygons. However there are
> some overlapping polygons which I would like to run back through the
> AreaGeneralizer until none remain.
> 
> Any helpful suggestions much appreciated.
> 
> Keith
> 
> 
> This email and any attached files are confidential and copyright
protected. If you are not the addressee, any dissemination of this
communication is strictly prohibited. Unless otherwise expressly
agreed in writing, nothing stated in this communication shall be
legally binding.
> 
> The ultimate parent company of the Atkins Group is WS Atkins plc. 
Registered in England No. 1885586.  Registered Office Woodcote Grove,
Ashley Road, Epsom, Surrey KT18 5BW.
> 
> Consider the environment. Please don't print this e-mail unless you
really need to.
>




For insights into what's up at Safe Software and what's on the development 
horizon, visit Safe's blog at spatial-etl.blogspot.com.

Safe Software has also made slides available that outline enhancements planned 
for FME 2007. The slides are from the "Road Ahead" presentation given on Day 2 
of the FME Worldwide Users Conference. To view these slides, visit 
www.safe.com/2006uc.

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/fme/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/fme/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to