How to load an ECW file in SharpMap

Topics: Data Access, SharpMap Project, SharpMap v0.9 / v1.x, SharpMap v2.0, Web Controls, WinForms Controls
May 28, 2008 at 7:03 AM
Dear all

I was wondering if there are any examples of how to load an ECW file using SharpMap and potentionaly load a shapefile on top of it that we can query?

I am working in C#. On the extention part it says that ER mapper SDK would be needed but other then that there are no specific details.

Apreciate the help.

Cheers
Dan
May 28, 2008 at 10:33 AM
You have to use the ECW Raster layer, here: http://www.codeplex.com/SharpMap/Wiki/View.aspx?title=ECW

The last time I tried it, I got a PInvoke-related exception.
Coordinator
May 28, 2008 at 11:41 AM
 RE: PInvoke-related exception: perhaps you forgot to copy the unmanaged gdal libraries to the bin folder? HTH jd
May 28, 2008 at 10:35 PM


JohnDiss wrote:
 RE: PInvoke-related exception: perhaps you forgot to copy the unmanaged gdal libraries to the bin folder? HTH jd


Is it the gdal libraries from fwtools or is it something that is needed from ER mapper SDK? It is a bit unclear about how this needs to be set up? Also would just copying the gdal libraries be suffiecient or would they need to be added to the system path? Any step by step guide for this?

Cheers
Dan
Coordinator
May 29, 2008 at 9:37 AM
Hi Dan, I dont actually use them myself but I think you just need to copy all the dlls beggining with gdal_ and ogr from the ExternalReferences\References4SharpMap.Extensions folder to the bin folder of your project. I dont think any further steps are necessary. HTH jd