ThinkGeo.com    |     Documentation    |     Premium Support

Gdi+ error with geotiff image

Hi


I try to load a tiff image like in the sample. But this one is a geotiff, geolocalized and has no need of tfw.


It opens correcly in other .net mapping library (sharpmap), but with mapsuite it says :


System.InvalidOperationException: GDI+ threw a status error code.

   at ThinkGeo.MapSuite.Core.x22c00ac0fef8ee1a.FastFromFile(String filename)

   at ThinkGeo.MapSuite.Core.GdiPlusRasterSource.OpenCore()

   at ThinkGeo.MapSuite.Core.RasterSource.Open()

   at ThinkGeo.MapSuite.Core.RasterLayer.OpenCore()

   at ThinkGeo.MapSuite.Core.Layer.Open()

 


Thanks for any help. (see attached file)


 



414-sample_geotiff2.zip (27.6 KB)

Riccardo, 
  
 You need to use GeoTiffRasterLayer instead of GdiPlusRasterLayer to open a GeoTiff image. We tried to open your attached tiff file (with GeoTiffRasterLayer) though and it failed, I think this is a bug, I have sent it to the development team and we will work on it. Sorry for the inconvenience now. 
  
 Ben.

That’s right, I tried GeoTiffRasterLayer and it throwed no exception but the image is black.  
 Thanks for the information.

We are working on this and hope we will figure it out soon. Thanks for reporting this. :)

Ben