2

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.

Xavier Peña
  • 121
  • 4
  • Are you sure you don't mean .gdb aka. ESRI File GeoDataBase? – Kersten Dec 08 '16 at 11:19
  • @Kersten Looking at DotSpatial's source code, it seems to be .bgd, not .gdb: https://github.com/DotSpatial/DotSpatial/blob/master/Source/DotSpatial.Data/BinaryRasterProvider.cs – Xavier Peña Dec 08 '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 08 '16 at 11:42
  • @user30184 That would explain why I don't see any info about this .bgd type extension... In that case, as you say, I would have to dig deeper into how to make DotSpatial accept other raster formats through the GDAL extension. – Xavier Peña Dec 08 '16 at 11:46
  • 1
    Sources to binary raster reader https://www.symbolsource.org/Public/Metadata/NuGet/Project/DotSpatial.Data/1.0.1-echo/Release/.NETFramework,Version%3Dv4.0,Profile%3DClient/DotSpatial.Data/DotSpatial.Data/BgdRaster.cs?ImageName=DotSpatial.Data with header The Initial Developer of this Original Code is Ted Dunsford. Created 7/6/2009 10:14:34 AM – user30184 Dec 08 '16 at 11:52
  • https://github.com/r-barnes/ArcRasterRescue – mdsumner Dec 08 '16 at 12:14
  • 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 08 '16 at 12:16
  • @Vince I got the bgd-ESRI connection from this page, which of course doesn't look very trustworthy ... but it's the only info I could find about "bgd" outside DotSpatial. The most likely hypothesis seems to be the one from user30184, which is that .bgd is a native DotSpatial format. DotSpatial is the underlying library of the new MapWindow version (v6 I think). – Xavier Peña Dec 08 '16 at 12:36

1 Answers1

1

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

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Denis Rouzaud
  • 1,618
  • 11
  • 16