queryByShape raster kills CGI with greater than 345+ records selected

Burgholzer,Robert rwburgholzer at DEQ.VIRGINIA.GOV
Tue Jun 12 11:15:54 PDT 2007


I figured out how to fake the queryByFeatures with a queryByShape,
however, my CGI process is crashing when the number of records exceeds
somewhere in the neighborhood of 340.  The error I get is:

 

"CGI / FastCGI has encountered a problem and needs to close..."

 

Using mapserver 4.10.1 on Apache 2.2 in windows XP.

 

I saw a limitation in some previous posts that seemed to suggest a much
higher threshold of failure.  The interesting thing (to me) is that the
script manages to return selected records, and only bombs later on in
the process.  Does anyone have any idea as to how to work around this,
or if there is some setting that I have botched?

 

My code looks like so:

 

   $rastermap = $amap->map->getLayerByName('depart30');

   $shapemap = $amap->map->getLayerByName('selectedsegs');

   print("Result ID: $amap->lastresid <br>");

   $shapemap->open();

   $rastermap->queryByShape($shapemap->getShape(-1,$amap->lastresid));

   #$rastermap->queryByFeatures($shapemap->index);

   $shapemap->close();

   $amap->activelayer = 'depart30';

   $listobject->queryrecords = $amap->getResultArray();

   $listobject->showlist();

   $recs = count($listobject->queryrecords);

   print("$recs Results Retrieved. <br>");

 

As noted, the script executes PAST the record retrieval, prints out the
number of results that have been returned, then bombs.  

 

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Burgholzer,Robert
Sent: Tuesday, June 12, 2007 1:12 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] queryByFeatures raster

 

Or, can I fake it by using a querybyShape??

 

r.b.

 

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Burgholzer,Robert
Sent: Tuesday, June 12, 2007 1:09 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] queryByFeatures raster

 

Is it possible to do a queryByFeatures on a raster?  That is, I want to
select a shape feature, then have that used as a query shape to
summarize info in my overlapping raster.

 

I am trying this:

 

   $rastermap = $amap->map->getLayerByName('depart30');

   $shapemap = $amap->map->getLayerByName('selectedsegs');

   $rastermap->queryByShape($shapemap->index);

 

But cannot seem to retrieve any data (even though the raster is
definitely overlapping).  

 

My raster layer is a geoTiff (also tried as Gif, same result), with a
manually specified world file. The images display overlapping in the map
view window.

 

Any help would be appreciated,

 

r.b.

 

Robert W. Burgholzer

Surface Water Modeler

Office of Water Supply and Planning

Virginia Department of Environmental Quality

rwburgholzer at deq.virginia.gov

804-698-4405

Open Source Modeling Tools:

http://sourceforge.net/projects/npsource/

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070612/b1bb358b/attachment.htm>


More information about the MapServer-users mailing list