Thanks Mark, that's done the trick. Also managed to include a total 
count of each feature type in the header, using the 
StatisticsCounter.

Simon

--- In [email protected], "mark2atsafe" <[EMAIL PROTECTED]> wrote:
>
> Hi Simon,
> Yes it's just a case of duplicating the first point in the feature 
and
> sorting everything to get it into the correct order.
> 
> The CSV Reader 2 workspace on fmepedia is a good example of this
> concept - see how a Counter gives a unique ID. In your workspace 
I'd
> start the count at 1. Then add a Tester to grab the first point 
from
> each line (count = 1). Where count=1 (PASS) use an AttributeSetter 
to
> set the text line and to set count=0. Then route both the Tester
> PASSED and FAILED ports and AttributeSetter output into a Sorter. 
Yes,
> include the PASS port else you'll be missing the first point. Sort 
by
> count. So Count=0 (the header) now comes first.
> 
> In this case you would probably also want to sort by feature ID - 
make
> sure the feature ID sort is BEFORE the point ID sort in the Sorter 
list.
> 
> There you are and Bob's your uncle.
> 
> Oh - See http://www.fmepedia.com/index.php/CSV_Reader_Workspace_2 
for
> the example I'm talking about.
> 
> Hope this helps
> 
> 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
> 
> --- In [email protected], "jusiheap" <jusiheap@> wrote:
> >
> > Hi all
> > 
> > I'm translating from GML file(s) to a text file. Nothing flash, 
just 
> > converting each feature into an id plus a list of coordinate 
pairs - 
> > one entry per line in the destination text file, the whole file 
> > sorted by feature type.
> > 
> > However, now I'd like the translation to insert additional lines 
of 
> > text. That is, before the start of each block of feature type 
> > entries I'd like a header, indicating the feature type itself. 
> > Something like:
> > 
> > Feature Type: RoadLink
> > ... several lines of RoadLink features ...
> > Feature Type: RoadNode
> > ... several lines of RoadNode features ...
> > etc
> > 
> > Any suggestions?
> > 
> > Thanks
> > Simon
> >
>









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