ThinkGeo.com    |     Documentation    |     Premium Support

ECW Layer Failure

Hi,

I am having similar issue as mentioned in the following post.

https://community.thinkgeo.com/t/problem-with-ecw-raster-layer-in-version-10

However, the example projects are corrupt and will not extract when I download them.

Also, here is the exact error I get when I try and open the layer, so not sure this is same issue as the other user.

The type initializer for ‘ehQ=.y0o=’ threw an exception.

Like the other user mentioned, the file loads in v9. I am using 10 latest stable.

Regards,
Damian

Damian,
Could you send us the ECW file. We could look into more detail.

Thanks

Frank

Hi Frank,

It’s over 100Mb and it’s confidential. Can you advice a secure upload method?

Also, none of the ECW files I have will open in v10. Same error each time, so would imagine any one would do.

Thanks,
Damian

Thanks Damian,
I attached you a demo project to load the ecw file. Could you change the path see if your file could be loaded. HelloWorld.zip (179.5 KB)

If still not work for you. You could send a small your ecw file to support@thinkgeo.com We could look into more detail.

Thanks

Frank

Hi Frank,

I now see that the error occurs when reprojecting the layer.

Put this line in your sample and change map unit to meter.

ecwRasterLayer.ImageSource.Projection = new Proj4Projection(4326, 3857);

Regards,
Damian

Hi Frank,

Sorry, that wasn’t it. I was just missing unmanagedproj4 dependency.

So far, the layer is working with my image in this test project and reprojecting. I will see if I can reproduce the issue from my larger project. Maybe more nuget trouble…

Regards,
Damian

Hi Frank,

Yes, it’s NuGet again. The HexagonGeospatialEcw directory was not copied to the Windows-X64 and Windows-X86 directories of my build.

Not only that, but the build folder for this library was also missing the file ThinkGeo.MapSuite.Wrappers.EcwX64.dll

Manually copying the files worked and the error is now gone, but I really could use some help trying to understand why these files aren’t automatically going into the build. Seems like a script didn’t run to get the dll file.

Something else I notice is that my build directory does not have the .targets files for

MapSuiteDependency-HexagonGeospatialEcw.targets
MapSuiteDependency-UnmanagedProj4Projection.targets

Shouldn’t this be automatic as well?

Regards,
Damian

Thanks Damian,
Yes. This is strange. This happen when the .csproj(visual studio project file) mess up for some reason. If this happen I will create a brand new project to verify the mapsuite function and compare the bin folder with the original project.

Thanks

Frank