[mapserver-users] long expression statement doesn't
Steve.Lime at dnr.state.mn.us
Thu Nov 12 17:41:15 EST 2009
I haven't spent any time with Rafael's test case (I did get it) yet so there's no need
to build another one yet. Hopefully I'll have some time in the next few days.
>>> On 11/12/2009 at 4:26 PM, in message
<4B5272969F0E4E8AA08D789C3E7502C5 at Worthlaptop>, "Worth Lutz"
<wal3 at mindspring.com> wrote:
> 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.Lime at 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
> <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
>> into a layer of the map which has its geometry data in a postgres
>> (Don't ask why two databases! We hope to move the data soon.) The
>> 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
>> reduce the number of parcels in each class to 100 and insert many
>> 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
>> Any chance you could create a simple test case showing the problem? The
>> 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.
>>>>> Rafael Szajbel <szajbel at widemann.de> 10/21/2009 6:58 AM >>>
>> 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
>> 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:
>> DATA "shapes/fs.shp"
>> NAME "FS"
>> STATUS ON
>> TYPE POLYGON
>> NAME "FS"
>> EXPRESSION ('[NR]' IN
>> 'ID1,ID2,.............................,ID1100') # <-- of course without
>> the points ;)
>> COLOR 255 255 200
>> OUTLINECOLOR 0 0 0
>> Thanks for any hint.
>> PS: It is not possible to classify on attributes.
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
More information about the mapserver-users