ThinkGeo.com    |     Blog    |     Wiki    |     Support

Another GeoTiff fails to display in MS 10

Hi,

I have found another GeoTif that will not display in our application using MS10 WinForms. I have uploaded the file to the FTP server. It can be found in folder Tiff Will Not Display. The file name is Won’t Display.zip. This file displays OK in other GIS applications. Can you tell why it doesn’t display for us?

Thanks!

Steve

Hi Steve,

Because tiff have many types, it looks your data is not supported well now, we have a workaround but it only render the data as black-white color.

         winformsMap1.MapUnit = GeographyUnit.Meter;

        LayerOverlay layerOverlay = new LayerOverlay();
        GeoTiffRasterLayer tiffLayer = new GeoTiffRasterLayer(@"GDTest.tif");
        tiffLayer.Open();
        winformsMap1.CurrentExtent = tiffLayer.GetBoundingBox();

        GdalRasterLayer layer = new GdalRasterLayer(@"GDTest.tif");
        
        layerOverlay.Layers.Add(layer);
        winformsMap1.Overlays.Add(layerOverlay);


        winformsMap1.Refresh();

Our developer is focus on the new product this month, I think we can research it and see whether this type can be supported after that.

Regards,

Ethan

Ethan,

Thanks very much! Is there a way I can look at metadata and tell in advance if this type of GeoTif is not supported? Is there a property I can look for?

Thanks!

Steve

Hi Steve,

It looks we don’t have a function to recognize whether a TIFF file is supported now.

Thanks to let us know it, I will let our development team knows this requirement.

Regards,

Ethan

Hi Ethan,

I have another GeoTif that we cannot display. I tried with GdalRasterLayer and it takes a very long time but still does not display properly. Can you help with this one? I uploaded it to the ftp site in the same folder as before, the filename is GeoTifWontDisplay.zip.

Thanks!

Steve

Hi Steve,

We will look into it and update here after that.

Regards,

Ethan

Hi Steve,

It looks the data have the same problem, lose color like the other file.

We did some test but still cannot make it render correct with our GeoTiffRasterLayer.

You also can use my previous code to render it, just need set the winformsMap1.MapUnit = GeographyUnit.DecimalDegree

And it render slow, I tried other utility found they load this data is also slow, maybe it’s too big before compression.

Regards,

Ethan