I recently installed GMT with homebrew on a new mac, and am getting this error:
% gmt grdcut @earth_day_30m -R-1.5/0/44.5/45.5 -Gdaytime.grd
grdcut [NOTICE]: Remote data courtesy of GMT data server oceania
[http://oceania.generic-mapping-tools.org]
grdcut [NOTICE]: Blue Marble Earth Day View at 30x30 arc minutes reduced by
Gaussian Cartesian r/g/b filtering (157.3 km fullwidth) [NASA].
grdcut [NOTICE]: -> Download grid file [263K]: earth_day_30m_p.tif
grdcut [ERROR]: Unsupported image format. Supported formats are:
BMP,GIF,JPG,PNG & TIF
grdcut [ERROR]: Alternatively, append :<driver> for a valid GDAL driver
grdcut (gmtapi_export_image): Unknown Error [daytime.grd]
[Session gmt (0)]: Error returned from GMT API: GMT_IMAGE_WRITE_ERROR (23)
[Session gmt (0)]: Error returned from GMT API: GMT_IMAGE_WRITE_ERROR (23)
[Session gmt (0)]: Error returned from GMT API: GMT_IMAGE_WRITE_ERROR (23)
It seems it cannot recognize .tif files? I tried uninstalling / reinstalling gdal via homebrew with “–build-from-source” but this did not help. Is there something else I’m missing?
Considering what the data represents, that makes sense! I wish the error was more informative (it should specify that the output image is the issue, not the input), but not sure if that’s possible. It had me thinking my gdal installation was broken.
I am actually interested too, but my experience developing code in C is limited to put it mildly (a couple of private Arduino projects, mostly modifying other people’s code). Seeing source codes on github, I never really used git either (well once around 10 years ago). Was not sure this project (gmt) is the best (first of all for the project) occasion to start learning by doing. Is there a lot of skills required to start work with gmt source code?
Anyway, the fix for this one (I guess) is to catch it right at the start and don’t let it go without a non selected driver. First case error because extension was wrong. Second case quite likely slipped the invalid extension test (because it was no extension), which lead to the … boom.