[mapserver-users] Postgis itemquery help

nikos at maich.gr nikos at maich.gr
Wed May 18 06:03:14 EDT 2011


  Hello,

  Am trying to perform an itemquery on a postgis layer and am getting 
 the
  following error.

  prepare_database(): Query error. Error declaring cursor: ERROR:  
 syntax
  error at or near
  "["
  LINE 1: ...the_geom)),'NDR'),gid::text from landunits WHERE
  ([cynara] >...
                                                               ^

  With query string: DECLARE mycursor BINARY CURSOR FOR SELECT
  "cynara"::text,asb
  inary(force_collection(force_2d(the_geom)),'NDR'),gid::text
  from landunits WHERE
  ([cynara] > 1.0) and (the_geom && setSRID(
  'BOX3D(338975.96875 4319199,391
  293.59375 4383580.5)'::BOX3D,-1) )

  Here's what I send to the ms cgi....

  queryfile=&img.x=225&img.y=225
  &zoomdir=0
  &zoomsize=2
  &map=/var/www/html/IUNG/IUNG.map
  &imgext=332944.031250 4319199.000000 397325.531250 4383580.500000
  &mapext=shape
  &layer=landunits
  &query_mode=itemquery
  &qlayer=landunits
  &qstring=([cynara] > 1.0)
  &qitem=cynara
  &w=450
  &h=450
  &imgxy=225.0 225.0
  &mode=itemquery
  &rnd982g=0.18569989648275098&ID=1305708848
  &fname=/IUNG/tmp/IUNG1305708848.html
  /var/www/html/IUNG/tmp/IUNG1305708848.gif

  Using mapserver  5.2.1
  The layer renders ok, and featurequeries work, so I'm thinking mapfile
  is ok...

  Would appreciate a little insight,
  thank you,

  nikos







More information about the mapserver-users mailing list