[Cartoweb-users] Modify Edit plugin

Pierre GIRAUD pierre.giraud at camptocamp.com
Tue Jun 19 09:58:15 EDT 2007


I knew I should have given an example.

You can find some in the sql data supplied within the demoEdit project
in Cartoweb. Have a look at demoEdit_data.sql located in
projects/demoEdit/server_conf).
The data structure used in the demo includes an example of a trigger
called "calc_surf_edit_poly" that computes the area of the inserted or
updated feature.

Regards

Pierre

Broun Uganda wrote:
> Dear Pierre
> 'You have thrown me in the water at the deep end'  Would you give me
> an example which uses triggers in Cartoweb, so i can learn from it. Am
> new to this stuff. It is apparent from what i have read from triggers
> i need a full understanding of all the interaction between .js, php
> and postgres.
> Thanks
>
> > Date: Tue, 19 Jun 2007 09:52:30 +0200
> > From: pierre.giraud at camptocamp.com
> > To: tekuganda at hotmail.com
> > CC: cartoweb-users at lists.maptools.org
> > Subject: Re: [Cartoweb-users] Modify Edit plugin
> >
> > You should have a look at the triggers in postgreSQL.
> > This way, it should be easy for you to fill your x, y and area fields
> > on-the-fly while inserting or updating a feature.
> >
> > http://www.postgresql.org/docs/8.1/interactive/sql-createtrigger.html
> >
> > Regards
> >
> > Pierre
> >
> > Broun Uganda wrote:
> > > Hi all
> > > I would like to use the edit plugin, insert function, to insert new
> > > points, lines & polygons. For points i have x-coordinate &
> > > y-coordinate as some of the attributes of a point.
> > > If I insert a new point, its location coordinates should update the
> > > attribute table accordingly.
> > > Similarly if i insert or update a polygon, its new area (ha) should
> > > update the that polygon's attribute table.
> > > May anyone give me an idea where i can do that in the PHP file and how
> > > i can do it. I have never used PHP
> > > Thank you
> > > Broun
> > >
> > >
> ------------------------------------------------------------------------
> > > Live Earth is coming. Learn more about the hottest summer event -
> > > only on MSN. Check it out!
> > > <http://liveearth.msn.com?source=msntaglineliveearthwlm>
> > >
> ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > Cartoweb-users mailing list
> > > Cartoweb-users at lists.maptools.org
> > > http://lists.maptools.org/mailman/listinfo/cartoweb-users
> > >
> >
> >
> > --
> > _________________________________________________________
> > Pierre GIRAUD
> > Géomaticien, Analyste
> >
> > Camptocamp France SAS
> > Savoie Technolac, BP 352
> > 73377 Le Bourget du Lac, Cedex
> >
> > Tel : 00 33 4 79 44 44 93
> > Mail : pierre.giraud at camptocamp.com
> > http://www.camptocamp.com
> >
>
> ------------------------------------------------------------------------
> Hotmail to go? Get your Hotmail, news, sports and much more! Check out
> the New MSN Mobile <http://mobile.msn.com>


-- 
_________________________________________________________
Pierre GIRAUD
Géomaticien, Analyste

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex 

Tel : 00 33 4 79 44 44 93
Mail : pierre.giraud at camptocamp.com
http://www.camptocamp.com  



More information about the Cartoweb-users mailing list