[GRASSLIST:6966] Re: GRASS 6 gdal support for netcdf format
Hamish
hamish_nospam at yahoo.com
Tue May 31 20:38:06 EDT 2005
> Thanks for your help! No, I do not see;
>
> r.in.gdal -f in=foo out=bar | grep -i cdf
> GMT (rw): GMT NetCDF Grid Format
> netCDF (ro): network Common Data Format
>
> when I run 'r.in.gdal -f in=foo out=bar | grep -i cdf
>
> So, your best guess is that a gdal lib is being picked up without
> netcdf support. I'm not sure how this can be since I built all the
> libs. Due to local admin restrictions I had to put the gdal libs (and
> proj libs, etc.) in with the GRASS libs.
I guess gdal didn't actually build with it then.
> How can I be sure that the gdal lib correctly built with netcdf
> support?
gdalinfo --formats
gdal-config --dep-libs
# and look for -lnetcdf
gdal-config --formats
# should be same as gdalinfo
ldd /usr/lib/libgdal.so.1 | grep cdf
libnetcdf.so.3 => /usr/lib/libnetcdf.so.3 (0x40a3a000)
> I do have one question, when building gdal, am I suppose to set the
> flag for GRASS support? I tried that once and got some error, so I
> *maybe* mistakenly thought that I should not do that.
That shouldn't have anything to do with it. GRASS support in GDAL is for
reading GRASS maps outside of GRASS. e.g. from QGIS, Mapserver, etc.
Note GRASS's r.out.gdal needs the GDAL-GRASS driver to work AFAIK.
In the past if you wanted to do this, you used to have to build GDAL
before GRASS without the GRASS driver, and then build GDAL again after
GRASS was made with the GRASS driver enabled.
The latest versions of GDAL builds the GRASS driver as a plugin, and you
can safely build the GRASS driver at any point.
Hamish
More information about the grass-user
mailing list