Skip to content

Mask grd files by polygon #40

@David-Loibl

Description

@David-Loibl

Create a generic script to mask GMT grid files by a polygon provided in a .gmt or .shp file.
Parameters:

  • Input grd file
  • Polygon file
  • Mask inside / mask outside
  • Output grd file
  • Buffer (optional, default 0)

Use GMT grdmask to create a mask grid. Subsequently, use GMT grdmath with the 'INSIDE' operator to set data points inside/outside the mask area to NaN.
Shapefiles should be feasible input polygon files as well and automatically converted to .gmt files with to GDAL ogr2ogr (cf. routine in module 'Create Summary Report').

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions