[mapserver-users] Add points to shape
Puneet Kishor
pkishor@GeoAnalytics.com
Thu, 16 May 2002 13:19:50 -0500
On Thursday, May 16, 2002, at 04:40 AM, Guillaume Sueur wrote:
> Thanks for that. But my points are temporary. Can I show points on the
> map
> which are nt related to a layer (for which I can just set X,Y and
> symbol) ?
create an empty "acetate" layer in your map file to hold your points and
other annotations. set its status to off. add the points to the acetate
layer, and turn the layer on.
pk/
>
> Guillaume
> ----- Original Message -----
> From: "Stepan Kafka" <stepan.kafka@centrum.cz>
> To: "Guillaume Sueur" <guillaume.sueur@khi2.fr>; "Liste MapServer"
> <mapserver-users@lists.gis.umn.edu>
> Sent: Thursday, May 16, 2002 11:33 AM
> Subject: RE: [mapserver-users] Add points to shape
>
>
>> You must add record to dbf separately by means of php_dbase modul
> functions.
>> You are also able to add attributes here etc.. at this point.
>>
>> Stepan Kafka
>>
>>> -----Původní zpráva-----
>>> Od: owner-mapserver-users@lists.gis.umn.edu
>>> [mailto:owner-mapserver-users@lists.gis.umn.edu]za uzivatele Guillaume
>>> Sueur
>>> Odesláno: 16. května 2002 10:11
>>> Komu: Liste MapServer
>>> Předmět: [mapserver-users] Add points to shape
>>>
>>>
>>> Hi there,
>>> I'm trying to build up an application able to add points to a shape
> using
>>> mapscript. I'm using these two methods :
>>>
>>> function creerPoint($Xpt,$Ypt)
>>> {
>>> GLOBAL $gpoMap;
>>>
>>> $flnShapefile = "c:\inetpub\wwwroot\ipso_facto\htdocs\data\logipro";
>>> $objShapefile = ms_newShapeFileObj( $flnShapefile, MS_SHP_POINT);
>>> $oLayer = $gpoMap->getlayerbyname(BIENS);
>>>
>>> //methode 1
>>> //$point = ms_newPointObj();
>>> //$point->setXY($Xpt,$Ypt);
>>> //$objShapefile->addPoint($point);
>>> //$objShapefile->free;
>>>
>>> //methode 2
>>> $point = ms_newPointObj();
>>> $point->setXY($Xpt,$Ypt);
>>> $line = ms_newlineObj();
>>> $shape = ms_newshapeObj(MS_SHAPE_POINT);
>>> $line->add($point);
>>> $shape->add($line);
>>> $objShapefile->addshape($shape);
>>> $objShapefile->free;
>>> }
>>>
>>> Both methods are doing the same : they add a point in the shape
>>> file, but no
>>> line in the dbf file, so the layer is corrupted and can't be opened.
>>> Addfeature seems to do the same.
>>>
>>> Any idea ?
>>>
>>> Thanks
>>>
>>> ----------------------------------------------------
>>> Guillaume SUEUR - guillaume.sueur@geosignal.fr
>>> Ingénieur développement
>>> GEOSIGNAL
>>> 25bis, avenue Marcel DASSAULT
>>> BP 5836
>>> 31505 TOULOUSE CEDEX
>>> ------------------------------------------------------
>>>
>>>
>>
>>