I'm working on a very similiar problem trying to export a list of coordinates for a number of features encountered within dwg files. However I need to reproject the coordinates from Nad83 to Lat/Long, split the Lat and Long into seperate field attributes, format both to a customized DMS format (Ndd:mm:s.sssss) and (Wddd:mm:s.sssss) and finally output the lat and long values with a number of field values.
I've been able to get most of this accomplished but I am running into problems when I separate out the Lat and Long values for formatting. I've used the listindexer to get the first(long) and second(lat) value in each coordinate pair contained in a list. The problem seems to be that I can only run this for one index value at a time. I can't map the index value to a field that I want to manipulate later. Instead I have to use the listindexer twice, once to get the long values (and formatting them) and then a second time to get the lat values (and format those). When I do this I end up with the Longitude and Latitude values being duplicated in the output csv.carry the list value forward. I can't seem to figure out why? If I do the same thing with the listindexer but do so in parallel the lat and long values aren't duplicated but they come out on different lines. Anyone have any ideas on how to make this work? Spot any obvious logical errors? --- In [email protected], "mark2atsafe" <[EMAIL PROTECTED]> wrote: > > Wow - I'd never heard of the CoordinateConcatenator; you learn > something every day! For my part the things I would try are... > > --- In [email protected], "Thom DeCarlo" <t.r.decarlo@> wrote: > > > > Ok, now that I've got my topology generated, I need to write it out > > in ASCII text format. I can create a CSV output, but that only > > outputs the attributes, not the geometry. I know I can use the > > CoordinateFetcher to grab the coordinates of a specific vertex, but > > how can I grab the coords of an unknown number of vertices? And > > then, how do I get them to the output file? > > If you are happy with a single line of coords then use the > CoordinateConcatenator and just write to CSV. If you want a separate > line per coordinate in the CSV then follow it up with an > AttributeSplitter and then a ListExploder. > > I've never tried the OGCGeometryExtractor, so can't really comment. > > > A related question: I also need to output the list of line id's > > related to each node. But, I can't see any way to connect the > > variable sized list of line id's (_relationships{}.line_id) to the > > output CSV dataset. Is there an easy (or even not-so-easy) way to > > specify the output of a variable sized list? > > Again I would suggest the ListExploder to create a separate feature > for each list entry. For the CSV this is almost exactly what you need. > > If you're having to create separate streams of data to create the > coords and the line ids then you'll probably have to follow up with a > Sorter to get everything into the correct order before writing to CSV. > > > Thanks! > > Thom > > Mark > 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/
