Next: Surfer grid maps
Up: Grid map and data
Previous: ER-Mapper maps
  Contents
  Index
GMT
grid maps
GMT grid maps are basically
netcdf
files. Gstat only includes GMT support when it is linked with the netcdf
library. This library is detected automatically by the configure script
(section 5.6), or it is added when configure is invoked as
./configure -with-netcdf
GMT map support was contributed by Konstantin
Malakhanov
who wrote about it:
``And last but not least: I write here all limitations of using GMT
grids with GSTAT :-
- 1.
- GMT grids can be centered at pixels or at nodes. GSTAT grids
are centered at pixels, so node-wise GSTAT grids will be converted
to pixel-centered. GMT grids from GSTAT are always pixel-centered.
Convertation could be made in two ways: either decrease the number
of rows and columns by one and set pixel values to mean (or median,
or what you like at most) value of 4 nodes (this changes values, but
preserves boundaries of grid) or extent grid limits to half cell size
to west/east/north/south and use nodes as centers of new pixels (this
preserves values, but slightly changes the limits of grids). I implemented
the second way, so if you have GMT node-centered grid as mask, then the
extensions of result grid from gstat will be one cell size bigger in X-
and Y-directions!
- 2.
- GMT grids can have multiplication factor and an add offset for
z-values. As GSTAT grid definition does not allow for that, GMT grid
values with factor different from 1.0 and/or value offset different from
0.0 will be accordingly transformed during the loading. (Comment: for
reasons I cannot understand GMT grids have sometimes factor 0.0 which
makes no sense. So factor==0.0 will be treated as 1.0). GSTAT grids in
GMT format always have factor== 1.0 and value offset==0.0.
- 3.
- GMT system allows for rectangular coordinate system or for
geographical projections, but there is no way to detect it from grid
itself (in GMT commands , projection is almost always supplied as one
of arguments by user). So the way GMT grids are treated is defined by
user and not stored in a grid. That means that using GSTAT for grids
which are supposed to have longitude/lattitude coordinates WILL give
results, but these results are useless as spheroid of Earth is not taken
into account and it means by no way that GSTAT can interpolate/simulate
over sphere in geographical projections (if one needs such things, take
a look at Spherekit at http://www.ncgia.ucsb.edu/pubs/spherekit). So I
didn't follow this branch further.
- 4.
- GMT grid definition has fields for names of x-,y-,z-units. These
fields are ignored at reading and will be set to " " in the result grid.
- 5.
- GMT grids can have complex z-values. This is neither checked for
nor used!''
Next: Surfer grid maps
Up: Grid map and data
Previous: ER-Mapper maps
  Contents
  Index
Edzer Pebesma
1999-08-31