[Mapserver-users] PostGIS and CLass - Expression Help

Till Adams adams at terrestris.de
Tue May 4 02:56:47 PDT 2004


Dear list,

I'm stuck with making an expression on a postgis datasource (code see 
below):
I get no error but also no labels at all - and there are labels, I'm 
sure. I tried everything with quotations, capitalisation in my 
expression, etc. but still get no results :-(.

NAME "xxx"
TYPE ANNOTATION
STATUS ON
CONNECTIONTYPE postgis
CONNECTION "user=admin dbname=datasrc host=localhost"
DATA "the_geom from (select * from view_x) as foo using unique item 
using SRID=31493"

# viewx is a stored query in my database

  METADATA
   'WMS_SRS' 'epsg:31493'
   'WMS_TITLE' 'xxx'
   'WMS_FEATURE_INFO_MIME_TYPE' 'text/html'
  END

   PROJECTION
        	"init=epsg:31493"
   END	
    CLASSITEM "item_x"
    LABELITEM "label"
    LABELANGLEITEM "angle"

    CLASS
     EXPRESSION ([item_y] > 1301) # /^13/
     NAME "name"
      LABEL
       TYPE TRUETYPE
       FONT 'arial'
       SIZE 9
      COLOR 0 0 0
     END
    END
[....]

When making sth. like 'EXPRESSION /^13/' I get results and see labels on 
my map, but that's not enough for us. Maybe there's a problem because 
the data does not result from a postgres table directly?

Any ideas, hints, similar problems out there?

Thanks very much in advance!

Till





More information about the MapServer-users mailing list