This project is read-only.

netCDF using gdal plugin extension

Dec 24, 2010 at 8:48 AM

I am trying to figure out if nc files are supported.

I am currently successfully loading files using the gdal extension. I saw that netCDF.dll exists so i am qurious why .nc files are not supported.

Dec 24, 2010 at 9:02 AM

i also noticed that 


was missing from \DotSpatial.Data.Rasters.GdalExtension\GdalRasterProvider.cs

from function DialogReadFilter so i changed it to 

get { return "GDAL Rasters|*.asc;*.adf;*.bil;*.gen;*.thf;*.blx;*.xlb;*.bt;*.dt0;*.dt1;*.dt2;*.tif;*.dem;*.ter;*.mem;*.img;*.nc"; }

but not from  DialogWriteFilter

get { return "AAIGrid|*.asc;*.adf|DTED|*.dt0;*.dt1;*.dt2|GTiff|*.tif;*.tiff|TERRAGEN|*.ter|GenBin|*.bil|netCDF|*.nc|Imagine|*.img|GFF|*.gff|Terragen|*.ter"; }


Is this happening for a reason ?


Dec 24, 2010 at 9:18 AM

after these changes some netcdf files can be loaded but not these as it throws an unknown exception

Can anyone else check what's wrong with these nc files ?


Jan 3, 2011 at 10:55 PM

this seems to be an issue with gdal actually

for more info here:

Jan 5, 2011 at 4:14 AM
Edited Jan 5, 2011 at 4:15 AM

FYI We recently stopped using FWTools and now use GDAL directly. As DotSpatial is in beta and evolving at a rapid pace in general we would need to know:

  1. Are you using the download or repository DotSpatial?
  2. What repo version or download date is it?

If/when the GDAL team fixes the problem let us know and we can update the GDALDataExtension dependencies though we would be more likely to wait for the next stable GDAL release before updating.

If you can't wait you could build from source after updating the GDALDataExtension with the latest GDAL dependencies yourself.

Jan 5, 2011 at 8:58 AM
Edited Jan 5, 2011 at 9:01 AM

Hi tidyup


1. i wanted to use the repository but it does not play with tortoise-svn (which i am familiar with). 

2. So i I downloaded and i am using version 79b2fda8dc54  ...  FWTools is a tool i have installed separately for my own use, so i can check the one thing or the other, so I am not using it along with dotspatial.

I believe i can update the gdal libraries if it is required.


Thanks a lot for all the support ,


Jan 5, 2011 at 9:14 AM
DotSpatial actually used to depend on FWTools for GDAL support until recently so if your using an older DotSpatial version it may depend on FWTools. If so it may behave differently to the more current DotSpatial version under development but in general if GDAL has problems with your file format then anything dependent on GDAL (like FWTools and DotSpatial) won't work either.
If you want to try and update the GDAL dependencies let us know when your problem has been fixed in GDAL itself and a new GDAL build is available, we can then look at either updating DotSpatial or give you some tips on how to go about doing it yourself - depending on how much time we have available ;)