Hallo,
I try to project tiff-images. Following some posts in the forum, I downloaded beta-versions 13.x (ThinkGeo.UI.Wpf, ThinkGeo.Core, ThinkGeo.Gdal, ThinkGeo.UnmanagedGeoTiff, ThinkGeo.UnmanagedProj). and use this code:
private void Map_Loaded(object sender, RoutedEventArgs e)
{
Map.MapUnit = GeographyUnit.Meter;
Map.CurrentExtent = GetBoundingBoxGermany(25833); // MaxExtents.SphericalMercator;
var gProjectionConverterForRendering = new UnmanagedProjectionConverter(25833, 25832);
gProjectionConverterForRendering.Open();
var geotifLayer = new UnmanagedGeoTiffRasterLayer(System.AppDomain.CurrentDomain.BaseDirectory + "\\..\\..\\Datas\\33206\\dtk10_33206_5920.tif");
geotifLayer.ImageSource.ProjectionConverter = gProjectionConverterForRendering;
var overLay = new LayerOverlay();
overLay.TileType = TileType.SingleTile;
overLay.Layers.Add(geotifLayer);
Map.Overlays.Add(overLay);
Map.Refresh();
}
public static RectangleShape GetBoundingBoxGermany(int externalSrid)
{
ProjectionConverter projectionConverter = new ProjectionConverter(4326, externalSrid);
projectionConverter.Open();
var box = projectionConverter.ConvertToExternalProjection(new RectangleShape(5.8663153, 55.099161, 15.0419319, 47.2701114)) as RectangleShape;
projectionConverter.Close();
return box.GetBoundingBox();
}
The Position on the map seems correct, but it’s look like a grayscale picture.