This project has moved and is read-only. For the latest updates, please go here.

GDAL Raster Images in Sharpmap 1.1

Topics: SharpMap v0.9 / v1.x
Jun 18, 2015 at 3:42 AM
till sharpmap 1.0.4 GDALRasterlayer existed in sharmap.layers
however in sharpmap 1.1 it doesnot

GdiImagelayer doest work well as maps loaded previously were automatically stiched together and coordinated fetched from them were in WGS84 format whereas now it is a pictureimage overlaped on each other with cordinates as image pixels

is there a way to fix this the code being used currently is
Public Sub OpenRaster(ByVal sLayer As String)
        Dim diaFile As New OpenFileDialog
        diaFile.Filter = "GeoTIFF (tif)|*.tif"
        If diaFile.ShowDialog = System.Windows.Forms.DialogResult.Cancel Then
            Exit Sub

         'Add Raster Layer
         Dim MapLayer As SharpMap.Layers.GdalRasterLayer =  _
         New SharpMap.Layers.GdalRasterLayer(sLayer, diaFile.FileName)

         ' Zoom the map 

       End If
  End Sub
Jun 18, 2015 at 6:59 AM
GdalRasterLayer was not removed, you must be missing a reference.
It is in SharpMap.Extensions assembly.
Jun 18, 2015 at 9:25 AM
Sharpmap 1.1
All references were added from nuget
Along with sharpmap extensions
Jun 18, 2015 at 10:54 AM
  • created a new WinForms project, .NetFramework 4.0 Client,
  • installed nuget package SharpMap.Extensions,
  • checked project references (the usual subjects were there, especially SharpMap.Extensions),
  • Added code, GdalRasterLayer was found by intellisense, and the code did compile.
I'm sorry, I cannot reproduce your issue.
Jun 19, 2015 at 1:04 PM
yes the issue was with .net 4.5
after changing .net to 4.0 and reinstalling the packages it was resolved