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

GdalRasterLayer (ecw files and drawings)

Topics: Algorithms, General Topics, SharpMap Project
Jan 24, 2013 at 4:40 PM

Hi, I have 2 questions:

1) I can't load ecw files. "xxxxx.ecw not recognised as a supported file format."

Maybe it's why Gdal.GetDriver(i) doesn't return me the extension ".ecw"?


2) In GdalRasterLayer.GetNonRotatedPreview

double left = Math.Max((sbyte)bbox.MinX, (sbyte)_envelope.MinX);
double top = Math.Min((sbyte)bbox.MaxY, (sbyte)_envelope.MaxY);
double right = Math.Min((sbyte)bbox.MaxX, (sbyte)_envelope.MaxX);
double bottom = Math.Max((sbyte)bbox.MinY, (sbyte)_envelope.MinY);
why do you cast to a sbyte the bbox's values? if I work with a metric reference system (like UTM) this cast is wrong
Jan 24, 2013 at 8:09 PM

Do you use the new NuGet packages or old FWTools?

If you use old FWTools, first update SharpMap.Extensions project to current version.

Then you need to install GDAL.Plugins nuget package, too to use ECW raster layer.

I noticed the casting the other day for the first time, I have no idea if it was there all the time or committed recently.

Hth FObermaier

Jan 25, 2013 at 7:20 AM

I worded a lot with the 100071 version, and this cast didn't exist, so I think it's not so much time

Do the NuGet package have to be installed in all the clients that use my application?

Jan 25, 2013 at 8:35 AM

The casting was introduced last summer while replacing SharpMap.Geometries with GeoAPI/NTS.Geometries. I have no clue why (maybe resharper suggested this ???). Anyway, fixed in current trunk.

Every client that wants to use ECW files needs to have the relavant native libraries in the GDAL\[x86|x64]\plugins folder.

Hth FObermaier

Jan 25, 2013 at 9:14 AM

Thank you as always, I will try the new trunk