Hi

Below is a tcl function doing the convertion

proc transformGeom {} {

   set N [FME_Coordinates numCoords];
   for {set i 0} {$i < $N} {incr i} {
       set x [ FME_Coordinates getCoord x $i ]
       set y [ FME_Coordinates getCoord y $i ]
       lappend coordLst [ expr x ...... your math here ....  ]
       lappend coordLst [ expr y ...... your math here ....  ]
   }

   FME_Coordinates resetCoords
   foreach {x y} $coorLst {
       FME_Coordinates addCoord $x $y
   }
}

when I look at Marks workespace I dont know what is most complicated, here 
we can do it all with  5 factorys and one tcl function

Note if you use the workepsace approach I would think that you have to deal 
with donuts and aggregates the same way as with my idear

A hybid solution would be to do all the factory stuff in workebench and then 
use a TCLcaller to implement the above function


Peter


>From: "clambert_aamh" <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: [fme] Re: Second Order Conformal Transformation
>Date: Wed, 06 Sep 2006 00:36:36 -0000
>
>Hi Peter
>
>Thank you for your reply and assistance :)
>
>The process you suggest using TCL appears to be the same as the
>workbench approach, in that it requires extracting and translating
>coordinates then rebuilding of features, rather than offering the
>capability to translate via the features wholly.
>
>Since you have mentioned the TCL approach is a little more
>complicated, I think I will stick with workbench :)
>
>Thanks again for your help!
>
>Carly
>
>--- In [email protected], "peter laulund" <[EMAIL PROTECTED]>
>wrote:
> >
> > Hi Carly
> >
> > You can do this with tcl, its bit complicatet but possible
> >
> > before you go into tcl you have to split any aggregates and donuts
>into
> > there parts, so you just have point, line and area - you also have
>to deal
> > with arcs, circels etc. Add an ID befor splitting the geometry,
>this way you
> > can rebuild them after the transformation
> >
> > in tcl you can read the x and y using the FME_Coordinates function
>do the
> > math and then rebuild the geometry again useing the
>FME_Coordinates function
> >
> > after the transformation you can rebuild the original aggregates
>and donuts
> > using the relevant factorys, use the ID from the input to GROUP BY
>in the
> > factorys
> >
> > I am home now, but when i get back at worke I can poste some tcl
>illustraton
> > how you can do this
> >
> > A different approach could be to use the OGC wel known text and
>then write a
> > tcl function extractin the coordinates and rebuilding the sting,
>the tcl
> > part would be more complicated, but this way it could all be don
>in just one
> > function
> >
> >
> > Peter Laulund
> >
> >
> >
> >
> > >From: "clambert_aamh" <[EMAIL PROTECTED]>
> > >Reply-To: [email protected]
> > >To: [email protected]
> > >Subject: [fme] Re: Second Order Conformal Transformation
> > >Date: Tue, 05 Sep 2006 02:47:30 -0000
> > >
> > >Hello Again!
> > >
> > >Further to the below, this is the equation I would like to apply
>to
> > >features within a MicroStation Design file
> > >
> > >X = C + E(X - A) + F(Y - B) + H((Y - B)^2 - (X - A)^2) + 2G(X - A)
> > >(Y - B)
> > >Y = D + E(Y - B) - F(X - A) + G((Y - B)^2 - (X - A)^2) - 2H(X - A)
> > >(Y - B)
> > >Z = Z + I
> > >
> > >Many Thanks
> > >Carly
> > >
> > >--- In [email protected], "clambert_aamh" <c.lambert@> wrote:
> > > >
> > > > Hello :)
> > > >
> > > > Could someone please advise if second order conformal
> > >transformations
> > > > are possible in FME?
> > > >
> > > > I need to transform features to a local grid.  Would it be
> > >possible to
> > > > script this in TCL?
> > > >
> > > > Thank you kindly in advance!
> > > >
> > > > Carly
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >Join us at the FME Worldwide User Conference Sept. 21-22, 2006
>Vancouver BC
> > >Canada. For more information, visit www.safe.com/2006uc.
> > >Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> > _________________________________________________________________
> > Få 250 MB gratis lagerplads på MSN Hotmail:  http://www.hotmail.com
> >
>
>
>
>
>
>
>
>
>
>
>Join us at the FME Worldwide User Conference Sept. 21-22, 2006 Vancouver BC 
>Canada. For more information, visit www.safe.com/2006uc.
>Yahoo! Groups Links
>
>
>
>
>
>

_________________________________________________________________
Få de bedste søgeresultater med MSN Search:  http://search.msn.dk






Join us at the FME Worldwide User Conference Sept. 21-22, 2006 Vancouver BC 
Canada. For more information, visit www.safe.com/2006uc.   
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