使用GDAL读取necdf数据

感觉用GDAL读nc的资料好少

1.首先gdal在编译时要在nmake.out中打上nc的驱动

# Uncomment the following to enable NetCDF format.
NETCDF_PLUGIN = NO
NETCDF_SETTING=yes
NETCDF_LIB=C:\netcdf\lib\netcdf.lib
NETCDF_INC_DIR=C:\netcdf\include

# Uncomment the following to add NC4 and HDF4 support
NETCDF_HAS_NC4 = yes
NETCDF_HAS_HDF4 = yes

2.读nc数据4.0nc库还要连接上hdf。。的dll

All Windows DLL users must also have the HDF5, zlib, and szlib DLLs.(摘自netcdf官网)

3.dll放在工程有exe文件夹,在link里面加上gdal_i.lib netcdf.lib

4.用读hdf的方法来读nc吧

其实nc相当于记事本,hdf相当于word。

开始读吧!

链接几个很有用的网址:

1:http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#whatisit

2.李总博客:http://blog.csdn.net/column/details/gdal.html(资料相当丰富及helpful)


转载自:https://blog.csdn.net/bluels01/article/details/8091260

You may also like...