[mapserver-users] More on points not appearing in 3.6b2-win32-php4.2.1-libwww

David Turover dturover at nermal.santarosa.edu
Thu Jun 6 15:17:16 EDT 2002


Found some interesting things. The relevant PHP code is as follows:
<?
$shp = $bmLayer->getShape(-1,0);

foreach($shp->values as $key=>$value){
        echo ("Index $key is $value<br>");
}

$bounds = $shp->bounds;
echo ("<p>Bounds are $bounds->minx $bounds->miny to ".
        "$bounds->maxx $bounds->maxy</p>");

$shp->draw($map,$bmLayer,$map->draw(),0, "Test")
        or die ("Could not draw shape!");
?>

The shape's values are reported correctly.
The shape's bounds are reported as -1 -1 -1 -1
The draw() function fails and die() is called. If I'm calling draw()
wrong, I'd like to know.

I'm not sure how shapeObj bounds work, so I don't know whether the values
of -1 are appropriate (it's a point) or an error. Eventually, I will
want a way of determining the points' pixel locations on the image, and
I had assumed bounds would help with that as nothing else in the shapeObj 
API seems like it would.


As said before, the itasca airports example works fine so with this I'm 
leaning towards believing that the problem could be in my shapefile. 
The shapefile was created by ArcGIS 8.2 by being pulled from a geodatabase 
that had originally been created from several ArcGIS 8.1 shapefiles and 
bludgeoned until the separated data tables had been merged into one and 
ArcGIS declared the result to be a working feature class. It could be 
missing something that ArcGIS doesn't mind but mapserver needs.



BTW, there's a typo on the Mapserver support page (/support.html)
in the list signup instructions. Where it says "subscribe mapserver-user" 
it's missing the 's' at the end.




More information about the mapserver-users mailing list