Hey all,<div><br></div><div>I'm working on an app that needs to pass HDF4 files (MODIS tiles) around as byte arrays, and then open them up using gdal#Open, from java. Open works great when I pass in the filepath, so I know that my gdal setup is solid.</div>
<div><br></div><div>The problem is, when I turn the HDF4 file into a byte array and try to use</div><div><br></div><div>gdal.FileFromMemBuffer("/vsimem/test.hdf", bytearray);</div><div>DataSet data = gdal.Open("/vsimem/test.hdf");</div>
<div><br></div><div>I get an error that reads: "`/vsimem/test.hdf' not recognised as a supported file format."</div><div><br></div><div>I tried something similar, by converting </div><div><br></div><div><div>
<VRTDataset rasterXSize=\"1\" rasterYSize=\"1\"></div><div> <GeoTransform>100,1,0,100,0,-1</GeoTransform></div><div> <VRTRasterBand dataType=\"Byte\" band=\"1\"></div>
<div> </VRTRasterBand></div><div></VRTDataset></div></div><div><br></div><div>to a byte array and reading it in, and that worked great.</div><div><br></div><div>Any ideas on how to deal with this issue? I'll note that open SEES the file in the /vsimem/ directory, it just doesn't recognize it as a valid file. Is this an issue with HDF4 files, or with large binary sequences? Any ideas on how to get around this?</div>
<div><br></div><div>Thanks, all,</div><div>Sam</div>