Description Usage Arguments Details Value
Function to grid a dataframe or csv file using GMT 4.5.
1 2 3 4 |
dfr |
- the dataframe to grid |
lat |
- column name containing latitude coordinates |
lon |
- column name containing longitude coordinates |
col |
- column with value to grid |
logtr |
- flag (T/F) to log10-transform z values before gridding |
xyrng |
- GMT range string for grid limits, e.g. 'minLon/maxLon/minLat/maxLat' |
delx |
- grid cell size in x (longitude) |
dely |
- grid cell size in y (latitude) |
blocktype |
- blocking type for values falling inside a grid cell ('SUM' or 'MEAN') |
xyzFile |
- temporary file name for xyz values |
tmpGrid |
- temporary file name for grid values |
cleanup |
- flag (T/F) to remove temporary files |
Input dataframe is processed using GMT 4.5's 'blockmean' function using center coordinates for the output blocks as intermediate locations. These coordinates are then shifted by 0.5*cell width in the x and y directions so that the cell locations correspond to a pixel-registered grid. Converting the result to a grid using GMT 4.5's xyz2grd with pixel registration turned on (using -F) results in the expected behavior.
* note that an intermediate file 'tmp.xyg' is created and deleted during this process
dataframe with the gridded values as column names 'lon','lat', and col.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.