Hi
I dont use WB mutch but i think it should work, What is your fme build number? some of the tcl stuff is quite new so get the latest build and test it with that Note you have to set the 'Use FEM_Attriubte Array' to NO, if you save you workespace as an mapping file you can open this in a text editor and check that the caller is using @Tcl2() and not @TCL() I my latest mail i wrote that there was a problem when i converted - to +, this has to do with the ordering of the coordinates in the arc they get reversed creating an alfa rather than a omega. The solution to his problem is to test that the firts coordiante in the arc matc the first coordinate in the input 'arc' an if they dont then reverse the coordiantes in the arc before replacing it. Peter >From: "jamiemackinney" <[EMAIL PROTECTED]> >Reply-To: [email protected] >To: [email protected] >Subject: [fme] Re: Arcs & Lions >Date: Mon, 07 Feb 2005 06:12:47 -0000 > > > > >Hi Peter > >Thanks very much for your suggestions - I'm interested in this >solution also. I was looking to set up an FME Workspace that makes >use of the TCL you supplied. I was wondering: > >Is it possible to call your nul2nul.tcl file from the previous >posting into an FMW workspace file, using the TCLCaller? I have >attempted to use the OGCGeometryExtractor, TCLCaller, and >OGCGeometryExtractor in conjunction to achieve this, but I get the >following error: > >@TCL -- failed to evaluate expression `convertArc' -- invalid >command name "FME_GetAttribute" > >Thanks >Jamie > >--- In [email protected], "peter laulund" <[EMAIL PROTECTED]> >wrote: > > Hi Cam > > > > after my last mail i got the idear to put use a regualr expresion >to put the > > arc coordinates back in the ogcGeom and then recreate the geoemtry >with the > > @OGCGeometry() function, this way you don't have to split the >original > > geometry and then recreate it later on > > > > You can do this calling the ConvrtToArc() and Arc() function in >some > > factorys, or why not do it all in tcl > > > > Attatched is a mapping file and a small tcl script doing this - >there is > > still a problem with the negativ y value it is not corret if i set >it to + > > and if there is more than one arc in a line you would have to add >an extra > > loop > > > > NB if you want to se the geometry just convert the output format >to FFS and > > set and file name as the output dataset, now you can look at it in >the > > Viewer. > > > > have fun > > > > Peter Laulund > > National Survey and Cadastre, Denamrk > > > > > > >From: "Cam Botherway" <[EMAIL PROTECTED]> > > >Reply-To: [email protected] > > >To: [email protected] > > >Subject: [fme] Arcs & Lions > > >Date: Tue, 01 Feb 2005 12:33:52 +1100 > > > > > > > > > > > >I have a bit of a curly one; > > > > > >The GIS that I'm using identifies arcs by changing the otherwise- >valid > > >Y-Coordinate (UTM) for the apex to a negative. So a simple horse- >shoe arc > > >with arbitrary coords might have points at (0,0), (2,-4), and >(4,0); Even > > >though the apex is listed as negative, it's actual Y-Coord is >positive (the > > >GIS doesn't explicitly recognise Arcs from Lines, it just comes >across a > > >negative, goes "Oh, it's an arc.. Bend it like Beckham and >pretend the > > >coord > > >is positive, which of course it is.") > > > > > >Now... What I need to do is generate some genuine arcs using >FME. Simple > > >enough process in theory, just run a test on the coordinate, >(Expression > > >Evaluator, Y-Coord < 0), Absolute the value if so, and then >ArcStroker that > > >Apex. > > > > > >My question is, what do I do to identify the negative coordinate >within a > > >line, if that arc is otherwise part of a contiguous line - ie an >arc-line > > >combo like the greek letter Omega. Is it better to chop that >type of line > > >into component true lines, with a seperate arc? And if so, is >there a > > >transformer or function that can help me to ID the negative node, >along > > >with > > >the leading and trailing node that make up the arc. > > > > > >The closest procedure I can think of so far is to assign each >line an ID, > > >chop the line into points, assign each point as it comes a number > > >(counter), > > >ID the negative, use it's counter value, and the nodes with >counter values > > >of the negative, plus and minus 1, to form the arm, then join the >dots for > > >the remaining points which make up the true line either side of >the arc, > > >based on the order of the node ID's I created. Is there a >transformer or > > >function in FME that will give me a kids-book Join the numbered >dots in > > >order-type operation to form a line? > > > > > > > > >Cheers - Cam > > > > > > > > > > > > > > > > > > > > > > > >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 > > > > > > > > > > > > > > > > > > > > > > > > > _________________________________________________________________ > > Find det, du s�ger p� MSN S�g http://search.msn.dk > > > > /* > > >===================================================================== >======= > > > > Navn : Peter Laulund, KMS > > > > Oprettet dato : 2 februar 2005 > > > > Beskrivelse : > > > > >===================================================================== >=======*/ > > > > # > > >===================================================================== >======== > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - > > - - > > FME_DEBUG MAPPING_FILE > > > > READER_TYPE NULL > > READER_KEYWORD INPUT > > INPUT_DATASET nullin > > > > WRITER_TYPE NULL > > WRITER_KEYWORD OUTPUT > > OUTPUT_DATASET nullout > > > > Tcl2 source {$(FME_MF_DIR)nul2nul.tcl} ; > > > > # > > >===================================================================== >======== > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - > > - - > > FACTORY_DEF * >CreationFactory > > \ > > FACTORY_NAME "Create Some >Features" > > \ > > 2D_GEOMETRY 0.01 0.01 1.01 0.01 2.01 -1.01 3.01 0.01 4.01 >0.01 > > \ > > NUMBER_TO_CREATE >1 > > \ > > OUTPUT FEATURE_TYPE >someFeature > > \ > > @SupplyAttributes(ID, >123) > > \ > > @OGCGeometry >(to_attribute,wkt,ogcGeom) > > \ > > @Log("start", 1, 1) > > > > FACTORY_DEF * >TeeFactory > > \ > > FACTORY_NAME "Output >logger" > > \ > > INPUT FEATURE_TYPE >* > > \ > > @Tcl2( >convertArc ) > > \ > > OUTPUT FEATURE_TYPE >* > > \ > > @OGCGeometry >(from_attribute,wkt,newOgc) > > \ > > @Log("efter", 10, 1) > > > > # > > >===================================================================== >======== > > INPUT * > > > > OUTPUT * > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - > > - - > > # > > >===================================================================== >======== > > > > > > > > >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 > > > > > > > _________________________________________________________________ Log p� MSN Messenger direkte p� nettet http://webmessenger.msn.com/ 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/
