I need to use a .bgd (ESRI binary raster) because it seems to be the only raster format accepted out of the box in the DotSpatial .NET library.

My source files are mainly .rrd/.adf/.tif files. So I instead of trying to add the gdal extension to my DotSpatial code (I tried and I failed), I am trying to convert a raster to .bgd.

My guess was that ogr2ogr should be able to do it, using a command line similar to:

ogr2ogr -f "ESRI Shapefile" C:/Temp/Shps C:/Temp/test.gdb parcel citybnd

But when I look into the GDAL raster formats I don't see anything similar to .bgd that can help me figure out which command line I should use for this .bgd conversion.

  • Are you sure you don't mean .gdb aka. ESRI File GeoDataBase? – Kersten Dec 8 '16 at 11:19
  • @Kersten Looking at DotSpatial's source code, it seems to be .bgd, not .gdb: github.com/DotSpatial/DotSpatial/blob/master/Source/… – Xavier Peña Dec 8 '16 at 11:31
  • 1
    I suppose that .bgd is a native DotSpatial format (not ESRI binary raster). GDAL does not have a driver for that. I suggest to retry adding the GDAL extension. – user30184 Dec 8 '16 at 11:42
  • 1
    Sources to binary raster reader symbolsource.org/Public/Metadata/NuGet/Project/DotSpatial.Data/… with header The Initial Developer of this Original Code is Ted Dunsford. Created 7/6/2009 10:14:34 AM – user30184 Dec 8 '16 at 11:52
  • 1
    Esri supports three generic binary formats for band sequential (.bsq), band interleaved by line (.bil), and band interleaved by pixel (.bip). These are not, of course, Esri formats, just a naming and metadata convention agreed upon by the GIS vendors of the day, and documented by Esri. I have never heard of a .bgd extension in 28 years with Esri. – Vince Dec 8 '16 at 12:16

It seems that GDAL does not support what you write as being gdb. I don't know very much ESRI but could not find it either on their website.

Aren't you looking for geodatabase rasters (.gdb)? In such case, it's indeed not support as GDAL only supports vectors in ESRI geodatabases. See Accessing file geodatabase (.gdb) rasters with GDAL?

I would recommend not using a library which forces you to use a proprietary format for rasters.

What about using the CSharp bindings of GDAL?

Or maybe if you need a higher level API (display and render maps) using QGIS python API? You might find this example of a custom QGIS python application useful: Roam application

  • It is a bit confusing because the letters are the same but in different order, but looking at DotSpatial's source code I'd say that the accepted format is .bgd (not .gdb). About CSharp GDAL bindings, DotSpatial asks for a very specific way to link to GDAL, which looks difficult to maintain and I would like to avoid. Maybe I'll have to giving up on c# and embracing python and QGIS, we'll see.Thanks! – Xavier Peña Dec 8 '16 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.