[Mapserver-users] Expressions with PostGIS

Vladimir Guzmán bigfoot at main-task.com
Fri Jul 30 05:03:16 PDT 2004


Hello.
Maybe you could try:
DATA "the geom from (select the_geom, pop_cy,oid FROM tracts_c) as foo 
using unique oid"

Hope that helps,

-- 
Vladimir Ilich Guzmán R.
------------------------
http://maintask.com 


Randy Page wrote:

> Hi All,
>
> I’m having a heck of a time getting a basic expression to work with 
> data stored in PostGIS. I have a census tract layer that I wish to 
> display thematically by assigning a value range for a given variable. 
> But, I can’t seem to get the expression formatted correctly. Below is 
> a snip from the mapfile:
>
> LAYER
>
> NAME "thematic_test"
>
> STATUS default
>
> CONNECTIONTYPE postgis
>
> CONNECTION "user=nifty dbname=tiger host=localhost"
>
> DATA "the_geom from tracts_c"
>
> TYPE POLYGON
>
> CLASSITEM "pop_cy”
>
> CLASS
>
> NAME "range1"
>
> EXPRESSION “[pop_cy] > 1000 AND [pop_cy] < 5000”
>
> COLOR 255 0 0
>
> END
>
> Any hints would be greatly appreciated.
>
> Thanks,
>
> Randy
>





More information about the MapServer-users mailing list