Hi Michael,
I think that part is more of a challenge, but still 'do-able'!

The first approach I'd take is to calculate the bearing (or azimuth)
of each part of line and compare it to the new version. Where there is
a difference the line could be reversed. So the basic flow would be...

Calculate azimuths
Attach azimuth from new to old (lineOnLineOverlayer)
Compare azimuths (Tester)
Reverse failures (Orienter)

To calculate azimuths there is a custom transformer on fmepedia that
you may find useful. See...
http://www.fmepedia.com/index.php/Example_Custom_Transformers#AzimuthCalculator

As I said, that would be my first approach. If that doesn't work then
I'm sure folks on the group would have other suggestions.

Mark

--- In [email protected], Michael Habarta <[EMAIL PROTECTED]> wrote:
>
> Hallo Mark
> 
> Thanks for the advice.
> 
> What I have now is WATERLINES (joined by LineJoiner) and their
> coordinates sorted according to the "start point" condition.
> 
> Last problem to solve now:
> Wherever necessary reverse the original (unjoined) WATERLINES,
> i.e. whenever their coordinate-sequence runs against the defined
> direction. I need to keep the original WATERLINE parts, but reverse
> their direction if necessary.
> 
> Remark: I need to keep the original parts, as they may carry attributes
> I don't know in advance (and therefore cannot use in GROUP BY of
> Linejoiner), and which may differ for the parts.
> 
> So my problem is how to find the original WATERLINE parts which run
> against the direction of the joined WATERLINES.
> 
> Michael
> 
> 
> 
> 
> mark2atsafe wrote:
> > Hi Michael,
> > I'm not sure I understand what you are trying to do to the WATERLINE
> > features, or why the Orientor would be of use. Do you need to join all
> >  the lines together? If so, the LineJoiner transformer would be of use
> > I think.
> > 
> > The LineJoiner has a group-by option, so you can create lines only
> > where the ID is the same, plus a 'preserve orientation' option to
> > allow FME to reverse lines to make longer strings.
> > 
> > At that point you could extract the first coordinates and test it
> > against the matching point feature: if they are different then use the
> > Orientor to reverse the line direction.
> > 
> > I hope this will be of some use,
> > Regards,
> > 
> > Mark
> > 
> > Mark Ireland, Product Support Engineer
> > Safe Software Inc. Surrey, BC, CANADA
> > [EMAIL PROTECTED] http://www.safe.com
> > Solutions for Spatial Data Translation, Distribution and Access
> > 
> > --- In [email protected], Michael Habarta <mhabarta@> wrote:
> >> Hallo FMEers
> >>
> >> I have the following problem to solve:
> >>
> >> Input dataset 1: point type features POINTS
> >> Input dataset 2: line type features  WATERLINES
> >>
> >> The lines carry an ID and are - by this ID - also
> >> related to the POINTS (several WATERLINES may be related
> >> to one POINT feature).
> >>
> >>
> >> If a POINT feature is at the beginning/end of a WATERLINE
> >> (or better to say the sequence of WATERLINES related via the ID)
> >> this POINT defines the startposition of the waterline and
> >> the coordinates shall be sorted so that they begin at the
> >> POINT and run through till the end (even if more than one feature
> >> is affected/part of this construction)
> >>
> >> I solved the first problem, which is to find the WATERLINES that
> >> have to be sorted. I used SpatialRelator for that.
> >>
> >> I have no clue on how to sort the coordinates ...
> >>
> >> I thought it should be something like
> >>
> >> Orientor:
> >>    GROUP BY: ID
> >>    Startpos: ....
> >>
> >> but Orientor for lines only knows REVERSE as option.
> >>
> >> any ideas ...
> >>
> >>
> >> Thanks Michael
> >>
> >>
> >>
> >>
> >> -- 
> >>       //   \\   Michael Habarta: Munich/Bavaria/Germany
> >>      //     \\    Mail office: <mailto:michael.habarta@>
> >>     //=======\\     Mail priv: <mailto:mhabarta@>
> >>    // \/|   | \\     Homepage: <http://people.freenet.de/mhabarta>
> >>   //    |   |  \\       Motto: Romans 8:28
> >>
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 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
> > 
> > 
> > 
> >  
> > 
> > 
> > 
> > 
> > 
> 
> -- 
>       //   \\   Michael Habarta: Munich/Bavaria/Germany
>      //     \\    Mail office: <mailto:[EMAIL PROTECTED]>
>     //=======\\     Mail priv: <mailto:[EMAIL PROTECTED]>
>    // \/|   | \\     Homepage: <http://people.freenet.de/mhabarta>
>   //    |   |  \\       Motto: Romans 8:28
>







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