RE [Polluriel potentiel] Re: [mapserver-users] Issue with run-time substitution?
Steve.Toutant at inspq.qc.ca
Steve.Toutant at inspq.qc.ca
Tue Aug 30 05:23:26 PDT 2011
VALIDATION should work I use it in several mapfiles with MS6.
Perhaps move the VALIDATION block before DATA, just between LAYER and
CONNECTIONTYPE
Julien Cigar <jcigar at ulb.ac.be>@lists.osgeo.org
Envoyé par : mapserver-users-bounces at lists.osgeo.org
2011-08-30 07:49
A
mapserver-users at lists.osgeo.org
cc
Objet
[Polluriel potentiel] Re: [mapserver-users] Issue with run-time
substitution?
On 08/30/2011 13:43, Stephen Davies wrote:
> 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.)
You should use a METADATA section, something like:
METADATA
"vucv_validation_pattern" '[0-9]*_[0-9]*'
END
instead of VALIDATION
>
> Cheers,
> Stephen
>
--
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110830/21ef7229/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jcigar.vcf
Type: application/octet-stream
Size: 304 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110830/21ef7229/attachment.obj>
More information about the MapServer-users
mailing list