Skip to content

4. Sub Function Descriptions: localTransformEquiGrid

Jenna Brown edited this page Jul 1, 2020 · 2 revisions
  • localTransformEquiGrid

    • Description:

    This function tranforms between Local World Coordinates and Geo Coordinates for equidistant grids. However, we cannot just rotate our local grid. The resolution would no longer be constant. So we find the input limits, rotate them in to output coordinates, and then make an equidistant grid. Local refers to the rotated coordinate system where X is positive offshore and y is oriented alongshore. The function can go from Local to Geo and in reverse. Note, this only performs horizontal rotations/transformations. Function assumes transformed grid will have same square resolution as input grid. More information on Coordinate Systems is in Section 5.

    • Input:

    Variable Size Description
    localAngle [1x1] The localAngle should be the relative angle between the new (local) X axis and old (Geo) X axis, positive counter- clockwise from the old (Geo) X. Units are degrees.
    localOrigin [1x2] Location of Local (0,0) in Geo Coordinates. Typically first entry is E and second is N coordinate.
    Xin [NxM] Local (X) or Geo (E) Grid depending on transformation direction. Should be equidistant in both directions and a valid meshgrid. N is number of points in Y Direction, M is number of points in X direction
    Yin [NxM] Local (Y) or Geo (N) Grid depending on transformation direction. Should be equidistant in both directions and a valid meshgrid. N is number of points in Y Direction, M is number of points in X direction
    directionFlag [1x1] directionFlag = 1 or zero to indicate whether you are going from Geo ->Local (1) OR Local--> Geo (0)
    • Output:

    Variable Size Description
    Xin Variable, similar to [NxM] Local (X) or Geo (E) Grid depending on transformation direction. Should be equidistant in both directions and a valid meshgrid. N is number of points in Y Direction, M is number of points in X direction
    Yin Variable, similar to [NxM] Local (Y) or Geo (N) Grid depending on transformation direction. Should be equidistant in both directions and a valid meshgrid. N is number of points in Y Direction, M is number of points in X direction
    • Required Core Sub-Functions:

      • localTransformPoints
Clone this wiki locally