This project has moved. For the latest updates, please go here.

load image file (.tiff) after published

Topics: SharpMap Project, SharpMap v0.9 / v1.x
Nov 9, 2015 at 5:45 PM
Hi, friends,

I have no problem adding an image into my visual studio, however, after I publish my project, the 4th line gives me error:
    Dim ilay As SharpMap.Layers.GdalRasterLayer
    Dim fileName As String
    fileName = IO.Path.GetFileName(path)
    ilay = New SharpMap.Layers.GdalRasterLayer(path, path)
I compare my release folder and my publish folder and found that the folder
gdal is not in my publish/Application Files/SRH-MESH_1_0_0_6 folder. SRH-MESH is my project name. And if I delete the gdal folder from my release folder, I get the same error when I run SRH-MESH.exe without publish it.

I added my sharpmap, sharpmap.UI, and sharpMap.Extensions using Nuget. and I am using .Net Framework 4. I think my sharpmap is version 1.1

Any help will be really appreciated.

Nov 10, 2015 at 7:31 AM
GdalRasterLayer will only work if you deploy the gdal folder along with your application.
Nov 10, 2015 at 3:47 PM

Thanks a lot. I made it to work right now in a difficult way according to your suggestion.

I have to copy the folder “packages\GDAL.Native.1.9.2\gdal” into my solution folder and add it into the project. I think that I should be able to add the folder directly to project and point my project to the right location. I just do not know how to do it.

At least it is working. Many thanks.