ThinkGeo.com    |     Documentation    |     Premium Support

Exporting GeooTIFF

Hi all,
i’m exporting GeoTIFF using V9. The export is running and the tfw is ok. But when loading the generated GeoTIFF there is a displacement. (also checked with QGIS, same problem)

In the picture i have marked the displacement with blue arrows. The GeoTIFF seems to be streched.
For Export I’m using the GdiPlusGeoCanvas. I have tried to set the DPI Property (96, 100…) but the result is not correct.
The source Geometries are stored in PostgresFeatureLayer, projected with EPSG:25832.

 Dim g As Graphics = Graphics.FromImage(bitmap)
            ' Create a GdiPlusGeoCanvas and start the drawing
            Dim gdiPlusGeoCanvas As New GdiPlusGeoCanvas
            gdiPlusGeoCanvas.BeginDrawing(bitmap, ExportExtent.GetBoundingBox(), theMap.MapUnit)
            gdiPlusGeoCanvas.DrawingQuality = DrawingQuality.HighQuality
            'gdiPlusGeoCanvas.Dpi = 100

            ' Loop through all of the PrintingLayer in the PrinterInteractiveOverlay and print all of the
            ' except for the PagePrinterLayer                
            Dim labelsInAllLayers As New Collection(Of SimpleCandidate)()
            For Each exportOverlay As LayerOverlay In theMap.Overlays
                    For Each exportLayer As ThinkGeo.MapSuite.Core.Layer In exportOverlay.Layers
                            If exportLayer.IsVisible Then 'GetLayerState(exportLayer.Name) > LayerState.invisible
                                exportLayer.Draw(gdiPlusGeoCanvas, labelsInAllLayers)
                            End If
                    Next
            Next

            ' End the drawing
            gdiPlusGeoCanvas.EndDrawing()
            bitmap.Save(filename, format)

How to get a correct GeoTIFF?

Regards
Hardy

Hi Hardy,

Thanks to let us know that, we will check the code changes and try to find whether somewhere get changed.

I know the source from Postgres is not easy to get export, but if you can find some other way to provide us a test data should be helpful.

Regards,

Ethan

Hi Hardy,

As below is the reply from our developer.

I can’t reproduce this issue based on your code. The attached is the sample which I tried to reproduce this issue.

I also have tried to download the building data from Norway Shape file and captured the feature image to tiff image, but the issue still can’t be reproduced. Could you please supply the issue data to us?

Post9112.zip (240.0 KB)

Thanks,