By the way, the nice thing about this is that it's extensible to other feature 
definitions in the same file, such as points, polygons and, to a certain 
extent, aggregate features.
 
There's a pretty easy-to-decipher example of various WKT strings here:
http://www.geotools.org/Misc+Geometry+WKT
 
Jason

________________________________

From: Jason Birch
Sent: Fri 2005-07-01 12:21 PM
To: [email protected]
Subject: RE: [fme] create line feature from ascii file


Hi Cindy Lu,
 
Well, since I just signed my municipality up for membership in the Open 
Geospatial Consortium (OGC), I suppose that this is a good time to be promoting 
the use of their standards :)  
 
Basically, you can suck in your line string, split it out into the header 
(:line) and coordinates, place a comma between each vertex definition, build an 
OGC well known text LINESTRING and then run it through an OGCGeometryReplacer.  
It seems to be tolerant of the weird decimal notation your file uses for values 
that have no decimal fractions.
 
I've attached a sample workspace and source text file.
 
Jason
 
P.S. Membership in the OGC is $300USD annually for local governments (more for 
others), gives you access to the documentation and technical committees 
and--most importantly to me--shows support for the adoption of true 
interoperability standards.  These benefit us all by allowing us to choose the 
right tool for the job, not just the right tool for the data.
 
-- 
  Jason Birch
  Information Technology Office, City of Nanaimo
  455 Wallace St., Nanaimo, BC, Canada, V9R 5J6
  Phone: (250) 755-4460 Extension 250
  Fax: (250) 755-4478


________________________________

From: [email protected] on behalf of cindy_xinqiao_lu
Sent: Thu 2005-06-30 11:34 AM
To: [email protected]
Subject: [fme] create line feature from ascii file

Hello,

I am trying to create a line feature from an ascii file. I got all my
x,y,z coordinates from that file (or a coordinates list).

So I think what I need to do is create points for each line using
those coordinates. And then use pointConnector to creat line. But I
do't know how can i create those points because there are different
numbers of points of each line. Can I do loop in mapping file or FME
workbench?

Following is a sample of my csv. I want be able to create 2 lines
from those two records, with line1 has 2 points and line2 has 3
points.
###################
:line -29.910156 27.773438 0. -14.339844 27.773438 0.
:line 13.277344 20.351562 0. 27.910156 25.6875 0. 10.0 10.0 0.
#####################

I appreciate any help from you!

Cindy Lu





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/
 


Reply via email to