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

How to work with .ecw files

Topics: SharpMap v2.0
Feb 7 at 2:03 PM
Dear Gurus!
Can't anybody say how to load .ecw files in SharpMap project?
Is it [https://sharpmap.codeplex.com/wikipage?title=ECW&referringTitle=Extensions) - actually now or there is another way?
Feb 8 at 6:40 AM
Do I understand correctly that now this can be done with GdalRasterLayer.cs like this
     myMap = new SharpMap.Map(new System.Drawing.Size(500,250);
     SharpMap.Layers.GdalRasterLayer layGdal = new SharpMap.Layers.GdalRasterLayer("Blue Marble", @"C:\data\bluemarble.ecw");
     myMap.Layers.Add(layGdal);
     myMap.ZoomToExtents();
Coordinator
Feb 8 at 7:34 AM
Yes, you need to use GdalRasterLayer.
For this to work, you additionally need to add both Gdal.Native and Gdal.Plugins nuget packages.
Feb 8 at 9:24 AM
Edited Feb 8 at 9:29 AM
The problem was: if I enable alpha channel the whole image is not visible. May be it's needed to set some configuration parameters.
Feb 8 at 12:48 PM
Image
How I can solve this problem?
Feb 8 at 3:00 PM
Edited Feb 9 at 8:16 AM
Sorry. It does not work, since ArcGIS is did not allow to edit ecw files and didn't save that alpha channel is enabled.
So when in GlobalMapper I save .ecw file with "Make background pixels transparent " - the .ecw image in not visible and is visible otherwise.
Coordinator
Feb 9 at 2:00 PM
Raise an issue on GitHub and provide a small sample ecw file.