[Gdal-dev] Generating a geotiff from netcdf with gdal_translate
Rich Signell
rsignell at usgs.gov
Tue Nov 15 16:24:25 EST 2005
Dan,
Converting GMT grid to Geotif works fine for me, even with GDAL 1.2.6
-Rich
[rsignell at ricsigdtlx nonc]$ gdal_translate --version
GDAL 1.2.6.0, released 2005/03/13
[rsignell at ricsigdtlx nonc]$ gdal_translate -a_srs 'EPSG:4326'
gom15.grd samp.tif
Input file size is 2041, 1561
0...10...20...30...40...50...60...70...80...90...100 - done.
[rsignell at ricsigdtlx nonc]$ grdinfo gom15.grd
gom15.grd: Title: surface
gom15.grd: Command: surface gom15.xyz -R/-71.5/-63/39.5/46/
-Ggom.grd -C0.1 -A0.73 -I0.25m -T0.35 -V
gom15.grd: Remark:
gom15.grd: Normal node registration used
gom15.grd: grdfile format # 0
gom15.grd: x_min: -71.5 x_max: -63 x_inc: 0.00416667 units:
user_x_unit nx: 2041
gom15.grd: y_min: 39.5 y_max: 46 y_inc: 0.00416667 units:
user_y_unit ny: 1561
gom15.grd: z_min: -5194.7 z_max: 1872.88 units: user_z_unit
gom15.grd: scale_factor: 1 add_offset: 0
[rsignell at ricsigdtlx nonc]$ gdalinfo samp.tif
Driver: GTiff/GeoTIFF
Size is 2041, 1561
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.2572235629972,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (-71.500000,46.000000)
Pixel Size = (0.00416463,-0.00416400)
Metadata:
AREA_OR_POINT=Area
Corner Coordinates:
Upper Left ( -71.5000000, 46.0000000) ( 71d30'0.00"W, 46d 0'0.00"N)
Lower Left ( -71.5000000, 39.5000000) ( 71d30'0.00"W, 39d30'0.00"N)
Upper Right ( -63.0000000, 46.0000000) ( 63d 0'0.00"W, 46d 0'0.00"N)
Lower Right ( -63.0000000, 39.5000000) ( 63d 0'0.00"W, 39d30'0.00"N)
Center ( -67.2500000, 42.7500000) ( 67d15'0.00"W, 42d45'0.00"N)
Band 1 Block=2041x1 Type=Float32, ColorInterp=Gray
ricardd at mathstat.dal.ca wrote:
> Hello gdal-dev,
> I'm very new to gdal so please cope with my ignorance.
>
> I have a netcdf file of bathymetry that I use in GMT. I'd like to generate
> a geotiff version of the same data. There was an earlier posting on this
> list that suggested that gdal_translate can do this. However, I keep
> getting a segmentation fault when I invoke the command:
>
>
>>gdal_translate -a_srs 'EPSG:4326' bathymetry.grd outfile.tif
>
>
> Could the gurus point out what's wrong with the above? Am I missing some
> configuration to get gdal and netcdf to talk to each other?
>
> I'm running GDAL 1.2.6.0 and netcdf 3.5.0-7.1 on Ubuntu breezy.
> Cheers,
>
> Dan
>
>
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
--
Richard P. Signell
U.S. Geological Survey Phone: (508) 457-2229
384 Woods Hole Road Fax: (508) 457-2310
Woods Hole, MA 02543-1598
More information about the Gdal-dev
mailing list