[mapserver-users] Re: Clipping returned WFS data to the requesting bounding box

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Wed Dec 1 21:04:09 PST 2010


It's described at:

  http://mapserver.org/input/vector/postgis.html

It's a PostGIS-only hack. I'd advocate binding a few variables like extent and scale to expressions with a special syntax. For example, [_minx] or something like that. RFC 64 makes it much easier to extend expressions like this.

Steve

________________________________________
From: Jan Hartmann [j.l.h.hartmann at uva.nl]
Sent: Tuesday, November 30, 2010 1:30 AM
To: Lime, Steve D (DNR)
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Re: Clipping returned WFS data to the    requesting bounding box

On 2010-11-29 22:11, Lime, Steve D (DNR) wrote:
> I'm not aware of any means to do this. If you're using PostGIS perhaps there's a way to use the !BOX! hack in conjunction with some of the analytical functions but it's a long shot... (see http://www.mail-archive.com/mapserver-users@lists.umn.edu/msg03006.html)
>
>

Quoting Paul Ramsey in the link above:

"
the evil "!BOX!" hack: In your data statement, if you compose it thusly:

DATA "the_geom from (select gid,the_geom from thetable where the_geom
&&  !BOX!) using unique gid"

When the postgis driver encounters the evil !BOX! it will replace it
with the current mapserver bounding box.
"

What exactly is the status of this demonic !BOX! hack? Is it described somewhere? Is the "current mapserver bounding box" queryable within MapServer itself?

Jan









More information about the MapServer-users mailing list