[mapserver-users] PostGIS Data Query vs Expression

Lime, Steve D (MNIT) Steve.Lime at state.mn.us
Fri Feb 7 08:05:47 PST 2014


Anything you can do in the data definition limits the number of features sent over the network, so that's preferable. Class expressions are generally used to sort features you want to draw differently.

Steve

From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Travis Kirstine
Sent: Friday, February 07, 2014 9:51 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] PostGIS Data Query vs Expression

What is the best practice for using selecting data with a where clause in MapServer using PostGIS connection

i.e.

DATA "the_geom from (SELECT gid, the_geom FROM audience_table WHERE audience = 'Farmers') as foo using unique gid using SRID=4326"

OR

DATA "the_geom from audience_table using SRID=4326"

with a class expression

CLASSITEM audience
....
EXPRESSION 'Farmer'

Thanks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140207/c8f8a068/attachment.html>


More information about the mapserver-users mailing list