[postgis-users] View Question

Joao Brezolin gispmpf at yahoo.com.br
Thu Nov 28 02:48:24 PST 2002


 Hello to all

I'm using PostGIS and Mapserver  versions 0.7.3 and 
3.6.3.

I'm tried to create a view  from the main table and
call it in the mapfile, but it doesn't work....

The code is this:

LAYER
 CONNECTIONTYPE postgis
 NAME Roads
 CONNECTION "user=postgres dbname=dbase"
 DATA "geometry_field  from table_view"
 FILTER "id_sec=1"
 STATUS  ON
 TYPE LINE
#  LABELITEM "tile_name"
 CLASS
  NAME "Road 1"
  TEMPLATE "Road_1.html"
  EXPRESSION ([tipo_log]=2)
  COLOR 85 85 85
  SYMBOL 'line'
  SIZE 10
  MINSIZE 3
  MAXSIZE 15
  OVERLAYCOLOR 168 168 0
  OVERLAYSYMBOL 0
  OVERLAYSIZE 3
  OVERLAYMINSIZE 1
  OVERLAYMAXSIZE 2
  SIZE 15
 # LABEL
 #  TYPE truetype
 #  FONT arial-bold
 #  SIZE 14
 #  ANTIALIAS
 #  COLOR 0 0 0
 #  OUTLINECOLOR 255 255 255
 #  PARTIALS OFF
 END
 CLASS
   NAME "Road"
   TEMPLATE "Road_2"
   EXPRESSION ([tipo_log]=1)
   COLOR 85 85 85
   SYMBOL 'line'
   SIZE 5
   MINSIZE 3
   MAXSIZE 15
   OVERLAYCOLOR 255 255 255
   OVERLAYSYMBOL 0
   OVERLAYSIZE 3
   OVERLAYMINSIZE 1
   OVERLAYMAXSIZE 2
   SIZE 15
 END
END

when i execute the following error apears:

msPOSTGISLayerWhichShapes(): Query error.
prep_DB:Error executing POSTGIS DECLARE statement (0.6
failed - retried 0.5 and it failed too). DECLARE
mycursor BINARY CURSOR FOR SELECT
tipo_log::text,asbinary(force_collection(force_2d(geometry_field)),'NDR'),OID::text
from table_view WHERE (id_sec=1) and (geometry_field
&& setSRID( 'BOX3D(1430.3002 760.3,1730.1002
1120.3)'::BOX3D,find_srid('','table_view','geometry_field')
))

How can i add OID and SRID comlumns on this view ?


Thanks

João 

_______________________________________________________________________
Yahoo! Acesso Grátis
Internet rápida, grátis e fácil. Faça o download do discador agora mesmo.
http://br.acesso.yahoo.com/



More information about the postgis-users mailing list