Welcome to Golden Software Support

How can I filter the fix Z range (min/max) in grd files?

Comments

3 comments

  • Avatar
    Katie Yoder

    Hi Danny,

    You can filter out errant data from a grid file using an IF statement in the Grids | Calculate | Math command.  This will produce similar results to the Z limits feature applied during gridding.  For example, to remove all data greater than 10,000 from a grid file, complete the steps below.

    1. Click Grids | Calculate | Math.
    2. Click Add Grids in the Grid Math dialog.
    3. In the Open Grid(s) dialog, select your grid file and click Open.
    4. In the Enter a function... field, enter IF(A>10000, 10000, A).
    5. Enter a name for the output grid in the Output Grid field and then click OK.

    This will replace all values greater than 10,000 with the value 10,000 in the output grid.

    Thanks!

    Katie

    0
    Comment actions Permalink
  • Avatar
    dannyjentw

    Hi Katie,

    Thanks for your reply~

    That is a good solution, but If I want let the aberrant value to be blank(no data).

    In the statement  IF(A>10000, 10000, A). how to do?

    Thanks for your help!

    Danny

    0
    Comment actions Permalink
  • Avatar
    Katie Yoder

    Hi Danny,

    To assign a null or nodata value to the aberrant data, you will need to replace it with Surfer's nodata value which is 1.70141e+38.  So the grid math equation would be something like IF(A>10000, 1.70141e+38, A).

    Thanks!

    Katie

    0
    Comment actions Permalink

Please sign in to leave a comment.