Hi, Adding a link to the same question asked earlier in gis.stackexchange: https://gis.stackexchange.com/questions/433659/mapserver-7-arithmetic-expressions-do-not-work-on-style-attributes/433664#433664.
-Jukka Rahkonen- Lähettäjä: MapServer-users <mapserver-users-boun...@lists.osgeo.org> Puolesta Andi p3 Domi Lähetetty: torstai 16. kesäkuuta 2022 12.05 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: [mapserver-users] Fwd: MapServer 7 arithmetic expressions do not work on STYLE attributes? I am trying to port my code from MapServer 5 (Oracle) to MapServer 7 (PostgreSQL), but I am encountering an issue when trying to apply arithmetic expressions in the style class. So previously in MapServer 5 I would have something like: DATA "geom from (select pk, geom, size from sizes_of_thing) USING srid 3788 version 11g" CLASS MAXSCALEDENOM 5001 STYLE COLOR [size*2] Which worked perfectly fine: But if I convert it to MapServer 7 and PostgreSQL like: DATA "geom from (select pk, geom, size from sizes_of_thing sot) USING unique pk USING srid=3788" CLASS STYLE COLOR [size*2] Throws an error such as: msPostGISLayerWhichShapes(): Error (ERROR: column "size*2" does not exist By any chance are these expressions not supported anymore in MapServer 7/PostGIS or am I doing something wrong? What I have tried so far is to write something like SIZE [size]*2 SIZE ([size]*2) create an expression like: EXPRESSION ("size2" "[size]*2") And use it in something like: SIZE [size2] create a validation variable such as: VALIDATION "size2" '[size]*2' and then SIZE [size2] But it seems like none of them work.
_______________________________________________ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users