[Cartoweb-users] error configuring demoEdit plugin

Oliver Christen oliver.christen at camptocamp.com
Wed Apr 28 05:58:22 EST 2010


Hi Ramkumar

If you are new to Cartoweb, it may be a good idea to do the tutorial
available there http://www.cartoweb.org/cwiki/Foss4g06Workshops (if you
havent already do it).

be sure you have read in details the chapter 2, 3 and 4 of the
documentations:
http://www.cartoweb.org/doc_head/docbook/xhtml/user.structure.html
http://www.cartoweb.org/doc_head/docbook/xhtml/user.project.html
http://www.cartoweb.org/doc_head/docbook/xhtml/user.config.html

the edit plugin only works with postgis layers.
If the data you want to edit is now in shapefile, you need to import those
shapefiles into postgis using shp2pgsql (
http://www.google.ch/search?q=shp2pgsql)

when you want to edit a layers attributes, you need to add in the mapfile
for the related layer the metadata specified in the documentation (
http://www.cartoweb.org/doc_head/docbook/xhtml/user.edit.html).
the plugin will look at these metadatas and automatically generate an html
form so people can edit the values.

several parameters are needed to configure the edit plugin, this is also
explained in the documentation
http://www.cartoweb.org/doc_head/docbook/xhtml/user.edit.html .

you can hide some parameter if you dont want people to see/edit them, or you
can change the way they are displayed (at the moment, only normal input or
textarea are supported natively, if you want to implement dropdown menu,
have a look at the wiki page
http://www.cartoweb.org/cwiki/HowToAddDropdownInEditPlugin ).

also, if your data is in lat/lon, then the postgis layer will also be in
lat/lon. You may possibly have to specify the "USING SRID" additional
parameter in your mapfile.

to enable query on the editable layers, all you have to do is to add the
following parameter to the layer in the mapfile:
TEMPLATE "ttt"

it is explained in the documentation
http://www.cartoweb.org/doc_head/docbook/xhtml/user.query.html#user.query.mapfile

regards
Oliver

2010/4/28 Ramkumar Acharyulu <ramkumaracharyulu at gmail.com>

> Hi Christen,
>
> That was really great. It just went through successfully. thanks a lot
> But, still i have some queries -
> 1) How do i fill in attributes for the features i add?
> 2) My project requirement is to handle data that is in Geography Lat/Longs.
> Also, the related files i have are
> different shapefiles (layers) and a raster file (map). How do i go about
> this. Please educate me on this as i am new to Cartoweb and Map server. I am
> going through all the help available. I found that creating a proper MAP
> file should suffice my requirement. But, what about from cartoweb's side?
> 3) If i want to enable queries in the same demoEdit project is it just
> adding the plugin name in the server_conf and client_conf files or any thing
> else?
>
> Thank you once again.
> Regards.
>
> Ramkumar.
>
>
> On Tue, Apr 27, 2010 at 12:48 PM, Oliver Christen <
> oliver.christen at camptocamp.com> wrote:
>
>>  Hi
>>
>> please check if you have an "oid" column in your table in postgres.
>> otherwise, you may try to you add a "using unique" in your data string
>> specifing the column id to use for unique identifiant.
>> edit the mapfile and look for the layers EDITPOLY, EDITLINE and EDITPOINT
>> and add the corresponding strings:
>>
>> "using unique parc_id" for EDITPOLY
>>
>> "using unique id" for EDITLINE and EDITPOINT
>>
>> like this:
>> DATA 'the_geom from (select the_geom, oid, parc_id, name, culture, surf,
>> parc_type  from edit_poly) as foo using unique parc_id'
>> DATA 'the_geom from (select the_geom, oid, id, name, length from
>> edit_line) as foo using unique id'
>> DATA 'the_geom from (select the_geom, oid, id, name, surname, place, age
>> from edit_point) as foo using unique id'
>>
>> you may also have to add "using SRID=the_data_projection" if the data
>> projection is different from your mapfile projection
>>
>> regards
>> Oliver
>>
>> ----- Original Message -----
>>  *From:* Ramkumar Acharyulu <ramkumaracharyulu at gmail.com>
>> *To:* cartoweb-users at lists.maptools.org
>> *Sent:* Tuesday, April 27, 2010 7:57 AM
>> *Subject:* [Cartoweb-users] error configuring demoEdit plugin
>>
>> Dear Bruno,
>>
>> I had a similar problem as reported by jefe, as i used CW3.5 with
>> PostGRE8.4/PostGIS 1.5.1.
>>
>> Noting from your reply i downgraded to PostGRE8.3 and PostGIS1.3.5. But
>> the problem still remains.
>> Could you please immediately help me as i need to complete a project in
>> time.
>>
>> Let me repeat the error content:
>>
>> FailureCartoWeb version: 3.5.0 [$Revision: 1.9 $]
>> > class:   SoapFaultWrapper
>> > message:   MapServer error: Error in msPOSTGISLayerRetrievePGVersion(): Error
>>
>>
>> > executing POSTGIS statement (msPOSTGISLayerRetrievePGVersion():select
>> > substring(version() from 12 for (position('on' in version()) - 13))
>> >
>> > Error in msPOSTGISLayerRetrievePGVersion(): Error executing POSTGIS statement
>>
>>
>> > (msPOSTGISLayerRetrievePGVersion():select substring(version() from 12 for
>> > (position('on' in version()) - 13))
>> >
>> > Error in msPOSTGISLayerRetrievePGVersion(): Error executing POSTGIS statement
>>
>>
>> > (msPOSTGISLayerRetrievePGVersion():select substring(version() from 12 for
>> > (position('on' in version()) - 13))
>> >
>> >
>> > Backtrace:
>> >
>> > file: 230 - C:\ms4w\apps\cartoweb3\coreplugins\images\server\ServerImages.php
>>
>>
>> > call: ServerContext->checkMsErrors()
>> >
>> > file: 311 - C:\ms4w\apps\cartoweb3\server\Cartoserver.php
>> > call: ServerImages->drawMainmap(Object(Images))
>> >
>> > file: 349 - C:\ms4w\apps\cartoweb3\server\Cartoserver.php
>>
>>
>> > call: Cartoserver->doGetMap(Object(MapRequest))
>> >
>> > file: 370 - C:\ms4w\apps\cartoweb3\server\Cartoserver.php
>>
>>
>> --
>> N. Ram kumar Acharyulu
>>
>> ------------------------------
>>
>> _______________________________________________
>> Cartoweb-users mailing list
>> Cartoweb-users at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>>
>>
>
>
> --
> N. Ram kumar Acharyulu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20100428/167f5a4e/attachment.htm 


More information about the Cartoweb-users mailing list