
 Nick Parker - 2009-10-15 11:04:48
When the class meets ShapeFile record types it doesn't know 
it just gives back an empty array. Not very useful.
Here are some suggestions for modification:
Add error handling to the example:
46,53c46,48
<               if ( $shp_data === false )
<                   echo '<p>' . $record->getError() . '</p>' ;
<               else
<               {
<                   //Dump the information
<                   var_dump($dbf_data);
<                   var_dump($shp_data);
<               }
---
>               //Dump the information
>               var_dump($dbf_data);
>               var_dump($shp_data);
The record type PolygonZ is exactly the same as Polygon exacept for Z information at the end. If you're not interested in that then the following mod allows you to read the PolygonZ records:
217,218c212
<               5 => "RecordPolygon",
<               15 => "RecordPolygon");
---
>               5 => "RecordPolygon");
The function getShpData doesn't return the error condition. This modification allows it to:
276c270
<                       return ( $this->setError( sprintf(INEXISTENT_FUNCTION, $
function_name) ) ) ;
---
>                       $this->setError( sprintf(INEXISTENT_FUNCTION, $function_
name) );