ThinkGeo.com    |     Documentation    |     Premium Support

V12.1 - Raster Projected Results in Blank Areas

Dennis,
I tested the geotif. looks it works fine. Here is the code.

 private void mapView_Loaded(object sender, RoutedEventArgs e)
        {
            // ------------------------------------------geotiff------------------------------------
            map.MapUnit = GeographyUnit.Meter;
            map.CurrentExtent = MaxExtents.SphericalMercator;
            var geotifLayer = new UnmanagedGeoTiffRasterLayer(@"D:\Tickets\MapRasters2010\08759200.tif");
            geotifLayer.Open();
            // set Internal Projection to that of Layer
            var gProjectionForRenderingInternal = new Projection();
            gProjectionForRenderingInternal.ProjString = geotifLayer.ImageSource.Projection.ProjString;

            // set External Projection to that of Selected
            var gProjectionForRenderingExternal = new Projection();
            gProjectionForRenderingExternal.ProjString = Projection.ConvertEpsgToProjString(3857);

            var gProjectionConverterForRendering = new ThinkGeo.Core.UnmanagedProjectionConverter();
            gProjectionConverterForRendering.InternalProjection = gProjectionForRenderingInternal;
            gProjectionConverterForRendering.ExternalProjection = gProjectionForRenderingExternal;

            geotifLayer.ImageSource.ProjectionConverter = gProjectionConverterForRendering;
            geotifLayer.ImageSource.ProjectionConverter.Open();
            var overLay = new LayerOverlay();
            overLay.Layers.Add(geotifLayer);
            map.Overlays.Add(overLay);
           
            map.CurrentExtent = geotifLayer.GetBoundingBox();
            map.Refresh();

        }

still downloading the jp2 files.

Thanks

Frank

hi Frank,

I had been using ThinkGeo.Core.GeoTiffRasterLayer so I changed to ThinkGeo.Core.UnmanagedGeoTiffRasterLayer.

The TIFF raster is rendering with a ProjectionConverter.

Thanks for the tip.

Dennis

Dennis,
The Jpeg2000 still not working with the projection converter. But if you don’t do the projection it works fine. I am still looking into it.

Thanks

Frank

Thanks for the update Frank.

Dennis

Thanks Dennis,
I looked into more detail. I found the reason for this one. We don’t support the 16 bit datatype raster image re-projection. We only support 8 bit datatype.

Thanks

Frank