This project is read-only.

Not all GDAL formats supported by GDAL raster provider

Mar 16, 2012 at 3:43 PM

Hi all,

I was looking into DotSpatial for a project that I'm working on, and played around with MapWindow 6 and the GDAL raster provider.  However, I noticed that the raster formats that I need are not supported by the GDAL raster provider (but they are supported by GDAL, I've used them with the GDAL command line tools).

The formats are the following (taken from http://www.gdal.org/formats_list.html):

Northwood/VerticalMapper Classified Grid Format .grc/.tab NWT_GRC        
Northwood/VerticalMapper Numeric Grid Format .grd/.tab NWT_GRD

I had a look at the source code, and noticed that in GdalRasterProvider.cs, these formats are not listed in the various methods/properties (GetDriverCode(), DialogReadFilter, etc.).

I could download the source and add entries for these formats myself, but I'm just wondering if this is all that's required.  Does anyone know why these formats were not included in GdalRasterProvider, along with all the other ones?

Thanks

Mar 16, 2012 at 6:10 PM

The GdalRasterProvider is not very reliable and still needs some work. It doesn't support large files or file types that have more than one band or layer (it might open the first one), for example.

Other than that, it is pretty easy to "add support" for a new file type/extension. You have to modify the code in 3-5 places, and we did that for netCDF recently.


Mar 16, 2012 at 7:33 PM

I see... OK, I'll play around with it and see if I can make it work.  Any chance you could send me a link to the netCDF changeset, just so I can see an example?  I looked at GdalRaster.cs history, but all I see are changes related to statistics, nothing about netCDF.  Also, when you say it doesn't support "large" files, how large do you mean?

Mar 17, 2012 at 2:14 AM

We 'lost' that changeset with the move to TFS. Search for tif, for example, and you'll get an idea of where to look.

Since the file is loaded into a bitmap in memory, only small files are supported. You can track this suggestion.

In tests, you're not going to be able to load a 100MB jpeg.