[Mapserver-users] MapFile - DATA question
Ariel Aizemberg
aaizemberg at softhome.net
Wed Apr 9 07:30:28 PDT 2003
Good idea!!!
I tested with these examples and it works fine.
DATA "the_geom from table1"
FILTER "gid in (4,13,7)"
# FILTER "gid = 1"
# FILTER "TRUE"
I will pass the complete FILTER statment thru form variables using:
FILTER "%myfilter%"
cheers,
Ariel
Richard Greenwood wrote:
>
>>
>> > Below are a few examples of
>>
>>> changing the filter clause. The %form_variable% substitutes the value
>>> from the form variable. I tried this with the data statement, but had
>>> limited success.
>>> FILTER "pidn = '%pidn%' "
>>> FILTER "pidn like '%pidn%%' " # note the extra % for wild card
>>> FILTER "(distance (table1.the_geom, (select the_geom from table1
>>> where pidn='%pidn%')) < %rad%)"
>>
>>
>> Why with limited success?
>> Did you combine the FILTER with postgis/postgresql sucessfully?
>
>
> I got the FILTER working just fine. But the same technique was not
> working for the DATA statement. I did not work very hard at it because
> the FILTER clause did what I needed. Possibly the value that I was
> passing to the DATA statement was not getting unescaped correctly
> ("geom+from+table" instead of "geom from table" ?).
>
> In any case, my point was that it might be easier to to pass form
> variables than alter the DATA statement via the URI.
>
> Rich
>
> Richard W. Greenwood, PLS
> Greenwood Mapping, Inc.
> Rich at GreenwoodMap.com
> (307) 733-0203
> http://www.GreenwoodMap.com
More information about the MapServer-users
mailing list