This project has moved and is read-only. For the latest updates, please go here.

Raster Layer

Nov 21, 2006 at 3:52 PM

the current version supports JPEG2000 as raster maps only. Will the version 2.0 supports different formats (e.g. tiff or MrSid)?

Nov 23, 2006 at 3:04 AM
Did you check the GDAL extension? It supports most raster formats.
Nov 23, 2006 at 6:52 AM
thanks for your answer. I added the GdalRasterLayer.Dll and the GDALWrapper.dll to my project. But I get an TypeInitializationException in this codeline

SharpMap.Layers.GdalRasterLayer oDTK = new SharpMap.Layers.GdalRasterLayer("DTK500", Server.MapPath(@"~/App_Data/DTK500.Sid"));

The complete execption message is:

System.TypeInitializationException wurde nicht von Benutzercode behandelt.
Message="Der Typeninitialisierer für GDALWrapper.Gdal.GdalInterOp hat eine Ausnahme verursacht."
bei GDALWrapper.Gdal.GdalInterOp.GDALOpen(String pszFilename, Access eAccess)
bei GDALWrapper.Gdal.GdalDataset..ctor(String filename, Access access) in F:\Entwicklung\GdalWrapper\GDAL\GdalDataset.cs:Zeile 28.
bei GDALWrapper.Gdal.GdalDataset..ctor(String filename) in F:\Entwicklung\GdalWrapper\GDAL\GdalDataset.cs:Zeile 40.
bei SharpMap.Layers.GdalRasterLayer..ctor(String strLayerName, String imageFilename)

I hope, anybode can help me.

Nov 23, 2006 at 9:08 AM
Just a hint:
Uninstall the german version of the .NET framework and install the english one. Error messages in english are much easier to google (at least you will probably get more useable results).
Furthermore you will get any upgrades and security updates quicker, since you won't have to wait for the translated versions.
Nov 23, 2006 at 11:28 AM
do you have the dll's of GDAL registered and is the PATH set correct?

Check out some other info on that:
Nov 23, 2006 at 3:08 PM
It functioned now, thanks all, which helped.

Nov 24, 2006 at 3:32 AM

Check the initialization of the static member of classes you used