Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  Libraries  >  Motley  >  MGH_SUBSET2

MGH_SUBSET2

MGH_SUBSET2

Name


  MGH_SUBSET2

Purpose


  Given a polygonal region (defined by a list of vertices in X & Y) and
  a curvilinear grid (defined by 2-D position arrays X & Y), this
  function returns the range of indices for the grid lines that intersect
  the region

Calling Sequence


  result = mgh_subset2(x, y, xp, yp)
  result = mgh_subset2(x, y, xyp)

Positional Parameters


  x, y (input, numeric 2-D array
    X, Y position(s) defining the polygon. Interpretation
    depends on the setting of the RECTANGLE keyword.
  xp, yp (input, numeric vector)
  xyp (input, numeric array)
    The polygon vertices as 2 separate vectors (xp, yp) OR a single
    [2,n] array. Note that polygon vectors for the perimeter of
    a rectangular region can be constructed with the MGH_PERIM function.

Keyword Parameters


  EMPTY (output, logical scalar)
    Set this keyword to a named variable to return a logical value
    indicating whether the range is empty. If the EMPTY parameter
    is not present, and the range is actually empty, then an error
    message is issued.
  HALO (input, scalar integer)
    Set this keyword to specify the number of extra rows and columns (if
    available) to be included in the output range.

Return Value


  The function returns a 4-element integer vector representing the range
  of indices in the 1st dimension then the second dimension.
###########################################################################
  Copyright (c) 2013 NIWA:
  http://www.niwa.co.nz/
  Licensed under the MIT open source license:
  http://www.opensource.org/licenses/mit-license.php
###########################################################################

Modification History


  Mark Hadfield, 2009-09:
    Written.



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us