[mapserver-users] MapServer failing to find any result, causing WMSGetFeatureInfo hang

Paul Ramsey pramsey at cleverelephant.ca
Mon Sep 21 20:47:27 EDT 2009


Can you provide a table dump, a map file and a URL that exercise this
condition? if you can provide a minimal test case, I'll debug.

(PS, open a ticket and attach the collateral to it (dump, map file, url))

P

On Mon, Sep 21, 2009 at 5:29 PM, P Kishor <punk.kish at gmail.com> wrote:
> Greetings,
>
> I have a 1 km. sq. grid layer stored in Pg/PostGIS (8.4/1.4.0) served
> by MapServer 5.4.2. If I query for WMSGetFeatureInfo (from OpenLayers
> 2.8) while zoomed out, the following queries run in the backend, and
> xmin, xmax, ymin, ymax values are returned to the user and presented
> in a popup window by OpenLayers.
>
> statement 1a:
> select encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'base64')
> as geom,"gid" from grid_1km_cnnf where the_geom &&
> GeomFromText('POLYGON((630976.809608983
> 585638.303216044,630976.809608983 587492.192802734,632291.577207376
> 587492.192802734,632291.577207376 585638.303216044,630976.809608983
> 585638.303216044))',find_srid('','grid_1km_cnnf','the_geom'))
>
> statement 1b:
> select * from grid_1km_cnnf where false limit 0
>
> statement 1c:
> select "gid", "ID", "XMIN", "XMAX", "YMIN", "YMAX",
> encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'base64')
> as geom,"gid" from grid_1km_cnnf where "gid" = 31437
>
> Mapserver logs the following messages
>
> [Mon Sep 21 18:58:04 2009].190912 CGI Request 1 on process 56359
> [Mon Sep 21 18:58:04 2009].191385 msWMSLoadGetMapParams(): enabling
> non-square pixels.
> [Mon Sep 21 18:58:04 2009].301261 mapserv request processing time
> (msLoadMap not incl.): 0.110s
>
> My understanding is that statement 1a finds the actual grid square containing
> my click, statement 1b returns no rows at all so I don't know what it
> does, and statement 1c returns the actual attributes. All this happens
> successfully.
>
> Now, if I zoom in quite a bit and click for WMSGetFeatureInfo, the
> only statement that runs is statement 2a below. As is evident from
> MapServer logs shown below, no result is found, so my
> WMSGetFeatureInfo event keeps on waiting for something to come back.
>
> statement 2a:
> select encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'base64')
> as geom,"gid" from grid_1km_cnnf where the_geom &&
> GeomFromText('POLYGON((630616.805138803
> 580174.87136618,630616.805138803 580290.724370171,630699.037346471
> 580290.724370171,630699.037346471 580174.87136618,630616.805138803
> 580174.87136618))',find_srid('','grid_1km_cnnf','the_geom'))
>
> MapServer log, as shown below, shows that no result was returned.
>
> [Mon Sep 21 19:00:29 2009].391044 CGI Request 1 on process 56414
> [Mon Sep 21 19:00:29 2009].391503 msWMSLoadGetMapParams(): enabling
> non-square pixels.
> [Mon Sep 21 19:00:29 2009].410388 msQueryByPoint(): Search returned no
> results. No matching record(s) found.
> [Mon Sep 21 19:00:29 2009].410501 mapserv request processing time
> (msLoadMap not incl.): 0.019s
>
>
> Now, statement 2a runs fine and fast in Pgadmin3, returns a gid, and I
> can then use that gid to run the equivalent of statement 1c above and
> get back the xmin, ymin, xmax, ymax attributes, but only through
> pgadmin3. Through my map interface I get nothing back because nothing
> happens after statement 2a.
>
> I don't even know where the problem is -- doesn't seem like a problem
> with OpenLayers because all it does is send a query. Doesn’t seem to
> be a problem with Pg because if it actually got the query it would
> return a result, as it does in Pgadmin3. But, why should it be a
> problem with MapServer as all MapServer would do, if it got back a
> result from 2a, it would run the equivalent of 1b and 1c.
>
> As is, my query just hangs. Any idea what is going on?
>
> Fwiw, I don't have TOLERANCE and TOLERANCEUNITS set in my mapfile, as,
> from their description, they don't seem to apply. In any case, if not
> provided, TOLERANCE defaults to 0 for poly layers which restricts poly
> searches so that point falls within the polygon, which is what I want.
>
> I am stumped.
>
>
> --
> Puneet Kishor http://www.punkish.org
> Carbon Model http://carbonmodel.org
> Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
> Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
> Nelson Institute, UW-Madison http://www.nelson.wisc.edu
> -----------------------------------------------------------------------
> Assertions are politics; backing up assertions with evidence is science
> =======================================================================
> Sent from Madison, WI, United States
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


More information about the mapserver-users mailing list