[MS4W-Users] MS4W 3.0.x and ECW

Kalbermatten Michaël Michael.Kalbermatten at ne.ch
Fri Jun 1 01:10:50 EST 2012


Hi list,

For your information, the problem was due to some missing httpd conf. For the ms4w upgrade, I just took my old httpd.conf file and in this one, some lines needed by the new version were missing.

I just inserted:

# set environment vars necessary for MapServer
SetEnv PROJ_LIB "/ms4w/proj/nad/"
SetEnv PATH "/ms4w/Apache/cgi-bin/"

# parse MS4W apache conf files
include "/ms4w/httpd.d/httpd_*.conf"

# set GDAL_DATA environment variable to location of supporting gdal files
SetEnv GDAL_DATA "/ms4w/gdaldata"

# set GDAL_DRIVER_PATH environment variable for gdal plugins
SetEnv GDAL_DRIVER_PATH "/ms4w/gdalplugins"

# set the TMP environment variable that is necessary for the sqlite php extension
SetEnv TMP "/ms4w/tmp"
# set CURL_CA_BUNDLE environment variable to local CA bundle file (for Curl and SSL)
SetEnv CURL_CA_BUNDLE "/ms4w/Apache/conf/ca-bundle/cacert.pem"

And no everything is working again like a charm, reading ECW files included...

Hope it might help somebody having the same problem...

Michael

De : ms4w-users-bounces at lists.maptools.org [mailto:ms4w-users-bounces at lists.maptools.org] De la part de Kalbermatten Michaël
Envoyé : mercredi, 30 mai 2012 14:15
À : 'ms4w-users at lists.maptools.org'
Objet : [MS4W-Users] MS4W 3.0.x and ECW

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/20120601/e96faea5/attachment-0001.htm 


More information about the MS4W-Users mailing list