Hi all,
When reading an input data file using the following grdmath input command:
gmt grdmath OSM_lines.gmt -R-180/180/-89/89 -A0/0/4 -I30m LDIST = dist.nc
I get an error message:
ERROR 4: `OSM_lines.gmt’ not recognized as a supported file format.
grdmath (api_import_grid): Not a supported grid format [OSM_lines.gmt]
[Session gmt (0)]: Error returned from GMT API: GMT_GRID_READ_ERROR (18)
[Session gmt (0)]: Error returned from GMT API: GMT_GRID_READ_ERROR (18)
The file was originally a shapefile converted to GMT format using ogr2ogr and looks like this, (note line numbers in first column not part of file):
Trying to read the original shapefile through GDAL using command:
gmt grdmath lines.shp=gd -R-180/180/-89/89 -A10/0/4 -I30m LDIST = dist.nc
also gives error message:
ERROR 4: `lines.shp’ not recognized as a supported file format.
grdmath [ERROR]: Unable to open lines.shp.
grdmath [ERROR]: ERROR reading file (metadata) with gdalread.
grdmath (api_import_grid): Could not open file [lines.shp=gd]
[Session gmt (0)]: Error returned from GMT API: GMT_GRID_READ_ERROR (18)
[Session gmt (0)]: Error returned from GMT API: GMT_GRID_READ_ERROR (18)
From the documentation I cannot see why the ASCII file (.gmt) cannot be recognized by grdmath, but are there any suggestions to other formats I rather should use?
