[mapserver-users] Issue with run-time substitution?

Stephen Davies sdavies at sdc.com.au
Tue Aug 30 07:43:32 EDT 2011


I am running mapserver 6.0.1 with map files migrated from 5.6.3.

One of my map files has stopped working properly and I suspect that it may be a 
bug in the 6.0.1 run-time substitution code.

The relevant map file layer sections look like this:

   LAYER
      CONNECTIONTYPE postgis
      NAME "battery"
      DATA "geom from wmd  using unique id using SRID=4283"
      CONNECTION "user=scldad dbname=benparts"
      STATUS ON
      TYPE POINT
      VALIDATION
        vucv '[0-9]*_[0-9]*'
      END
      FILTER  (stype='B' and uc='%vucv%')
      PROJECTION
        "init=epsg:4283"
      END
      MAXSCALE 5000000
      LABELITEM "label"
      CLASSITEM "state"
      CLASS
        EXPRESSION "G"
        STYLE
          COLOR        0 255 0
          SYMBOL 'dot'
          SIZE 7
          OFFSET 17 0
        END
        LABEL
          POSITION CR
          TYPE TRUETYPE
          FONT arial
          SIZE 8
          COLOR 0 255 0
          OFFSET 20 0
          FORCE TRUE
          STYLE
                GEOMTRANSFORM 'labelpoly'
                COLOR   255 255 255
          END
        END
      END
.
.
END

There are twelve layers with essentially the same definition apart from the 
STYPE values.

The invoking URL has &vucv=137_11 but the postgresql log reveals that no 
substitution has occurred. The final pgsql command still has '%vucv%'.

I suspect that having more than one FILTER with the same substitution breaks 
things as all other substitutions work fine.

(I also tried putting the substitution in the DATA entry but with no better 
result.)

Cheers,
Stephen

-- 
=============================================================================
Stephen Davies Consulting P/L                             Voice: 08-8177 1595
Adelaide, South Australia.                                Fax  : 08-8177 0133
Records & Collections Management.                         Mobile:040 304 0583


More information about the mapserver-users mailing list