You can probably get away with the NeighbourPairFinder if you split the
points out by row first (so you don't choose a point in an adjacent
row).  You'd have to know the general direction each row was flown in
though to know which bearing (forwards or reverse) to assign to each
point.

As usual, there's also a hard way of doing it if your photos are
numbered sequentially. :)

1. Run a CoordinateFetcher on the photo centres to extract the X and Y

2. Use an EspressionEvaluator to calculate the NextID (CurrentID + 1)

3. Use the Concatenator (RowID + '-' + CurrentID) to create a
CurrentJoin attribute

4. Use the Concatenator (RowID + '-' + NextID) to create a NextJoin
attribute

5. Connect from Step 4 to an AttributePrefixer with a value of "next_"

6. Connect from Step 5 to an AttributeKeeper, keeping just the
next_CurrentJoin and coordinate attributes

7. Create a FeatureMerger (Attributes Only).  Use the output of Step 4
as the Requestor and the output of Step 6 as the Supplier.  Use the
NextJoin attribute as the Requestor key and the next_CurrentJoin as the
Supplier ID.

8. Use an ExpressionEvaluator to get the bearing between the two points.
I unfortunately don't have time right now to work out the trig.  You'll
have to figure out what you want to do with the records at the end of
the rows that don't have a set of next values to join to.  Copying the
bearing from the previous number would probably be an acceptable
solution.

9. Run an AttributeFilter on row number, and run each set through a
StatisticsCalculator.  I'm surprised that the StatisticsCalculator
doesn't have "Group By"/"List Attribute" functionality that would allow
you to do this with an unknown number of rows...

Jason

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of
bluespruce_1421
Sent: Wednesday, July 06, 2005 21:21
To: [email protected]
Subject: [fme] Calculating relative bearings (headings)

I need to be able to calculate the bearing between two points. I need
this for 2 reasons. 
1. rotate aerial imagery parallel with flight path 2. detect changes in
bearing within runs outside QA limits. 

I have photo centres in eastings and northings.  Each photo is ID'd with
a unique photo number and grouped by "runs".


I'm looking at neighborfinder and neighborpairfinder but not sure it 
these are the best tools for the job.

Thanks

RM




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