Hopefully someone with some Mapserver knowledge can help me out as I am
having problems getting Mapserver to work with OL.

First a little background.  I have OL 2.8 rc6 up and running with multiple
layers being pulled via my WMS server (Manifold).  I have been having
problems getting Manifold to generate the tiles for ECW files so I am
turning to MapServer to hopefully solve the problem.  I am not a GIS person,
I am a web programmer, so please go easy.

Here is the output of gdalinfo on my ECW File:

Driver: ECW/ERMapper Compressed Wavelets
Files: ortho.ecw
Size is 75010, 115010
Coordinate System is:
PROJCS["NUTM17",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6269"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9108"]],
        AXIS["Lat",NORTH],
        AXIS["Long",EAST],
        AUTHORITY["EPSG","4269"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-81],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]
Origin = (646999.000000000000000,4780000.999999986000000)
Pixel Size = (0.200000000000000,-0.200000000000000)
Corner Coordinates:
Upper Left  (  646999.000, 4780001.000) ( 79d11'30.77"W, 43d 9'30.53"N)
Lower Left  (  646999.000, 4756999.000) ( 79d11'52.64"W, 42d57'5.23"N)
Upper Right (  662001.000, 4780001.000) ( 79d 0'26.85"W, 43d 9'19.50"N)
Lower Right (  662001.000, 4756999.000) ( 79d 0'50.94"W, 42d56'54.27"N)
Center      (  654500.000, 4768500.000) ( 79d 6'10.32"W, 43d 3'12.52"N)
Band 1 Block=75010x1 Type=Byte, ColorInterp=Red
  Overviews: arbitrary
Band 2 Block=75010x1 Type=Byte, ColorInterp=Green
  Overviews: arbitrary
Band 3 Block=75010x1 Type=Byte, ColorInterp=Blue
  Overviews: arbitrary


Viewing some documentation and using google, I created this map file:

MAP
        PROJECTION  "init=epsg:4326"
        END

        SIZE 256 256
        STATUS ON
        EXTENT 646999.000 4756999.000 662001.000 4780001.000

        UNITS METERS


        LAYER
            NAME "orthoEnhanced"
            TYPE RASTER
            STATUS ON
            PROJECTION "init=epsg:4326"
            END
        
            DATA "O:\ortho.ecw"
            
            
            CLASS
                STYLE
                    COLOR 110 50 100
                    OUTLINECOLOR 200 200 200
                    SYMBOL 0
                END
            END
        END 
END


And then created the layer for OpenLayers:

    var msecw = new OpenLayers.Layer.MapServer("OpenLayers WMS",
                    "http://127.0.0.1:81/cgi-bin/mapserv.exe?map=ecw.map";, {
layers: 'orthoEnhanced' });

    map.addLayer(msecw);


All of my tiles are coming blank.  Here is what Firebug says for the
MapServer requests:

http://127.0.0.1:81/cgi-bin/mapserv.exe?map=ecw.map&layers=orthoEnhanced&mode=map&map_imagetype=png&mapext=-79.162519+42.920835+-79.100019+42.983335&imgext=-79.162519+42.920835+-79.100019+42.983335&map_size=256+256&imgx=128&imgy=128&imgxy=256+256


One thing I can see is that my extents in the request are Lat Long and the
Extents in the Map file are UTM 17.  Should the map file be changed to Lat
Long? (And how do I convert the values)

If I were to hack around on the Mapserv.exe url, and remove everything in
the querystring except the following:

http://127.0.0.1:81/cgi-bin/mapserv.exe?map=ecw.map&mode=map&map_imagetype=png&layers=orthoEnhanced


then I get a picture of the full ortho.  In my mind, that means that
MapServer can read the ecw file and generate a 256X256 PNG.  

Once I append the coordinates that url, then I just get blank tiles.

Any help would be greatly appreciated!!!

Thanks,
Shawn
-- 
View this message in context: 
http://n2.nabble.com/MapServer-Layer-for-ECW-creating-blank-tiles-tp3092922p3092922.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to