ThinkGeo.com    |     Documentation    |     Premium Support

Unable to load large size .tiff files in GeoTiffRasterLayer

Dear All,

I am unable to load large size .tiff files size is around 600 mb.

Thanks
Palani

Hi Palani,

I think we can load 600mb tiff succeed.

Could you please let us know what’s the exception you met when you try to load it?

And please upload your test code, so we can test that based on our big size tiff.

After that if it still cannot reproduce that means it’s related with data, we maybe need your data to see whether it’s supported.

Regards,

Don

Dear Don,

I am able to load .tiff files in seperate application, but i am unable to open that same image in my product based appplication, my application is some what big, it’s corrept the other memory exception.

RectangleShape vectorRectangleShape = new RectangleShape(-180, 90, 180, -90);
Mapcontrol.CurrentExtent = vectorRectangleShape;

GeoTiffRasterLayer rasterLayer = new GeoTiffRasterLayer(@“D:\GeoTiff_World\NaturalEarthData\NE1_HR_LC_SR\NE1_HR_LC_SR.tif”, vectorRectangleShape);
rasterLayer.UpperThreshold = double.MaxValue;
rasterLayer.LowerThreshold = 0;
rasterLayer.IsGrayscale = false;
VectorLayerOverlay = new LayerOverlay();
VectorLayerOverlay.Layers.Add(“RasterLayerBoundingBox”, rasterLayer);
Mapcontrol.ZoomIn(50);
Mapcontrol.Refresh();

Thanks
Palani

Hi Palani,

Just like you mentioned, your code works. I create a simple test project based on your code, then render a 600mb tiff file, which render so fast without exception.

If you also can load that in standalone application but cannot in your product, that should because the memory limitation for single application, I think this value should be 2GB.

I think maybe you want to split your image into many small ones and render them, or you can generate tile cache then directly render the cache instead of render tiff file.

Wish that’s helpful.

Regards,

Don