Ed,
 
Thanks for the reply.  Now I am truely confused!  I turned on logging to catch 
the queries from mapserver.  Here are the statements that were dumped to the 
log.  Note the section in blue worked and the section in red did NOT work.
 
2008-01-17 22:02:19 LOG:  statement: select substring(version() from 12 for 
(position('on' in version()) - 13))
2008-01-17 22:02:19 LOG:  statement: select attname from pg_attribute, 
pg_constraint, pg_class where pg_constraint.conrelid = pg_class.oid and 
pg_class.oid = pg_attribute.attrelid and pg_constraint.contype = 'p' and 
pg_constraint.conkey[1] = pg_attribute.attnum and pg_class.relname = 'main' and 
pg_table_is_visible(pg_class.oid) and pg_constraint.conkey[2] is null
2008-01-17 22:02:19 LOG:  statement: BEGIN
2008-01-17 22:02:19 LOG:  statement: DECLARE mycursor BINARY CURSOR FOR SELECT 
asbinary(force_collection(force_2d(the_geom)),'NDR'),prikey::text from main 
WHERE the_geom && setSRID('BOX3D(1590352.72000359 
431253.572104297,1590665.28836297 431442.558920703)'::BOX3D, 
find_srid('','main','the_geom') )
2008-01-17 22:02:19 LOG:  statement: FETCH ALL in mycursor
2008-01-17 22:02:19 LOG:  statement: CLOSE mycursor
2008-01-17 22:02:51 LOG:  statement: select substring(version() from 12 for 
(position('on' in version()) - 13))
2008-01-17 22:02:51 LOG:  statement: select attname from pg_attribute, 
pg_constraint, pg_class where pg_constraint.conrelid = pg_class.oid and 
pg_class.oid = pg_attribute.attrelid and pg_constraint.contype = 'p' and 
pg_constraint.conkey[1] = pg_attribute.attnum and pg_class.relname = 'main' and 
pg_table_is_visible(pg_class.oid) and pg_constraint.conkey[2] is null
2008-01-17 22:02:51 LOG:  statement: BEGIN
2008-01-17 22:02:51 LOG:  statement: DECLARE mycursor BINARY CURSOR FOR SELECT 
asbinary(force_collection(force_2d(the_geom)),'NDR'),prikey::text from main 
WHERE the_geom && setSRID('BOX3D(1588008.45730828 
429836.17098125,1593009.55105828 432859.96004375)'::BOX3D, 
find_srid('','main','the_geom') )
2008-01-17 22:02:51 LOG:  statement: FETCH ALL in mycursor
2008-01-17 22:02:51 LOG:  statement: CLOSE mycursor

I pulled both queries out of the log and both work and return data.  Both 
returned LINESTRING rows as expected and grew in row count as expected because 
the BBOX grew.  From what I can tell there is no difference between these two 
queries other than the BBOX.
 
mapserv -v:
MapServer version 5.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS 
SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
 
If postgres is returning data, but mapserver is not rendering properly; then 
could there be something wrong in config of mapserver?  Could I have something 
completely mixed up with in mapfile?
 
Thanks,
Lee

________________________________

From: Ed McNierney [mailto:[EMAIL PROTECTED]
Sent: Thu 1/17/2008 7:36 PM
To: Lee Keel; [email protected]
Subject: RE: [UMN_MAPSERVER-USERS] mapserver error



Lee -

OK, here's some hypothesizing, which is about the best we can do from
afar.

Your map request works for certain bounding boxes, but not for others.
It appears to both reliably and repeatedly work on the good bounding
boxes, and reliably and repeatably fail on the bad ones.  The layer is a
PostgreSQL layer, so each map-rendering request produces a database
query to retrieve data.

I have never tried DEBUG logging to see if reports database queries, but
if you have control over the database server you can turn on query
logging in the postgresql.conf file.  As a fallback you can look at the
map bounding box and synthesize the queries by hand, but that is prone
to error.

Something should be different between the query that results in a good
map and the query that results in a bad map.  Do both queries actually
work?  Does the data returned look different in any notable way?  What
happens?

BTW, what does "mapserv -v" from the command line return?

     - Ed

Reply via email to