Hi Simon,
In answer to your questions...

--- In [email protected], "jusiheap" <[EMAIL PROTECTED]> wrote:
>
> 1. When FME runs a translation, does it execute each transformation 
> sequentially within the workspace such that one transformation is 
> completed before the next is started? If so, what is the order and 
> do I have any control over it (unless it's simply a case of left-
> >right, top->bottom of the workspace canvas)?

No. What happens is that a single feature is read and then processed
as far as possible in the workspace. Then the next feature is read and
processed, then the next etc etc

I say as far as possible, because some transformers cannot process one
feature at a time. We call these group-based transformers. The
overlayer transformers are good examples (you can't overlay a single
feature by itself). 

Knowing this makes it possible to do cute tricks by placing
group-based transformers deliberately to hold up processing. This
fmepedia faq gives more info and an example workspace...
http://tinyurl.com/okwm7

Additionally, it is possible to change the order in which source
datasets are read. http://tinyurl.com/mb2mg explains how and why.

You can also change the writing order - less important for you I
guess, but here's how... http://tinyurl.com/lb8ej

> 2. If there is such a thing as guaranteed order, presumably it's 
> possible to use the output from an earlier transformation as (part 
> of) the input to another transformation? 

Yes, you can have multiple processing streams and bring them together
at a later part of the translation. It's just a case of getting your
head around the concept of being able to route the same data through
different streams.

As I think you've realized, once features are read, they generally
stay in that order throughout the workspace; that's quite important
for some formats such as DGN, and some transformers work better when
you can assume features are processed in this order. You can change
the order using a Sorter, and of course merging/splitting streams of
data may cause a change of order.

> Let me explain what I'm after:
> 
> Translating from GML to Oracle, I'm translating the RoadNode 
> features into a NODES table and the RoadLink features into a LINKS 
> table. Each RoadLink feature is delimited by two RoadNode features; 
> thus each RoadLink has two attributes to hold the ids of its 
> endpoint nodes. I'm filtering the transformation of the RoadLink 
> features to only allow through those of type "motorway". I would 
> like to filter the RoadNode features similarly, i.e. only allow 
> through those nodes which happen to be endpoints for motorway links. 
> Such a filter will need to straddle the RoadNode & RoadLink 
> information. In SQL terms, I need to use some kind of JOIN, but I 
> don't know whether this can be done based upon the source 
> features/data only or whether I have to use the (filtered) contents 
> of my LINKS table - in which case I have to guarantee the LINKS 
> table is fully populated before I apply such a join.

OK - theory over. Now for the practice. Jason is correct that a
FeatureMerger is the way to go, and it's an example of splitting data
into streams. Place a FeatureMerger as described by Jason; however you
can also keep the existing link between the nodes and their output. In
other words you are creating a copy of the nodes which is used in the
FeatureMerger and then dropped.

Give this I think the order of features shouldn't matter too much
here. The FeatureMerger will wait for the features to arrive (it is
obviously group-based) and won't continue until it is sure all
features have been processed.

> Cheers
> Simon

Hope this helps,
Regards,

Mark

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






Join us at the FME Worldwide User Conference Sept. 21-22, 2006 Vancouver BC 
Canada. For more information, visit www.safe.com/2006uc.   
Yahoo! Groups Links

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

<*> 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