[mapserver-users] Can Mapserver expressions contain parens?

Stephen Woodbridge woodbri at swoodbridge.com
Fri Nov 4 17:17:32 PDT 2016


Thanks Lars,

I ended up loading the files into postgis and adding new columns and 
populating them then extracting back to a shapefile. I probably could 
have done the same with ogr2ogr.

It just seems like we have basic expressions in mapserver and I had 
forgotten that some tags only take [ATTRIBUTE] and not a full expression.

Cheers,
   -Steve W

On 11/4/2016 3:20 PM, lars.schylberg at blixtmail.se wrote:
> In this case I would do the computation in a OGR SQL request to create a
> new variable.
> The SQL computation could also be done in a VRT.
>
> Lars S.
> -----Originalmeddelande-----
>> Från: "Stephen Woodbridge" <woodbri at swoodbridge.com
> <mailto:woodbri at swoodbridge.com>>
>> Till: mapserver-users at lists.osgeo.org
> <mailto:mapserver-users at lists.osgeo.org>
>> Datum: 2016-11-04 16:17
>> Ämne: Re: [mapserver-users] Can Mapserver expressions contain parens?
>>
>> Ok, on an issue with parens as I reorged the expression to
>> ([FEATWIDTH]*10+4) and still get an error:
>>
>> getSymbol(): Symbol definition error. Parsing error near
>> ([FEATWIDTH]*10+4):(line 1620)
>>
>> So maybe expressions are not allowed on WIDTH?
>>
>> -Steve W
>>
>> On 11/4/2016 10:43 AM, Stephen Woodbridge wrote:
>> > I'm trying to use a style like:
>> >
>> >       STYLE
>> >         COLOR "#000000"
>> >         WIDTH (([FEATWIDTH]+.4)*10)
>> >       END
>> >
>> > but I'm getting:
>> >
>> > getSymbol(): Symbol definition error. Parsing error near
>> > (([FEATWIDTH]+.4)*10):(line 1620)
>> >
>> >
>> > MapServer version 6.4.1 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
>> > SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS
>> > SUPPORTS=SVGCAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER
>> > SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS
>> > INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>> >
>> > -Steve W


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the mapserver-users mailing list