[mapserver-users] long expression statement doesn't work anymore

Steve Lime Steve.Lime at dnr.state.mn.us
Fri Oct 23 12:34:03 PDT 2009


As I mentioned earlier, I'd love a test case!

>>> On 10/23/2009 at 1:28 PM, in message
<2001F78572A34911ACFBA0BF7CD874CC at Worthlaptop>, "Worth Lutz"
<wal3 at mindspring.com> wrote:
> I'm seeing the same (or similar) problem.
> 
> First I query a MSsql database and get a result set.  The parcel ids from
> the result set are inserted into an expression in a class which is inserted
> into a layer of the map which has its geometry data in a postgres database.
> (Don't ask why two databases!  We hope to move the data soon.)  The parcels
> are then highlighted on the map.
> 
> The problem we are seeing is when there are lots of parcels, the resulting
> map has missing parcels in the highlighted set.  My solution to this was to
> reduce the number of parcels in each class to 100 and insert many identical
> classes.  My results seem more stable but I still have and error when the
> number of parcels exceeds 500 or so.  Each parcel id is 9 characters long
> and the form of expression is "([tag] in '123456789,987654321')"
> 
> 
> 
> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org 
> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Steve Lime
> Sent: Wednesday, October 21, 2009 11:20 AM
> To: Mapserver Mailinglist ENG; Rafael Szajbel
> Subject: Re: [mapserver-users] long expression statement doesn't work
> anymore
> 
> Any chance you could create a simple test case showing the problem? The fact
> it shows some
> features is puzzling. If it was just a matter of the expression getting
> truncated then you should
> see an expression parse error.
> 
> Steve
> 
>>>> Rafael Szajbel <szajbel at widemann.de> 10/21/2009 6:58 AM >>>
> Hello,
> 
> in an older MapServer version (4.10.0) it is possible to use a very long
> Expression or Filter statement.
> 
> Like this one with over 1000 comma separated values:
> 
>       EXPRESSION ('[NR]' IN 'ID1,ID2,.................,ID1100')
> 
> This works fine:
> 
> With newer MapServer versions (whether cgi (expression in mapfile) or
> phpmapscript (expression set with setExpression)) like 5.2.1 or 5.6.0 beta3
> only o small part of the polygons appears:
> 
> 
> So is there a limit on expression statement since version 5?
> There are no errors in the log-file with debug set to 5.
> 
> This is my layer definition:
> 
>   LAYER
>          DATA "shapes/fs.shp"
>          NAME "FS"
>          STATUS ON
>          TYPE POLYGON
>          CLASS
>               NAME "FS"
>               EXPRESSION ('[NR]' IN
> 'ID1,ID2,.............................,ID1100')    # <-- of course without
> the points ;)
>               STYLE
>                     COLOR 255 255 200
>                     OUTLINECOLOR 0 0 0
>              END
>         END
>   END
> 
> Thanks for any hint.
> 
> Rafael
> 
> PS: It is not possible to classify on attributes.  
> 
> 
> 
> 
> 
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list