[gdal-dev] gdal_translate ERROR 1: nc_put_vara_double(IMAGE.grd): NetCDF: Start+count exceeds dimension bound
Sebastian Hoerz
sebastian-hoerz at web.de
Fri Sep 12 07:21:01 PDT 2014
Hello Joaquim,
I thought it is clever to use -of GMT because gmt grdmath is not working
with the GeoTIFF.
grdmath: gdalread: failure to allocate enough memory
grdmath: ERROR reading file with gdalread.
grdmath (GMTAPI_Import_Grid): Could not create file [IMAGE.tif]
[Session gmt (0)]: Error returned from GMT API: GMT_GRID_READ_ERROR (18)
Now I tried:
gdal_translate -of netCDF IMAGE.tif IMAGE.nc
but
Input file size is 46800, 55200
0...10...20...30...40...50Warning 1: Unsupported GDAL datatype (2), treat as NC_FLOAT.
...60...70...80...90...100 - done.
and gmt grdmath can't handle the output file.
Any suggestions?
Thanks for your help!
Sebastian.
Am 12/09/14 15:08, schrieb Joaquim Luis:
> Sebastian,
>
> Any particular reason why you would want to use that so old and
> abandoned format (-of GMT)? Do not confuse it with the netCDF CF that
> GMT uses since GMT 4.0 (released many years ago). Note also that in
> GMT5 you can use the GeoTiff directly, or convert it with grdreformat
> or with gdal_translate but to netCDF (not to 'GMT')
>
> Joaquim
>
>> Hello,
>>
>> I have a problem with the following GeoTIFF:
>>
>> gdalinfo IMAGE.tif
>> Driver: GTiff/GeoTIFF
>> Files: IMAGEDATA/IMAGE.tif
>> Size is 46800, 55200
>> Coordinate System is:
>> PROJCS["WGS 84 / UTM zone 30S",
>> GEOGCS["WGS 84",
>> DATUM["WGS_1984",
>> SPHEROID["WGS 84",6378137,298.257223563,
>> AUTHORITY["EPSG","7030"]],
>> AUTHORITY["EPSG","6326"]],
>> PRIMEM["Greenwich",0],
>> UNIT["degree",0.0174532925199433],
>> AUTHORITY["EPSG","4326"]],
>> PROJECTION["Transverse_Mercator"],
>> PARAMETER["latitude_of_origin",0],
>> PARAMETER["central_meridian",-3],
>> PARAMETER["scale_factor",0.9996],
>> PARAMETER["false_easting",500000],
>> PARAMETER["false_northing",10000000],
>> UNIT["metre",1,
>> AUTHORITY["EPSG","9001"]],
>> AUTHORITY["EPSG","32730"]]
>> Origin = (422999.375000000000000,2201000.625000000000000)
>> Pixel Size = (1.250000000000000,-1.250000000000000)
>> Metadata:
>> AREA_OR_POINT=Point
>> Image Structure Metadata:
>> COMPRESSION=PACKBITS
>> INTERLEAVE=BAND
>> Corner Coordinates:
>> Upper Left ( 422999.375, 2201000.625) ( 5d 2'44.07"W, 70d17' 7.59"S)
>> Lower Left ( 422999.375, 2132000.625) ( 5d 6'33.10"W, 70d54'13.43"S)
>> Upper Right ( 481499.375, 2201000.625) ( 3d29'30.00"W, 70d17'46.95"S)
>> Lower Right ( 481499.375, 2132000.625) ( 3d30'25.10"W, 70d54'54.17"S)
>> Center ( 452249.375, 2166500.625) ( 4d17'17.74"W, 70d36' 6.69"S)
>> Band 1 Block=46800x1 Type=UInt16, ColorInterp=Gray
>>
>> I want to translate it into a GMT grid file using gdal_translate:
>> gdal_translate -of GMT IMAGE.tif IMAGE.grd
>>
>> But this produces an error and the file is not useable afterwards.
>> ERROR 1: nc_put_vara_double(IMAGE.grd): NetCDF: Start+count exceeds
>> dimension bound
>>
>> gdalinfo IMAGE.grd
>> Warning 1: IMAGE.grd is a netCDF file, but not in GMT configuration.
>> gdalinfo failed - unable to open 'IMAGE.grd'.
>>
>> Can anybody explain this and offer a solution?
>>
>> Thanks in advance!
>> Sebastian.
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list