Ecw Problem

Topics: General Topics
Oct 26, 2006 at 1:05 PM
I use the extension for ecw, installed the ER-Mapper sdk but the map don't show me the ecw.
I tryed a very simple code

oMap.MinimumZoom = 0
oMap.BackColor = Color.White
oMap.Center = New SharpMap.Geometries.Point(2311578, 5034885)
oMap.Size = New System.Drawing.Size(mapForm.Size)

Dim olayer As New SharpMap.Layers.VectorLayer("venezia")
Dim oLayer1 As New SharpMap.Layers.EcwRasterLayer("Venezia", "d:\myworks\gis\nexusgis\Mappe\venezia.ecw")

olayer.DataSource = New SharpMap.Data.Providers.ShapeFile("d:\myworks\gis\nexusgis\Mappe\Ve730.shp")

oMap.Layers.Add(oLayer1)
oMap.Layers.Add(oLayer)

oMap.ZoomToExtents()

mapForm.Image = oMap.GetMap

oMap is a sharmap object
If I don't use the zoomtoextents metods I don't see anything but I don't receive error. Instead if I use zoomtoextents I receive the follow error :

"ECW error SetView() Error - Invalid SetView parameters or SetView not called."

I try to see if there are problem with ecw file but I open without problem with ER Viewer 7.1

I'm doing something of wrong of I must put some more instructions?
Nov 16, 2006 at 1:26 PM
Maybe ecw and shp have different coordsys?
btw: are you italian? I saw yu're using layers about venezia like me too.

bye

giovanni
Dec 7, 2006 at 9:10 AM
I have a very similar problem. Everything worked fine until yesterday. Now when I load an ecw image with ecwRasterLayer, image is draw only one time. If I try to pan or zoom, the SetView(...) function raise an exception "FatalExecutionEngineError". I have reinstall sdk and activeX control (but I am not sure that version is the same as at the first install), maybe it's a problem with DLLs version.
ActiveX control version 7, build 3.1.0.229 (NCSEcw 1.6 / NCSVersion 1.6 / NCSView 1.7 / NCSAddOns 1.7)

Does anyone have a solution or an idea ?

Thanks and sorry for my english.