0

I am trying to place GeoTIFFs onto a SharpMap Mapbox. Some GeoTIFFs work just fine and are placed where expected. For example, .tiff files from this website work fine and are placed/scaled appropriately, but these GeoTIFFs end up in the wrong location and wrong size.

The code I use for this is pretty simple:

    SharpMap.Layers.GdalRasterLayer geoTiffMapLayer = new SharpMap.Layers.GdalRasterLayer(layerNameHere, geot);    
    geoTiffMapLayer.UseRotation = true; 
    mapBox1.Map.Layers.Add(geoTiffMapLayer);

I compared the working GdalRasterLayer's envelop to the not working GdalRasterLayer's envelope and noticed that the working GeoTIFF's envelope corresponds to the lat/long values of the image bounds. Where as, the coordinates for the non working geotiffs are not within possible bounds of latitude and longitude.

Is there some sort of unit conversion I might need to do, or is there a different way of applying the GeoTIFF to the map?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.