In the build that I'm using of FME, there's something called an 
AttributeFileReader, which will read the contents of a file into an attribute.  
It's a bit of a change in paradigm (there's no source dataset).  You'd have to 
do something before calling this transformer, like a 2DCreator + 
GeometryRemover, so that you have a feature to pipe through it.
 
Jason

________________________________

From: [email protected] on behalf of cindy_xinqiao_lu
Sent: Fri 2005-06-24 1:49 PM
To: [email protected]
Subject: [fme] Re: reading ascii file (multi line for one feature) into FME



Hans,

Thank you very much for your help.

Something come to my mind. If my ascii file is big, having thousands
of features on it, is it safe to read in all the lines and
processing? Is there a way to read in one feature and processing?

Regards,
Cindy
==================================
--- In [email protected], Hans van der Maarel <[EMAIL PROTECTED]> wrote:
> Cindy,
>
> > I am new to FME. I try to read a ascii file to FME and then
transfer
> > to something else (say microstation dgn). But in my ascii file,
one
> > feature maybe splitted to seperate line, like arcgen. The
following
> > is the example of my ascii file:
> > ###########################
> > :name my.txt 0.0,0.0,0.0
> >  org 0.0,0.0,0.0
> > :pline attr level color weight
> >  x0, y0, z0
> >  x1, y1, z1
> > :point attr level color weight x, y, z
> > ##############################
> >
> > Should I use FME workbench or should i work in mapping file?
> >
> > Now I am trying to code in mapping file. But I am not fully
> > understand mapping file. What kind of programming language does
it
> > use?
> >
> > I apprieciate any help from you!
>
> Here's what I did:
>
> - I created a file called input.txt, which holds the sample you
included
> above. Twice actually, so I can show how it handles multiple
features.
> - I changed the feature separation into a single #
> - In the CSV input settings, I specified a character that doesn't
occur
> in the file at all, this way I can guarantee that every line is
stored
> in a single attribute.
> - I added a new attribute with a default value and build a list
based on
> that attribute. (AttributeCreator, ListBuilder)
> - I combine all the elements from this newly created list into a
single
> attribute (ListConcatenator)
> - I split this attribute using # as the separator character
> (AttributeSplitter).
>
> The list "list{}" now holds the original features. Every feature is
> stored in a single list element.
>
> Hope this helps.
> --
> Hans van der Maarel
> Red Geographics
> www.redgeographics.com / [EMAIL PROTECTED]






Get the maximum benefit from your FME, FME Objects, or SpatialDirect via our 
Professional Services team.  Visit www.safe.com/services for details.
Yahoo! Groups Links










Get the maximum benefit from your FME, FME Objects, or SpatialDirect via our 
Professional Services team.  Visit www.safe.com/services for details. 
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/
 

<<winmail.dat>>

Reply via email to