[Cartoweb-users] edit plugin edition of the attributes
Claire Chastagnol
chastagnol.claire at wanadoo.fr
Tue Aug 5 08:48:33 EDT 2008
<!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; mso-bidi-font-size:12.0pt; font-family:Arial; mso-fareast-font-family:"Times New Roman"; mso-bidi-font-family:"Times New Roman";} @page Section1 {size:612.0pt 792.0pt; margin:70.85pt 70.85pt 70.85pt 70.85pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} --> Hi,
I have a little question on the edit plugin.
My layer to edit is part of a database. I would like to edit some attributes wich are part of other tables (non geographic) while I'm editing my geographic layer.
Is this possible?
I tried with a query in the mapfile which join the tables, but I can't edit the attributes which aren't in the table corresponding to the layer I am editing.
This is my mapfile:
LAYER
NAME "evenements"
TYPE POINT
STATUS ON
TEMPLATE 'ttt'
CONNECTIONTYPE POSTGIS
CONNECTION 'dbname=crises_route user=myuser password=mypassword host=localhost'
DATA "geo FROM (SELECT geo,evenements.id_ev,type_ev FROM evenements JOIN type_ev ON evenements.id_ev = type_ev.id_type_ev) as foo USING UNIQUE id_ev USING SRID = 27573"
CLASS
NAME "inondation"
STYLE
COLOR 204 51 204
END
END
METADATA
'id_attribute_string' 'evenements.id_ev'
'query_returned_attributes' 'evenements.id_ev type_ev description'
'edit_table' 'evenements' # PostGIS table
'edit_geometry_column' 'geo' # PostGIS geometry column
'edit_geometry_type' 'point' # PostGIS geometry type
'edit_srid' '27573'
'edit_attributes' 'evenements.id_ev,type_ev|string,description|string' # list of the editable
END
also tried the query: DATA "geo FROM (SELECT geo,evenements.id_ev,type_ev FROM evenements, type_ev WHERE evenements.id_ev = type_ev.id_type_ev) as foo USING UNIQUE id_ev USING SRID = 27573"
But this creates an error message which says:
Postgresql reports the error as 'ERREUR: find_srid() - couldnt find the corresponding SRID - is the geometry registered in the GEOMETRY_COLUMNS table? Is there an uppercase/lowercase missmatch?
But my SRID is the same in my mapfile and my database!!!
Thank you for the help.
Claire
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20080805/44a32f31/attachment.html
More information about the Cartoweb-users
mailing list