ThinkGeo.com    |     Blog    |     Wiki    |     Support

GeoTiff is "jumping" on zooming

Hi,

I’m using Daily Full Development 9.0.273.0.
There is a GeoTiff in EPSG 25832 and some Vector Data also in EPSG 25832.
When zooming/panning the map the GeoTiff changes it’s Position (it seems to like the Tiff jumps to a new psotion).
See the correct Position as follows.


When panning to south the Tiff “jumps”.

I have never noticed that behaviour in former versions.
Any idea?

Regards
Hardy

Hi Hardy,

I tried to reproduce that with our Geotiff file, but it looks however I pan or zoom it render correct position.

I am not sure whether that’s because data or dll version, but if possible, could you please provide a simple sample for that, and let us know your detail dll version?

Regards,

Don

Hi Don,
I have done some test and it seems to me that it is depending on the data/tif file.
I will load the tif via ftp. So you could check.

Regards
Hardy

Hi @Hartwig,

Please let us know if you complete uploaded that.

Regards,

Don

Hi Don,

bak again. Upload is completed.
You’ll find ‘Denklingen comp.tif & tfw’ at FileStation.

Regards
Hardy

Hi Hartwig,

I can’t reproduce your issue with your tiff data, as a sample:

        private void LoadAGeoTiffImage_Load(object sender, EventArgs e)
    {
        winformsMap1.MapUnit = GeographyUnit.Meter;
        winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean);

        GeoTiffRasterLayer worldImageLayer = new GeoTiffRasterLayer(@"..\..\Data\gisME\Denklingen comp.tif");

        LayerOverlay ImageOverlay = new LayerOverlay();
        ImageOverlay.Layers.Add("WorldImageLayer", worldImageLayer);
        winformsMap1.Overlays.Add(ImageOverlay);
        winformsMap1.ZoomLevelSet = GetCustomZoomLevelSet(1000);

        winformsMap1.CurrentExtent = new RectangleShape(405326.52244, 5641546.10818, 405333.537718, 5641537.417031);

        InMemoryFeatureLayer imLayer = new InMemoryFeatureLayer();
        Feature feature = new Feature("MULTIPOLYGON(((405328.198312019 5641542.1718303,405330.536737876 5641543.6918071,405333.537717725 5641539.01495539,405331.277239397 5641537.41703106,405328.198312019 5641542.1718303)))");
        imLayer.InternalFeatures.Add(feature);
        imLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = new AreaStyle(new GeoPen(GeoColor.SimpleColors.Blue, 2.0f));
        imLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
        ImageOverlay.Layers.Add(imLayer);

        InMemoryFeatureLayer im = new InMemoryFeatureLayer();
        im.InternalFeatures.Add(new Feature(winformsMap1.CurrentExtent.GetCenterPoint()));
        im.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.City1;
        im.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
        ImageOverlay.Layers.Add(im);

        winformsMap1.Refresh();
    }
    private ZoomLevelSet GetCustomZoomLevelSet(double initialScale)
    {
        ZoomLevelSet zoomLevelSet = new ZoomLevelSet();
        zoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(initialScale));
        zoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(initialScale / 2));
        zoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(initialScale / 4));
        zoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(initialScale / 8));
        zoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(initialScale / 16));
        zoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(initialScale / 32));
        zoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(initialScale / 64));
        zoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(initialScale / 128));
        zoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(initialScale / 256));
        zoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(initialScale / 512));
        return zoomLevelSet;
    }

This is the initialized position:

When I pan the map to south:

I’m working on the map suite version 9.0.360.0, you can download it from https://ap.thinkgeo.com:5001/sharing/UBWxEECcc.
I guess it caused by a projection issue, can you send your sample to me?

Thanks,

Hi Don,

I’m using EPSG 25832 for projection.
Both (vector layer from PostGIS, GeoTIFF) will be set with .epsg=25832.

Regards
Hardy

Hi Hardy,

Thanks, but I don’t know the 25832 is for the image or for render.

I tried to convert it between 25832 and 4326 but get exception, only convert to 900913 can make it works. The tiff looks strange there, so I want to double check how to assign the projection, please help me modify the proj4 as below:

ManagedProj4Projection proj4 = new ManagedProj4Projection();
proj4.ExternalProjectionParametersString = ManagedProj4Projection.GetEpsgParametersString(25832);
proj4.InternalProjectionParametersString = ManagedProj4Projection.GetGoogleMapParametersString();
proj4.Open();

As below is how it looks when I convert it to Google, but when I pan it, the image keep it’s position and hadn’t watched “jump”.

Regards,

Don

Hi Don,

jumping is relativ lower (less then 1 meter…).
Your Projection is correct.

Zoom blue polygon (scale should be 1:100 or less) in the middle of the map.
Now pan the map to North/South.

Regards
Hardy

Hi Hardy,

Thanks for your information, I reproduced that.

Our developer will looks into it and see what happened here.

Any update I will let you know.

Regards,

Don

Hi Hardy,

This issue is because re-projection rectangle make the external result’s extent center changes a little. Our developer had fixed it.

The fix is in version ThinkGeo MapSuite 11.0.0-beta025, you can get it here https://www.nuget.org/packages/ThinkGeo.MapSuite/11.0.0-beta025, this version should be updated in one or two days.

Regards,

Don

Hi Don,

now I have checked the issue again using Version 11.
But the tif will be still translated/jumps.
Please zoom to 1:100 or less. You will see a displacement about 0-70 centimeters.
Moving the map will translate the tif in all directions.

We need to digitize raster maps. While tif is jumping we are not able to do that…

Hope you can solve the problem.
As we are using Daily Full Development 9.0.1124.0 it would be nice to have solution in that area…

Regards
Hardy

Hi Hartwig,

I tested that by the test code as below: 7899.zip (11.0 KB)

Please put the Denklingen comp.tif & Denklingen comp.tfw into AppData folder.

And it looks I hadn’t watched the jump with our latest development package and release package.

Regards,

Ethan

Hi Ethan,

sounds like it’s working?
You send me a wpf solution, but we are using Desktop edition.

So I will copy to Desktop and check that…

Regards
Hardy

Hi Ethan,

I checked that: It’s still jumping but it’s ok. The gap is about 5 cm…not fine but working for our job

Regards
Hardy

Hi Hardy,

Thanks for your update.

I also moved the code to winform, and when I pan the map, the relative position have very small change.

I had reported it to our developer but I am not sure whether it can be solved, if our developer have any update about this problem I will let you know.

Regards,

Ethan

Hi Ethan,

back again with the issue.
Using 11.0.0-beta002 to work with GeoTIFF we notice a large displacement.
The GeoTIFF was created with GDAL:
gdal_translate -of GTiff -co “COMPRESS=LZW” -co BIGTIFF=YES -co “TILED=YES”
gdaladdo --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL 2 4 8 16 32

We got a working file with 13.8 GB, loading and paning very fast. But zooming to less then 1:5000 the GeoTIFF will move 100+ meters.
See screen shots.
zoom lb.pdf (382.9 KB)
We like to get a working solution…

Regards
Hardy

Hi Hardy,

Thanks for your detail information.

It looks the MapSuiteDependency-LibGeoTiff 11.0.0-beta002 is built 7 months ago. So I want to know all your other packages version to make sure whether it’s introduced by the change after that.

And what’s the base map in your application?

After that I did a quickly test with some existing GeoTiff data, it looks I hadn’t reproduced it.

So I will try to build a GeoTiff file like yours to test later.

Anything I missed please let me know.

Regards,

Ethan

Hi Ethan,

I have created the big tiff using GeoTIFF files from government.The projection is 25832. Same projection is used for the vector data (stored in PostGIS).
If you like I will send you all these data…

Regards
Hardy

the following list is from dependency folder:
MapSuiteDependency-CilociFlee.10.3.0
MapSuiteDependency-EsriFileGeoDatabase.11.0.0-beta004
MapSuiteDependency-GdalS57.11.0.0-beta001
MapSuiteDependency-GeoAPI.10.3.0
MapSuiteDependency-HexagonGeospatialEcw.11.0.0-beta002
MapSuiteDependency-LibGeoTiff.11.0.0-beta002
MapSuiteDependency-LizardTechMrSid.11.0.0-beta003
MapSuiteDependency-MicrosoftSqlServerTypes.10.3.0
MapSuiteDependency-MicrosoftVisualCRunTime100.10.3.1
MapSuiteDependency-NetTopologySuite.10.3.0
MapSuiteDependency-Npgsql.10.3.0
MapSuiteDependency-PDFsharp.10.3.0
MapSuiteDependency-TeighaCad.11.0.0-beta003
MapSuiteDependency-UnmanagedProj4Projection.11.0.0-beta007
MapSuiteDesktopForWinForms-BareBone.11.0.0-beta056
MapSuiteDesktopForWinForms-Standard.11.0.0-beta056
ThinkGeo.MapSuite.11.0.0-beta088
ThinkGeo.MapSuite.Drawing.PdfGeoCanvas.11.0.0-beta007
ThinkGeo.MapSuite.Layers.Adornments.11.0.0-beta008
ThinkGeo.MapSuite.Layers.Background.11.0.0-beta005
ThinkGeo.MapSuite.Layers.BingMaps.11.0.0-beta012
ThinkGeo.MapSuite.Layers.Cad.11.0.0-beta009
ThinkGeo.MapSuite.Layers.CloudFile.11.0.0-beta006
ThinkGeo.MapSuite.Layers.Delimited.11.0.0-beta006
ThinkGeo.MapSuite.Layers.Ecw.11.0.0-beta011
ThinkGeo.MapSuite.Layers.FileGeoDatabase.11.0.0-beta012
ThinkGeo.MapSuite.Layers.GeoTiff.11.0.0-beta014
ThinkGeo.MapSuite.Layers.GoogleMaps.11.0.0-beta011
ThinkGeo.MapSuite.Layers.Gpx.11.0.0-beta005
ThinkGeo.MapSuite.Layers.Graticule.11.0.0-beta009
ThinkGeo.MapSuite.Layers.Grids.11.0.0-beta013
ThinkGeo.MapSuite.Layers.Group.11.0.0-beta005
ThinkGeo.MapSuite.Layers.Heat.11.0.0-beta005
ThinkGeo.MapSuite.Layers.IsoLine.11.0.0-beta007
ThinkGeo.MapSuite.Layers.Jpeg2000.11.0.0-beta018
ThinkGeo.MapSuite.Layers.Kml.11.0.0-beta013
ThinkGeo.MapSuite.Layers.MapShape.11.0.0-beta005
ThinkGeo.MapSuite.Layers.MrSid.11.0.0-beta007
ThinkGeo.MapSuite.Layers.MsSql.11.0.0-beta009
ThinkGeo.MapSuite.Layers.MultipleFeatureSource.11.0.0-beta005
ThinkGeo.MapSuite.Layers.NativeImage.11.0.0-beta009
ThinkGeo.MapSuite.Layers.NauticalCharts.11.0.0-beta007
ThinkGeo.MapSuite.Layers.Noaa.11.0.0-beta009
ThinkGeo.MapSuite.Layers.OpenStreetMap.11.0.0-beta011
ThinkGeo.MapSuite.Layers.PostgreSql.11.0.0-beta008
ThinkGeo.MapSuite.Layers.Printers.11.0.0-beta011
ThinkGeo.MapSuite.Layers.Restriction.11.0.0-beta006
ThinkGeo.MapSuite.Layers.ShapeFile.11.0.0-beta009
ThinkGeo.MapSuite.Layers.Sqlite.11.0.0-beta010
ThinkGeo.MapSuite.Layers.Tab.11.0.0-beta008
ThinkGeo.MapSuite.Layers.TiledWms.11.0.0-beta013
ThinkGeo.MapSuite.Layers.TinyGeo.11.0.0-beta005
ThinkGeo.MapSuite.Layers.TobinBas.11.0.0-beta005
ThinkGeo.MapSuite.Layers.Wfs.11.0.0-beta006
ThinkGeo.MapSuite.Layers.WkbFile.11.0.0-beta006
ThinkGeo.MapSuite.Layers.Wms.11.0.0-beta013
ThinkGeo.MapSuite.Layers.Wmts.11.0.0-beta015
ThinkGeo.MapSuite.Layers.WorldMapKit.11.0.0-beta011
ThinkGeo.MapSuite.ProductCenter.11.0.0-beta020
ThinkGeo.MapSuite.Shapes.UnmanagedProj4Projection.11.0.0-beta008
ThinkGeo.MapSuite.Styles.ClassBreak.11.0.0-beta007
ThinkGeo.MapSuite.Styles.ClusterPoint.11.0.0-beta006
ThinkGeo.MapSuite.Styles.Composite.11.0.0-beta005
ThinkGeo.MapSuite.Styles.DotDensity.11.0.0-beta006
ThinkGeo.MapSuite.Styles.Filter.11.0.0-beta005
ThinkGeo.MapSuite.Styles.FleeBoolean.11.0.0-beta005
ThinkGeo.MapSuite.Styles.Gradient.11.0.0-beta005
ThinkGeo.MapSuite.Styles.Icon.11.0.0-beta005
ThinkGeo.MapSuite.Styles.IconValue.11.0.0-beta005
ThinkGeo.MapSuite.Styles.Regex.11.0.0-beta005
ThinkGeo.MapSuite.Styles.Value.11.0.0-beta006
ThinkGeo.MapSuite.Styles.WellPoint.11.0.0-beta005
ThinkGeo.MapSuite.Styles.ZedGraph.11.0.0-beta005\

Hi Hardy,

If possible we can get the data to build a sample, that should be helpful.

Regards,

Ethna