Hans is right that the AttributeSplitter is one way to go, and is
certainly what it was designed for.

It might not work for you, but I've found that it's possible to use
the CSV reader for some fixed width files when they have a delimiter
that does not appear in any of the fields.

For example, in this text file the fixed length fields are padded with
spaces. So use a space character as the delimiter in the CSV reader,
and tick the option to ignore duplicate delimiters...

road_id vertx x           y
R_1     1     3125519.41  10078088.0  
R_1     2     3125502.25  10078139.0  
R_1     3     3125396.75  10078703.0  
R_1     4     3125276.75  10079558.0  
R_1     5     3125146.75  10080483.0  
R_1     6     3125060.50  10081124.0  

Of course this only works because there is a space between the X and Y
fields, and because there are no space characters in the data. But
assuming you have data that looks something like this, you can use the
CSV reader to very great effect and simplify the process a great deal.

In your case, I'm not sure what is happening because I don't exactly
know what steps you are taking with the data. It appears to me that
you'd have to use 3 substringExtractors set to:

Start  0
End    1

Start  2
End    3

Start  4
End    8

To turn ddmmss.xx into dd and mm and ss.xx (for the X value).

Then use a DecimalDegreesCalculator to turn the individual dd,mm,ss
attributes into a single decimal degrees value.

Then repeat the same process for the Y value.

That's why the AttributeSplitter might be of use, because it turns it
all into attributes using one transformer (not 6 substringExtractors).
Of course you then have to expose the elements in the list to use as
values in the DecimalDegreesCalculator.

Hope this is useful, or at least interesting,

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], "twee0001" <[EMAIL PROTECTED]> wrote:
>
> I'm having a little trouble taking a text file and extracting the 
> values I need from it to create a GeoDatabase.
> 
> The text file I receive is fixed width text file which lists all the 
> attributes and geometry information on each line.  The latitude and 
> longitude values are in the following format:
> 
> ddmmss.xx
> 
> I tried reading the file in as a text file and using the 
> SUBSTRINGEXTRACTOR to parse out the values I need.  My problem arises 
> when I try to extract the Lat/Long values and calculate points.  The 
> first SUBSTRINGEXTRACTOR works, but then it tries to take that single 
> value and calcluate the points with it so the rest of the workbench 
> fails.
> 
> Has anyone tried to extract and create points from a text file like 
> this?  What's the easiest way to do it?
> 
> Thanks in advance,
> st
>




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.

Love FME? Then open your diary to March 6-7, 2008 and write this... "Second 
Worldwide FME User Conference - Must Attend!" See 
http://www.safe.com/company/fmeuc2008/index.php for more details. 
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