[mapserver-users] querybypoint in MS 3.5

Steve Lime steve.lime at dnr.state.mn.us
Tue Mar 19 17:20:02 EST 2002


Here's what's happening. The query is executing correctly, the problem
lies in buiding a viable extent from
the resulting point. With a single point you end up with a degenerate
extent which tends to screw things
up a bit. There are a couple of solutions.

1) omit the mapext=shapes unless you really need it
2) set CGI parameters buffer or scale so that the MapServer has
something to build the extent from in
addition to selected center point
3) set MINSCALE in the WEB object, I believe the software falls back on
that if the parameters in 2) aren't given

Steve

Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> Mark Giesbrecht <mgiesbrecht at geoarctic.com> 03/19/02 03:31PM >>>
Hi All,

Love this Mapserver; coupled with mapscript, this application is
incredible.  I'd also like to praise the developers who have made
mapserver/mapscript so great.

On that note,  I've been having some problems recently with a
cgi-based
point query that used to work with 3.4.  I can query a polygon layer,
but when it comes to a point layer, I get the following error:

mapserv(): Web application error. No way to generate a valid map
extent
from selected shapes.

As I mentioned before, this works with a polygon layer.  Below is my
cgi
call using the stock PNG
version of the Windoze binaries; the output for the executable is:

MapServer version 3.5 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ
SUPPORTS=
TTF SUPPORTS=WMS_SERVER INPUT=TIFF INPUT=EPPL7 INPUT=JPEG
INPUT=SHAPEFILE

Any pointers would be greatly appreciated.

CGI call:
http://www/cgi-bin/mapserver/ms35png/mapserv.exe?map=c:/program 
files/apache
group/apache/htdocs/clientdemos/eman/eman_mscr.map&layer=Stations&mode=query&imgsize=692+560&img.x=210&img.y=261&imgext=-2980391.5374492323+11401587.175669793+4678530.106513312+5199369.812202809&mapext=shape&map_scalebar_status=ON

Included is the layer from my mapfile

LAYER
  NAME 'Stations'
  TYPE POINT
  STATUS ON
  DATA "C:/program files/apache
group/apache/htdocs/clientdemos/eman/data/environment/climate/ga00002d"
  TOLERANCE 10
  HEADER 'queries/stations-header.htm'
      LABELITEM "STATION_ID"
      CLASS
        TEMPLATE
'http://www/clientdemos/eman/scripts/climatestn.php?station_id=[STATION_ID]'


 NAME 'Climate Stations'
        COLOR 17 225 132
        OUTLINECOLOR 128 128 128
 SYMBOL "circle"
 SIZE 9
 LABEL
  ANTIALIAS TRUE
  #FORCE TRUE
  SIZE 7
  COLOR 15 15 15
  FONT fritqat
  TYPE TRUETYPE
  #OUTLINECOLOR 128 128 128  #-1 -1 -1 #255 255 255
  POSITION AUTO
 END
     END  # CLASS

END  # LAYER


--
Mark Giesbrecht, M.Sc.
GIS Programmer/Analyst






More information about the mapserver-users mailing list