See ticket 2123 for an explanation of how this bug occurred... (http://trac.osgeo.org/mapserver/ticket/2123)
Steve >>> "Steve Lime" <steve.l...@dnr.state.mn.us> 11/17/09 12:01 AM >>> I was just checking out Rafael's test case. I thought it might be a lexer buffer length issue but at lease with my version of flex the entire expression string gets loaded. In the test case the expression is 23K long, a good test. Further testing shows the problem is in the parser (bison). It seems to have a maximum token size of 1024 (including \0) so anything after character 1023 is truncated. Now, how to fix... Steve >>> "Worth Lutz" <w...@mindspring.com> 11/12/09 4:22 PM >>> Steve, Did the test case Rafael Szajbel sent you which show this problem? I now have a major problem in my new PHP mapscript application with this. I can get lots of parcels selected but once the number gets over about 94 with each parcel id being 10 characters long, I start loosing the end. I can confirm that the last ones are missing. My test case does not work for postgres layers or shapefiles so the problem must be in the expression handling on mapserver. I am inserting a class in my layer and setting the expression in the form "([tag]' in '1324567543,1234567645,8766544444')". Once I exceed a certain limit, parcels are not being highlighted. I think I could peel out a test case if you have not seen it yet. -----Original Message----- From: Steve Lime [mailto:steve.l...@dnr.state.mn.us] Sent: Friday, October 23, 2009 3:34 PM To: 'Mapserver Mailinglist ENG'; Worth Lutz; 'Rafael Szajbel' Subject: RE: [mapserver-users] long expression statement doesn't workanymore As I mentioned earlier, I'd love a test case! >>> On 10/23/2009 at 1:28 PM, in message <2001f78572a34911acfba0bf7cd87...@worthlaptop>, "Worth Lutz" <w...@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-boun...@lists.osgeo.org > [mailto:mapserver-users-boun...@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 <szaj...@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@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users