Query in Mapserver

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Query in Mapserver

Senthil Thyagarajan
This post has NOT been accepted by the mailing list yet.
I have been trying to configure a QUERY using mapserver. And while doing so I get the following error:

msQueryByPoint(): Search returned no results. No matching record(s) found.


Could anyone let me know on where am I going wrong


Below is the mapfile:

  MAP
 NAME "Fourth"                        
 UNITS dd                              
 EXTENT 58.206740 5.756104 104.793418 33.644106        
 SIZE 640 320                          
 IMAGECOLOR 200 225 255                
 IMAGETYPE gif                        

 FONTSET "C:\ms4w\Apache\htdocs\fontset.txt" # pointers to fonts


WEB
# A header/footer defined in a web object is displayed
# before/after any individual query response is made.
# It is displayed only once.
#
HEADER "C:/ms4w/Apache/htdocs/xxx/map/fourth_web_header.html"
FOOTER "C:/ms4w/Apache/htdocs/xxx/map/fourth_web_footer.html"

TEMPLATE "C:/ms4w/Apache/htdocs/xxx/map/fourth.html"          
IMAGEPATH "C:/ms4w/Apache/htdocs/tmp/"
IMAGEURL "/tmp/"                        
  END


LEGEND
IMAGECOLOR 255 255 255
STATUS ON
KEYSIZE 14 12
LABEL
  TYPE BITMAP
  SIZE SMALL
  COLOR 0 0 89
  END
 END

QUERYMAP                    
STATUS on                # draw query map
STYLE hilite             # highlight selected feature
COLOR 255 255 0          # in yellow
SIZE 320 160
END

SYMBOL

NAME "circle"
TYPE ellipse # Type of symbol

POINTS
1 1
END # end of POINTS

FILLED true
END


LAYER
NAME 'growth_1'
TYPE POINT
DUMP true
TEMPLATE fooOnlyForWMSGetFeatureInfo
# A header or footer defined at the layer level is displayed
# if that layer is a query layer. It is displayed only once.
#
HEADER "C:/ms4w/Apache/htdocs/xxx/map/fourth_cities_header.html"
FOOTER "C:/ms4w/Apache/htdocs/xxx/map/fourth_cities_footer.html"

TOLERANCE 1             # must be within 1 tolerance unit
TOLERANCEUNITS miles    # units for tolerance values is miles

EXTENT 58.206740 5.756104 104.793418 33.644106
CONNECTIONTYPE postgis
CONNECTION "dbname='postgis' host=localhost port=5432 user='postgres' password='xxxxxxx' sslmode=disable"
DATA 'the_geom FROM "growth_1" USING srid=4326'
METADATA
  'ows_title' 'growth_1'
END
STATUS ON
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END


CLASSITEM 'growth_scale'
CLASS
  NAME "growth_scale = BAD"
  EXPRESSION "BAD"
   STYLE
     SYMBOL "circle"
     SIZE 7.0
     OUTLINECOLOR 0 0 0
     COLOR 242 115 240
   END
END
CLASS
  NAME "growth_scale = EXCELLENT"
  EXPRESSION "EXCELLENT"
   STYLE
     SYMBOL "circle"
     SIZE 7.0
     OUTLINECOLOR 0 0 0
     COLOR 53 116 77
   END
END
CLASS
  NAME "growth_scale = FAIR"
  EXPRESSION "FAIR"
   STYLE
     SYMBOL "circle"
     SIZE 7.0
     OUTLINECOLOR 0 0 0
     COLOR 92 200 4
   END
END
CLASS
  NAME "growth_scale = GOOD"
  EXPRESSION "GOOD"
   STYLE
     SYMBOL "circle"
     SIZE 7.0
     OUTLINECOLOR 0 0 0
     COLOR 94 8 202
   END
END
CLASS
  NAME "growth_scale = MARGINALLY BAD"
  EXPRESSION "MARGINALLY BAD"
   STYLE
     SYMBOL "circle"
     SIZE 7.0
     OUTLINECOLOR 0 0 0
     COLOR 252 63 172
   END
END
CLASS
  NAME "growth_scale = NO DATA"
  EXPRESSION "NO DATA"
   STYLE
     SYMBOL "circle"
     SIZE 7.0
     OUTLINECOLOR 0 0 0
     COLOR 22 79 25
   END
END
CLASS
  NAME "growth_scale = POOR"
  EXPRESSION "POOR"
   STYLE
     SYMBOL "circle"
     SIZE 7.0
     OUTLINECOLOR 0 0 0
     COLOR 86 98 176
   END
END
CLASS
  NAME "growth_scale = VERY GOOD"
  EXPRESSION "VERY GOOD"
   STYLE
     SYMBOL "circle"
     SIZE 7.0
     OUTLINECOLOR 0 0 0
     COLOR 189 72 76
   END


CLASS
    # A template defined at the class level is used to display
    # the results for each reponse to a query. If a result set
    # contains N, then the template will be used N times.
    #
    TEMPLATE "C:/ms4w/Apache/htdocs/xxx/map/fourth_cities_query.html"
    STYLE
        COLOR 0 0 0     # symbol color is black
    END

END


END

END