[Cartoweb-users] Edit plugin MULTILINESTRING ERROR

Broun Uganda tekuganda at hotmail.com
Mon Jul 2 12:08:19 EDT 2007


Hi Oliver,
I do have the edit plugin in my project, but i have modified it and nothing changes.  I have also renamed the edit plugin in the plugins folder so it is not in use,It is apparent the changes need to be made else where.Broun Uganda


From: oliver.christen at camptocamp.comTo: tekuganda at hotmail.com; cartoweb-users at lists.maptools.orgSubject: Re: [Cartoweb-users] Edit plugin MULTILINESTRING ERRORDate: Mon, 2 Jul 2007 16:23:27 +0200



maybe try 'edit_geometry_type' 'multilinestring' 

----- Original Message ----- 
From: Broun Uganda 
To: Oliver Christen ; cartoweb-users at lists.maptools.org 
Sent: Monday, July 02, 2007 3:34 PM
Subject: RE: [Cartoweb-users] Edit plugin MULTILINESTRING ERROR
Hey,The layer with its metadata is as below but still giving me the same error:LAYER # Links lines layer begins hereNAME "Links"CONNECTIONTYPE POSTGISCONNECTION 'dbname=MU_maarten user=postgres password={Guma}no host=localhost'DATA 'the_geom from (select the_geom, oid, gid, year, material, condition, diameter, from_node, to_node from links) as foo'TYPE LINETEMPLATE "ttt"CLASSNAME "Links"STYLECOLOR 100 100 100OUTLINECOLOR 5 5 5ENDENDMETADATA"id_attribute_string""gid""query_returned_attributes" "material year condition diameter"'edit_table' 'links' # PostGIS table'edit_geometry_column' 'the_geom' # PostGIS geometry column'edit_geometry_type' 'line' # geometry type, may differ from layer type in mapfile'edit_srid' '-1''edit_attributes' 'gid,id|string,material|string,year|string,condition|string,diameter|string,from_node|string,to_node|string' # list of the editable fieldsENDAnd the constraint isALTER TABLE links  ADD CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'MULTILINESTRING'::text OR the_geom IS NULL);I changed the returntype to multilinestring.         if (strtoupper($geometryType) == 'LINE')            return 'MULTILINESTRING';                return  strtoupper($geometryType);Broun Uganda


From: oliver.christen at camptocamp.comTo: tekuganda at hotmail.com; cartoweb-users at lists.maptools.orgSubject: Re: [Cartoweb-users] Edit plugin MULTILINESTRING ERRORDate: Mon, 2 Jul 2007 13:59:17 +0200


"delicate" as "there could be side effects".
 
the geometry definition is $feature->WKTString
that wkt seems to ge generated based on the 'edit_geometry_column' metadata for the related layer or, if it is not set, on the "edit_geometry_type" metadata for the related layer.
 
what metadata did you set for that problematic multistring layer ?
 
regards
Oliver

----- Original Message ----- 
From: Broun Uganda 
To: Oliver Christen ; cartoweb-users at lists.maptools.org 
Sent: Monday, July 02, 2007 1:46 PM
Subject: RE: [Cartoweb-users] Edit plugin MULTILINESTRING ERROR
HeyCould you explain what you mean by delicate,I just changed the linestring to multilinestringIt still returns the same error.Broun Uganda


From: oliver.christen at camptocamp.comTo: tekuganda at hotmail.com; cartoweb-users at lists.maptools.orgSubject: Re: [Cartoweb-users] Edit plugin MULTILINESTRING ERRORDate: Mon, 2 Jul 2007 08:32:59 +0200


Hi
 
most likely because only LINESTRING was implemented in the plugin and not MULTILINESTRING
 
it should be possible to implemente that, though it may be delicate.
I think the code to modify is in the function getGeometryType (ServerEdit.php)
 
regards
Oliver
 
 

----- Original Message ----- 
From: Broun Uganda 
To: cartoweb-users at lists.maptools.org 
Sent: Monday, July 02, 2007 4:17 AM
Subject: [Cartoweb-users] Edit plugin MULTILINESTRING ERROR

Hi all,May some one advise me what the error is in this case. Every time i move a line in my edit i get this error below. why does it return a linestring instead of a multilinestring? The geometry constranint is that it should return a multiline string or null but why does it return a linestring?UPDATE public.links SET the_geom = GeometryFromText('LINESTRING(493630.4177779367 1995850.7688888889,493350.18066688 1995824.71352007)', -1) , id = '53', year = '1978', material = 'Ceramic', condition = 'Fair', diameter = '255', from_node = '18', to_node = '17' WHERE gid = 43 [nativecode=ERROR:  new row for relation "links" violates check constraint "enforce_geotype_the_geom"]Broun Uganda

Live Earth is coming.  Learn more about the hottest summer event - only on MSN. Check it out! 

_______________________________________________Cartoweb-users mailing listCartoweb-users at lists.maptools.orghttp://lists.maptools.org/mailman/listinfo/cartoweb-users

Hotmail to go? Get your Hotmail, news, sports and much more! Check out the New MSN Mobile 

Change is good. See what's different about Windows Live Hotmail. Check it out! 
_________________________________________________________________
With Windows Live Hotmail, you can personalize your inbox with your favorite color.
www.windowslive-hotmail.com/learnmore/personalize.html?locale=en-us&ocid=TXT_TAGLM_HMWL_reten_addcolor_0607
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20070702/804eea78/attachment.html


More information about the Cartoweb-users mailing list