[MS4W-Users] MS4W 3.0.x and ECW

Kalbermatten Michaël Michael.Kalbermatten at ne.ch
Wed May 30 07:15:29 EST 2012


Hello,

I am having trouble in migrating msw4 (mapserver 5.6.3, apache 2.2.15) to version 3.0.4. Indeed I have a lot of ECW raster images which are used by MapServer. This worked fine with MapServer 5.6.3, but not anymore with MapServer 6.0.2. I also saw all the licensing issue around ECW (and I am not using ECW for commercial purpose).

I tried a naughty workaround to enable ECW reading, but I cannot make it work... I just copied the needed dlls for ECW into ms4w\gdalplugins and into ms4w\Apache\cgi-bin. I know I shouldn't have done that, but this actually worked on our development server... So I did the same on another server, and that does not work.

I tried following debugging:


-       gdalinfo -formats -> OK, is showing ECW as read-write [1]

-       shp2img -> OK, is working with ECW support and produces a png file using the test.ecw


When I call MapServer through Apache, then I receive an empty transparent image...

The layer definition in the Mapfile looks like (and I know that it works, because of the shp2img test):

LAYER
  NAME "ombrage_mnt5"
  METADATA
    "wms_title" "Ombrage mnt5"
    "wms_srs" "EPSG:900913 EPSG:54004 EPSG:3785 EPSG:4326 EPSG:9814 EPSG:21781"
  END
  TYPE RASTER
  DATA "D:\Applications\wms\test.ecw"
END

I enabled debugging in the mapfile and the result is:

[Wed May 30 14:06:30 2012].43000 CGI Request 1 on process 6608
[Wed May 30 14:06:30 2012].43000 msDrawMap(): rendering using outputformat named png-24 (AGG/PNG).
[Wed May 30 14:06:30 2012].43000 msDrawMap(): WMS/WFS set-up and query, 0.000s
[Wed May 30 14:06:30 2012].43000 msDrawRasterLayerLow(ombrage_mnt5): entering.
[Wed May 30 14:06:30 2012].43000 Corrupt, empty or missing file 'D:\Applications\wms\test.ecw' for layer 'ombrage_mnt5' ... ignoring this missing data.
[Wed May 30 14:06:30 2012].43000 msDrawMap(): Layer 0 (ombrage_mnt5), 0.000s
[Wed May 30 14:06:30 2012].43000 msDrawMap(): Drawing Label Cache, 0.000s
[Wed May 30 14:06:30 2012].43000 msDrawMap() total time: 0.000s
[Wed May 30 14:06:30 2012].106000 msSaveImage(stdout) total time: 0.063s
[Wed May 30 14:06:30 2012].106000 mapserv request processing time (msLoadMap not incl.): 0.063s
[Wed May 30 14:06:30 2012].106000 msFreeMap(): freeing map at 023DBEE8.

But the image is not corrupted, not empty and not missing... Is that a MapServer compilation issue ? In other words, should I ask somebody to compile MapServer to enable ECW reading

So my question is if there is any way I can get MapServer use ECW files and if yes how? Or did I do something wrong ?

Best regards

Michael

[1]
D:\>gdalinfo --formats
Supported Formats:
  ECW (rw): ERDAS Compressed Wavelets (SDK 3.x)
  JP2ECW (rw+v): ERDAS JPEG2000 (SDK 3.x)
  VRT (rw+v): Virtual Raster
  GTiff (rw+v): GeoTIFF
  NITF (rw+v): National Imagery Transmission Format
  RPFTOC (rov): Raster Product Format TOC format
  ECRGTOC (rov): ECRG TOC format
  HFA (rw+v): Erdas Imagine Images (.img)
  SAR_CEOS (rov): CEOS SAR Image
  CEOS (rov): CEOS Image
  JAXAPALSAR (rov): JAXA PALSAR Product Reader (Level 1.1/1.5)
  GFF (rov): Ground-based SAR Applications Testbed File Format (.gff)
  ....


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20120530/fdc95a90/attachment.htm 


More information about the MS4W-Users mailing list