NavInArea

I often get data request for a certain area. Usualy I would use jview with -navlook to figure out what nav files are in the region of interest, but when there are lot's of files this is a painstaking process. AppendNav can dump out the nav within a mapsheet to ascii lists. However, regions of interest are rarely a nice orthogonal box. NavInArea will take polygons and decides if there is a nav fix that falls within the polygon. To do that it uses a nifty point-in-polygon function I found online.
The polygon file is just a longitude latitude list (so lon's first!). The polygon is made up by the sequential order of the polygon coords. This is pretty important otherwise you'll get weird results.
The logic is very straight forward; it will check each nav fix, and once it has found one it will stop. It is not interested in how many fixes are within the polygon; just one instance will satifies the test. Of course, there should be an option of "min number of fixes in polygon"......

Usage : NavInArea
        -area JHCImagefile ||
        -polygon polygonfile (ascii list lon lat)
        (-skip # )
        navfile(s)
 
Back


Pim, Nov 17, 2011