Remember to go back to insersect and step at the first intersection and return true

 

SpaBoundsPoint

Nodes in a linked list

Variables

SpaProjectedBounds

Contains and manages the linked list for the bounds points around the bounds of best fit.

Variables

 

SpaProjectorGrid

Finds the projected grid and DesiredBounds.

Variables

 

Functions

 

CheckCell(Status, CellCol,CellRow,FoundInsideResult)

Checks a cell to see if

  1. If CheckCellValid(CellCol,CellRow)==False then the cell cannot be added
  2. Else
    1. Go around the cell to find the first adjacent cell that is INSIDE
      1. Offset arrays are used to go around the cell
    2. Go around the cell from the first inside cell until an OUTSIDE or UNKNOWN cell is found
    3. Count the number of adjacent OUTSIDE or UKNOWN cells until we find an inside cell
    4. At this point:
      1. StartOutsideIndex=Offset array inside to the first OUTSIDE cell after the INSIDE cell
      2. LastInsideSideIndex=Offset array index to the INSIDE cell just before the OUTSIDE cell
      3. NumSidesOutside=Number of sides that have an adjance OUTSIDE cell
    5. Check for the segement between two new points to intersect the existing bounds
    6. Check for the new points inside the existing bounds

SpaProjectorGrids

Contains and manages the SpaProjectorGrid objects for each geographic bounding polygon. Also computes and makes avaialble arrays of X,Y coordinates and a polygon for the bounds.

 

Settings

Move into settings?

Variables

 

Functions

GetGoodProjectedBounds

This is main function to find a good bounding polygon for the current projection settings.

Uses

Modifies

Approach:

  1. Finds the starting cell
  2. Checks the starting cell and three cells to the north and east for not nan
  3. Adds the four starting cells to the bounds:
    1. Create an SpaBoundsPoint object
    2. Insert the SpaBoundsPoint into the ProjectedBounds object
    3. Set the new SpaBoundsPoint into the BoundsPoints array
  4. Update the status of the four starting cells to INSIDE