ECW raster layer in SharpMap CF v2.0

Topics: Español, General Topics, SharpMap v2.0
Jan 24, 2008 at 8:51 PM
--Pseudo-English----
Hi!
Im working with the SharpMap CF v0.9 for pocket pc, and actually i can load ecw and jp2000 files, trougth EcwRasterLayer.cs,
its possible to load an ecw file in SharpMapCF v2.0? how?

Thanks.

--Spanish--
Hola actualmente puedo cargar capas ecw con sharpMap CF 0.9 a traves de la clase EcwRasterLayer.cs, me preguntaba si se pueden
cargar con SharpMapCF v2.0, los metodos que sobrecargaba la clase EcwRasterLayer.cs(render, envelope), han desaparecido, y no se por donde empezar.
Alguien puede ayudarme?

Gracias
Apr 23, 2008 at 10:21 AM
Hi tbp, I've a problem with the compiling of the native ECW dll for Pockect PC.
I've downloaded the source code of the Image Compression SDK 3.3 from this link: http://www.ermapper.com/ProductView.aspx?t=131 but I've succesfully compiled only for Win32 but not for Windows CE/Pocket PC.
I want to generate the native ECW dll and wrap it with the EcwRasterLayer.cs like you.

Can anyone help me?

Thanks.
Apr 24, 2008 at 2:41 PM
Thanks TBP, I try this dll with the hope that my project run correctly the ecw file.
However can I receive a sample project for use this dll? I’ve Visual Studio 2005 installed and Embedded Visual C++ 4.0 with all possible sdk.
I’ve another question, It’s obligatory to install the cab file on pocket pc? It is a prerequisite or the NCSECW.dll can run without this?

Very thanks tbp!

This is your solution:

The solution only works on SharpMap 0.9. The version that you try to build is not for pocket pc, Ermapper forget the pocket pc in 2.2 version. Dont worry about this, I compiled for you an special .dll, sm.dll that constains EcwRasterLayer.cs and wrapper version of NCSECW.dll. To use it add to your project sm.dll, and NCSECW.dll.

Then you can add your raster(ecw) files to your aplication, this way:

Dim myLayer As New SharpMap.Layers.EcwRasterLayer("YourLayerPATH")
myLayer.MinVisible = 0
myLayer.MaxVisible = map.MaximumZoom
map.Layers.Add(myLayer)

Before run your application install the cab file in your PPC.


Feb 1, 2010 at 8:59 AM

Ciao!

where i can download the EcwRasterLayer.cs raster layer??  whic are the requirements in order to make it running? 

Does it works on the 0.9.0.0 version of SharpMap? 

 

Thanks

Alberto

gorni.alberto@gmail.com

Feb 1, 2010 at 9:23 AM

Ok, it´s so simple. first of all you need add both dll files (in test.rar) in your project, sharpmapCF.dll its the sharpmap library 0.9 for the compact framework. and sm.dll (allow add ecw layers).

then add your layers to the map, in this way:

 Dim myLayer As New SharpMap.Layers.EcwRasterLayer("layer name", "Path to ecw file")
 myLayer.MinVisible = 0
 myLayer.MaxVisible = _MAP.MaximumZoom
 _MAP.Layers.Add(myLayer)

You need to install cab file in order to run successfully.

Be careful with the size of the ecw layers, proyection and number of loaded layers to avoid memory leaks...

Thank you
Toño

2010/2/1 sandex <notifications@codeplex.com>

From: sandex

Ciao!

where i can download the EcwRasterLayer.cs raster layer??  whic are the requirements in order to make it running? 

Does it works on the 0.9.0.0 version of SharpMap? 

 

Thanks

Alberto

gorni.alberto@gmail.com

Read the full discussion online.

To add a post to this discussion, reply to this email (SharpMap@discussions.codeplex.com)

To start a new discussion for this project, email SharpMap@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Sep 11, 2010 at 4:08 PM
tbp wrote:

Ok, it´s so simple. first of all you need add both dll files (in test.rar) in your project, sharpmapCF.dll its the sharpmap library 0.9 for the compact framework. and sm.dll (allow add ecw layers).

then add your layers to the map, in this way:

 Dim myLayer As New SharpMap.Layers.EcwRasterLayer("layer name", "Path to ecw file")
 myLayer.MinVisible = 0
 myLayer.MaxVisible = _MAP.MaximumZoom
 _MAP.Layers.Add(myLayer)

You need to install cab file in order to run successfully.

Be careful with the size of the ecw layers, proyection and number of loaded layers to avoid memory leaks...

Thank you
Toño

2010/2/1 sandex <notifications@codeplex.com>

From: sandex

Ciao!

where i can download the EcwRasterLayer.cs raster layer??  whic are the requirements in order to make it running? 

Does it works on the 0.9.0.0 version of SharpMap? 

 

Thanks

Alberto

gorni.alberto@gmail.com

Read the full discussion online.

To add a post to this discussion, reply to this email (SharpMap@discussions.codeplex.com)

To start a new discussion for this project, email SharpMap@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


 

Hi, how can we get the test.rar file?

Sep 11, 2010 at 5:34 PM
Hi!, here is:

http://www.mediafire.com/?vaa548v3iyxjxah



2010/9/11 ozgehan <notifications@codeplex.com>

From: ozgehan

tbp wrote:

Ok, it´s so simple. first of all you need add both dll files (in test.rar) in your project, sharpmapCF.dll its the sharpmap library 0.9 for the compact framework. and sm.dll (allow add ecw layers).

then add your layers to the map, in this way:

 Dim myLayer As New SharpMap.Layers.EcwRasterLayer("layer name", "Path to ecw file")
 myLayer.MinVisible = 0
 myLayer.MaxVisible = _MAP.MaximumZoom
 _MAP.Layers.Add(myLayer)

You need to install cab file in order to run successfully.

Be careful with the size of the ecw layers, proyection and number of loaded layers to avoid memory leaks...

Thank you
Toño

2010/2/1 sandex <notifications@codeplex.com>

From: sandex

Ciao!

where i can download the EcwRasterLayer.cs raster layer??  whic are the requirements in order to make it running? 

Does it works on the 0.9.0.0 version of SharpMap? 

 

Thanks

Alberto

gorni.alberto@gmail.com

Read the full discussion online.

To add a post to this discussion, reply to this email (SharpMap@discussions.codeplex.com)

To start a new discussion for this project, email SharpMap@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


 

Hi, how can we get the test.rar file?

Read the full discussion online.

To add a post to this discussion, reply to this email (SharpMap@discussions.codeplex.com)

To start a new discussion for this project, email SharpMap@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Sep 12, 2010 at 4:07 PM

Perfect, thank you!

Sep 12, 2010 at 7:14 PM
Edited Sep 12, 2010 at 7:19 PM

Hi tbp,

I tried to insert the Bagdat Ecw (Test data) downloaded from the following url:

http://www.terracolor.net/sample_imagery.html but I get the following errror :

 

An unhandled exception of type 'System.TypeLoadException' occurred in TestSharpMapCF.exe

Additional information: Could not load type 'SharpMap.Layers.EcwRasterLayer' from assembly 'sM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

 

My code is as follows:

 

 

myMap = New SharpMap.Map(New Size(Me.Width, Me.Height))
        myMap.MinimumZoom = 0.001


        Dim myLayer As New SharpMap.Layers.VectorLayer("testShape")
        myLayer.DataSource = New SharpMap.Data.Providers.ShapeFile("Storage Card\data\test.SHP")
        myLayer.Style.Line.Width = 2
        myLayer.Style.Line.Color = Color.Black
        myLayer.Style.Fill = New SolidBrush(Color.LightGreen)
        myLayer.Style.EnableOutline = True
        myLayer.MaxVisible = 40000
        myMap.Layers.Add(myLayer)

        ' ECW Layer
        Dim myEcwLayer As New SharpMap.Layers.EcwRasterLayer("test", "Storage Card\data\test.ecw")
        myEcwLayer.MinVisible = 0
        myEcwLayer.MaxVisible = 40000
        myMap.Layers.Add(myEcwLayer)

         
        myMap.Center = New SharpMap.Geometries.Point(33, -27)
        'Set center of map
        myMap.Zoom = 2.0
        'Set zoom level
        myMap.Size = New System.Drawing.Size(300, 200)


        Me.Refresh()

 Any suggestions???

Sep 12, 2010 at 7:32 PM
have you installed the .cab file in the PPC?

2010/9/12 ozgehan <notifications@codeplex.com>

From: ozgehan

Hi tbp,

I get the following errror :

An unhandled exception of type 'System.TypeLoadException' occurred in TestSharpMapCF.exe

Additional information: Could not load type 'SharpMap.Layers.EcwRasterLayer' from assembly 'sM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

 

My code is as follows:

 

 

myMap = New SharpMap.Map(New Size(Me.Width, Me.Height))
        myMap.MinimumZoom = 0.001


        Dim myLayer As New SharpMap.Layers.VectorLayer("testShape")
        myLayer.DataSource = New SharpMap.Data.Providers.ShapeFile("Storage Card\data\test.SHP")
        myLayer.Style.Line.Width = 2
        myLayer.Style.Line.Color = Color.Black
        myLayer.Style.Fill = New SolidBrush(Color.LightGreen)
        myLayer.Style.EnableOutline = True
        myLayer.MaxVisible = 40000
        myMap.Layers.Add(myLayer)

        ' ECW Layer
        Dim myEcwLayer As New SharpMap.Layers.EcwRasterLayer("test", "Storage Card\data\test.ecw")
        myEcwLayer.MinVisible = 0
        myEcwLayer.MaxVisible = 40000
        myMap.Layers.Add(myEcwLayer)

         
        myMap.Center = New SharpMap.Geometries.Point(33, -27)
        'Set center of map
        myMap.Zoom = 2.0
        'Set zoom level
        myMap.Size = New System.Drawing.Size(300, 200)


        Me.Refresh()

 Any suggestions???

Read the full discussion online.

To add a post to this discussion, reply to this email (SharpMap@discussions.codeplex.com)

To start a new discussion for this project, email SharpMap@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Sep 12, 2010 at 8:49 PM

Yeap for sure I installed the cab into the Pocket Device. I will look for another ECW maybe the size of it (aroudn 35 MB) is high.

And besides, is there any way to use GeoTiff or some other georeferenced Raster image with the sharpMapCf or ECW is the only choice for now?

 

Thanx