[Cartoweb-users] Modify Edit plugin

Pierre GIRAUD pierre.giraud at camptocamp.com
Wed Jun 20 04:46:03 EDT 2007


"ww-data" is the role that we often use at camptocamp. Using "postgres"
instead seems to be correct.

geomtry_column is a compulsary table for the postGIS function. If your
data comes from an import from a shapefile, you don't have to worry
about that. But if you created your own geometry tables, this won't work
if there is no entry in the geometry_column table. Please refer to the
postGIS documentation.

Regards

ps : please answer to the list, it can be useful for other people.

Broun Uganda wrote:
> Thanks Pierre
> Am not sure in that demoEdit_Schema.sql example what www-data is, it
> gives me an error ( ERROR: role "www-data" does not exist SQL state:
> 42704), in my example i replaced it with postgres. Is that a problem?
> In the same example am wonderig why you make SELECT addgeometrycolumn
> for all tables, is that important for the trigger?
> What is geometry-column to which www-data is granted SELECT?
>
> Thank you
> Broun
>
> > Date: Tue, 19 Jun 2007 15:58:15 +0200
> > From: pierre.giraud at camptocamp.com
> > To: tekuganda at hotmail.com; cartoweb-users at lists.maptools.org
> > Subject: Re: [Cartoweb-users] Modify Edit plugin
> >
> > 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
> >
>
> ------------------------------------------------------------------------
> Play free games, earn tickets, get cool prizes! Join Live Search
> Club.   Join Live Search Club!
> <http://club.live.com/home.aspx?icid=CLUB_wlmailtextlink>


-- 
_________________________________________________________
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