Hi,
I’ve got a tif format DEM file and I’m trying to read it, but it fails using Map Suite. I’ve loaded the file into ArcMap and GlobalMapper and it displays fine in those programs.
Here’s the basic code. I get an error at the open statement.
GdalRasterLayer gr = new GdalRasterLayer(@"..\..\Data\TestDem.tif");
gr.Open();
Here’s the stack trace:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at ThinkGeo.MapSuite.Core.FdoRasterSource.OpenCore()
at ThinkGeo.MapSuite.Core.RasterSource.Open()
at ThinkGeo.MapSuite.Core.RasterLayer.OpenCore()
at ThinkGeo.MapSuite.Core.Layer.Open()
at DEMImage.Form1.button1_Click(Object sender, EventArgs e) …
I’ve seen some posts where this is supposed to work and it says it’s supported in the formats notes.
Here’s the example file:
TestDem.zip (121.0 KB)
Please would be really good to make this work. Also, I need to know how to access the pixel elevation values if you manage to make it work.
Thanks,
Damian