[mapserver-users] question creating shapes
Vladimir Guzmán
vguzman at main-task.com
Tue Nov 20 09:42:34 PST 2001
Hello, everybody.
I would like to create a polygon shape, but I just can't make it work....
I can create point shapes (like in the mapserver example), but not
polygons......
This is the code I've tryied:
$shpFilePoligono = ms_newShapeFileObj( $shpPoligono, MS_SHP_POLYGON);
$oShp = ms_newShapeObj(MS_SHP_POLYGON);
$oLine = ms_newLineObj();
$oLine->addXY(1000000, 1000000);
$oLine->addXY(1000022, 1000014);
$oLine->addXY(1000000, 1000020);
$oLine->addXY(1000000, 1000000);
$oShp->add( $oLine );
$shpFile->addShape($oShp);
$dbfFile = dbase_create( $shpPoligono.".dbf", array(array("PROG_ID",
"N", 5, 0)));
What am I doing wrong?
Please help
Thanks in advance,
----------------
Vladimir Guzmán R
www.main-task.com
More information about the MapServer-users
mailing list