[mapserver-users] PPH Mapscript - limit to number of shape objects in a layer?

Alan Hale alan.hale at btclick.com
Fri Oct 23 08:30:00 PDT 2009


Hi

I'm using PHP Mapscript to construct a layer with 2km square polygons 
based on coordinates from a database query - thus:


$i = 0;
foreach($qresult as $row) {
    $ln[$i] = ms_newLineObj();

    $X = $row[1];
    $Y = $row[2];
    $ln[$i]->addXY($X-1000,$Y-1000);
    $ln[$i]->addXY($X+1000,$Y-1000);
    $ln[$i]->addXY($X+1000,$Y+1000);
    $ln[$i]->addXY($X-1000,$Y+1000);
    $ln[$i]->addXY($X-1000,$Y-1000);

    $shp[$i] = ms_newShapeObj(MS_SHAPE_POLYGON);

    $shp[$i]->add($ln[$i]);
    $shp[$i]->set(index, $row[0]);

    $layerPoi->addFeature( $shp[$i] );
 $i++;

This seems to work fine UNTIL the query result reaches more than 11528 
rows (this number is exact). Is there a limit? Am I expecting too much here?

Many thanks

Alan Hale


__________ Information from ESET Smart Security, version of virus signature database 4536 (20091023) __________

The message was checked by ESET Smart Security.

http://www.eset.com





More information about the MapServer-users mailing list