'v_img.ecw' not recognised as a supported file format.

Topics: SharpMap v0.9 / v1.x
Feb 3, 2014 at 1:19 PM
hi
i want to load ecw file but i get this error

'v_img.ecw' not recognised as a supported file format.

i use the sharpmap sharpmap-104902 and install the GDAL.Plugins from nuget

ecw loaded easy in version 0.9 :( with fwtools :(

advice me please
Coordinator
Feb 3, 2014 at 3:24 PM
Could you please post the directory tree of your application build output?
Feb 4, 2014 at 8:48 AM
Image

and my ecw in app_data and then call it with this command
 bak = "v_img.ecw";
        int checkLevel = 0;
        string path = HttpContext.Current.Server.MapPath("~/App_Data/" + bak);
        SharpMap.GdalConfiguration.ConfigureGdal();
        try
        {
            SharpMap.Layers.GdalRasterLayer g = new GdalRasterLayer("ecw", path);
            g.SRID = 900913;
            map.Layers.Add(g);
        }
        catch
        { 
            
        }
Feb 4, 2014 at 9:14 AM
Hi FObermaier
i read the SharpMap.GdalConfiguration.ConfigureGdal(); and i copy
data share x64 x86 in gdla folder inside bin
and everything is in order now
Coordinator
Feb 4, 2014 at 10:30 AM
Yes, that was a bug in the 1.9.2 package for WebApplications. Sorry. for the 1.10.1 package that will be fixed.
Feb 4, 2014 at 10:36 AM
Thank you very much!
i have another question
i add th gdal layer like a normal layer is better
or i add raster layer to BackgroundLayer for map

which has better performance?
Coordinator
Feb 4, 2014 at 1:12 PM
BackgroundLayer is mainly for async layers. Other layers may slow it down. In Server contexts it offers no benefit at all.