[mapserver-users] Fwd: Strange behavior on different zoom levels

Axel Bayerl axel.bayerl at r2software.net
Tue Jan 31 08:00:49 PST 2017


Hello,

I'm trying to diplay a raster on openlayers using wms. The problem
arises on one of the rasters which on different zoom levels displays
some tiles and the ones being displayed, doesn't correspond to the
ones next to them.

For example on zoom level 15 this image is produced:

https://i.imgur.com/OSaHxqc.png

And on zoom level 16:

https://i.imgur.com/omliU8v.png

Mapfile:
            MAP
                EXTENT -64.3842958639 -34.2139046531 -64.3584069558
-34.1902071213
                SIZE 470 532

                PROJECTION
                    "init=epsg:4326"
                END
                CONFIG "MS_ERRORFILE" "/tmp/ms_error.txt"
                DEBUG 5
                CONFIG "CPL_DEBUG" "ON"
                CONFIG "PROJ_DEBUG" "ON"

                WEB
                    METADATA
                        "ows_name"            "ec02s_medio-promedio_1"
                        "wms_title"           "ec02s_medio-promedio_1"

                        "wms_onlineresource"
"<host>?MAP=<mapfilepath>/ec02s_medio-average-relativeyield_1.map&"
                        "wms_srs"             "EPSG:4269 EPSG:4326
EPSG:3857 EPSG:32720 EPSG:900913"

                        "wms_enable_request"  "*"
                        "ows_enable_request"  "*"

                        "wms_include_items" "all"
                        "ows_include_items" "all"

                        # "wms_feature_info_mime_type" "text/plain"
                        "wms_feature_info_mime_type" "text/html"
                        # "wms_feature_info_mime_type" "application/json"
                    END
                END

                LAYER
                    NAME         "main"
                    DATA         "ec02s_medio-average-relativeyield"
                    TYPE         RASTER
                    STATUS       ON
                    PROCESSING   "BANDS=1"
                    PROCESSING "APPROXIMATION_SCALE=FULL"

                    OFFSITE 0 0 0

                    HEADER "../../mapfiles/templates/head.html"
                    TEMPLATE "../../mapfiles/templates/main.html"
                    FOOTER "../../mapfiles/templates/foot.html"

                    INCLUDE
'<mapfilepath>/ec02s_medio-average-relativeyield_1_ramp.map'


                    PROJECTION
                       AUTO
                    END
                END
            END

Rampfile:
            CLASS
                EXPRESSION ([pixel] > 4.78697947983e-05 AND [pixel] <=
2.19701147079)
                STYLE
                    COLOR 255 0 255
                END
            END

gdalinfo on the raster:

Driver: ENVI/ENVI .hdr Labelled
Files: <rasterpath>/ec02s_medio-average-relativeyield
       <rasterpath>/ec02s_medio-average-relativeyield.aux.xml
       <rasterpath>/ec02s_medio-average-relativeyield.hdr
Size is 470, 532
Coordinate System is:
PROJCS["UTM Zone 20, Southern Hemisphere",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9108"]],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-63],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["Meter",1]]
Origin = (372480.000000000000000,6215920.000000000000000)
Pixel Size = (5.000000000000000,-5.000000000000000)
Metadata:
  Band_1=Band Math (b1/0.973546)
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  372480.000, 6215920.000) ( 64d23' 2.05"W, 34d11'23.72"S)
Lower Left  (  372480.000, 6213260.000) ( 64d23' 3.47"W, 34d12'50.06"S)
Upper Right (  374830.000, 6215920.000) ( 64d21'30.27"W, 34d11'24.75"S)
Lower Right (  374830.000, 6213260.000) ( 64d21'31.65"W, 34d12'51.08"S)
Center      (  373655.000, 6214590.000) ( 64d22'16.86"W, 34d12' 7.40"S)
Band 1 Block=470x1 Type=Float32, ColorInterp=Undefined
  Description = Band Math (b1/0.973546)
  Min=0.000 Max=2.197
  Minimum=0.000, Maximum=2.197, Mean=1.000, StdDev=0.336
  NoData Value=0
  Metadata:
    STATISTICS_MAXIMUM=2.1970114707947
    STATISTICS_MEAN=0.99999959390852
    STATISTICS_MINIMUM=4.7869794798316e-05
    STATISTICS_STDDEV=0.3356240935974

If i comment the INCLUDE of the rampfile, the image is rendered pitch
black, but the whole image is displayed correctly.


More information about the mapserver-users mailing list