Opening shapefiles with mapscript ms_newShapefileObj coprupting my shapefiles

Daniel Morissette dmorissette at DMSOLUTIONS.CA
Mon Nov 1 07:06:31 EST 2004


Janeks Kamerovskis wrote:
>
> Following code lines damaging my shapefiles so that stays only with 100
> bytes:
>
> ******code*********
>
> $myShapeFile = ms_newShapefileObj($pathFile, MS_SHP_POLYGON);
>

The line above tries to create a new file of type polygon. To open an
existing file you should pass -1 as the type:

$myShapeFile = ms_newShapefileObj($pathFile, -1);

Daniel
--
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the mapserver-users mailing list