<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body><div style="text-align: left;">Thank you for your proposals, i solved the problem by forcing the geometry of lines to be multiline, using this triger:<br><br></div><br>CREATE FUNCTION force_geom() RETURNS "trigger"<br> AS 'BEGIN<br> NEW.the_geom = Multi(NEW.the_geom);<br> RETURN NEW;<br> END'<br> LANGUAGE plpgsql;<br><br>Broun Uganda<br><br><br><blockquote><hr id="EC_stopSpelling">From: oliver.christen@camptocamp.com<br>To: tekuganda@hotmail.com; cartoweb-users@lists.maptools.org<br>Subject: Re: [Cartoweb-users] Edit plugin MULTILINESTRING ERROR<br>Date: Tue, 3 Jul 2007 07:53:09 +0200<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass P
{padding-right:0px;padding-left:0px;padding-bottom:0px;padding-top:0px;}
.ExternalClass
{font-size:10pt;font-family:Tahoma;}
</style>
<div><font face="Arial">im sorry, I have no idea what need to be
done.</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">so I would suggest you ask some php programmer to
investigate more indepth the problem, or you can contract us to implement
multiline support in the edit plugin</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">regards</font></div>
<div><font face="Arial">Oliver</font></div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>From:</b>
<a title="tekuganda@hotmail.com" href="mailto:tekuganda@hotmail.com">Broun
Uganda</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="oliver.christen@camptocamp.com" href="mailto:oliver.christen@camptocamp.com">Oliver Christen</a> ; <a title="cartoweb-users@lists.maptools.org" href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</a>
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Monday, July 02, 2007 6:08 PM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> RE: [Cartoweb-users] Edit plugin
MULTILINESTRING ERROR</div>
<div><br></div><br>Hi Oliver,<br>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.<br>Broun
Uganda<br><br><br><br>
<blockquote>
<hr id="EC_EC_stopSpelling">
From: <a href="mailto:oliver.christen@camptocamp.com">oliver.christen@camptocamp.com</a><br>To:
<a href="mailto:tekuganda@hotmail.com">tekuganda@hotmail.com</a>; <a href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</a><br>Subject:
Re: [Cartoweb-users] Edit plugin MULTILINESTRING ERROR<br>Date: Mon, 2 Jul
2007 16:23:27 +0200<br><br>
<style>
.ExternalClass P
{padding-right:0px;padding-left:0px;padding-bottom:0px;padding-top:0px;}
.ExternalClass
{font-size:10pt;font-family:Tahoma;}
</style>
<div><font face="Arial">maybe try 'edit_geometry_type' 'multilinestring'
</font></div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>From:</b>
<a title="tekuganda@hotmail.com" href="mailto:tekuganda@hotmail.com">Broun
Uganda</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="oliver.christen@camptocamp.com" href="mailto:oliver.christen@camptocamp.com">Oliver Christen</a> ; <a title="cartoweb-users@lists.maptools.org" href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</a>
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Monday, July 02, 2007 3:34
PM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> RE: [Cartoweb-users] Edit
plugin MULTILINESTRING ERROR</div>
<div><br></div>Hey,<br>The layer with its metadata is as below but still
giving me the same error:<br><font size="2"><em>LAYER # Links lines layer
begins here</em><br><em>NAME "Links"</em><br><em>CONNECTIONTYPE
POSTGIS</em><br><em>CONNECTION 'dbname=MU_maarten user=postgres
password={Guma}no host=localhost'</em><br><em>DATA 'the_geom from (select
the_geom, oid, gid, year, material, condition, diameter, from_node,
to_node from links) as foo'</em><br><em>TYPE LINE</em><br><em>TEMPLATE
"ttt"</em><br><em>CLASS</em><br><em>NAME
"Links"</em><br><em>STYLE</em><br><em>COLOR 100 100
100</em><br><em>OUTLINECOLOR 5 5
5</em><br><em>END</em><br><em>END</em><br><em>METADATA</em><br><em>"id_attribute_string""gid"</em><br><em>"query_returned_attributes"
"material year condition diameter"</em><br><em>'edit_table' 'links' #
PostGIS table</em><br><em>'edit_geometry_column' 'the_geom' # PostGIS
geometry column</em><br><em>'edit_geometry_type' 'line' # geometry type,
may differ from layer type in mapfile</em><br><em>'edit_srid'
'-1'</em><br><em>'edit_attributes'
'gid,id|string,material|string,year|string,condition|string,diameter|string,from_node|string,to_node|string'
# list of the editable fields</em><br><em>END</em><br></font><br>And the
constraint is<br><em>ALTER TABLE links<br> ADD CONSTRAINT
enforce_geotype_<font face="">the_geom</font> CHECK
(geometrytype(the_geom) = 'MULTILINESTRING'::text OR the_geom IS
NULL);<br></em>I changed the returntype to
multilinestring.<br> <br><em>
if (strtoupper($geometryType) ==
'LINE')<br>
return 'MULTILINESTRING';<br>
<br> return
strtoupper($geometryType);</em><br><em><br></em>Broun
Uganda<br><br><br><br>
<blockquote>
<hr id="EC_EC_EC_stopSpelling">
From: oliver.christen@camptocamp.com<br>To: tekuganda@hotmail.com;
cartoweb-users@lists.maptools.org<br>Subject: Re: [Cartoweb-users] Edit
plugin MULTILINESTRING ERROR<br>Date: Mon, 2 Jul 2007 13:59:17
+0200<br><br>
<style>
.ExternalClass P
{padding-right:0px;padding-left:0px;padding-bottom:0px;padding-top:0px;}
.ExternalClass
{font-size:10pt;font-family:Tahoma;}
</style>
<div><font face="Arial">"delicate" as "there could be side
effects".</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">the geometry definition is
$feature->WKTString</font></div>
<div><font face="Arial">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.</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">what metadata did you set for that problematic
multistring layer ?</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">regards</font></div>
<div><font face="Arial">Oliver</font></div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>From:</b>
<a title="tekuganda@hotmail.com" href="mailto:tekuganda@hotmail.com">Broun Uganda</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="oliver.christen@camptocamp.com" href="mailto:oliver.christen@camptocamp.com">Oliver Christen</a> ; <a title="cartoweb-users@lists.maptools.org" href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</a>
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Monday, July 02, 2007 1:46
PM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> RE: [Cartoweb-users]
Edit plugin MULTILINESTRING ERROR</div>
<div><br></div>Hey<br>Could you explain what you mean by
delicate,<br>I just changed the linestring to multilinestring<br>It
still returns the same error.<br>Broun Uganda<br><br><br><br>
<blockquote>
<hr id="EC_EC_EC_EC_stopSpelling">
From: <a href="mailto:oliver.christen@camptocamp.com">oliver.christen@camptocamp.com</a><br>To:
<a href="mailto:tekuganda@hotmail.com">tekuganda@hotmail.com</a>; <a href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</a><br>Subject:
Re: [Cartoweb-users] Edit plugin MULTILINESTRING ERROR<br>Date: Mon,
2 Jul 2007 08:32:59 +0200<br><br>
<style>
.ExternalClass P
{padding-right:0px;padding-left:0px;padding-bottom:0px;padding-top:0px;}
.ExternalClass
{font-size:10pt;font-family:Tahoma;}
</style>
<div><font face="Arial">Hi</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">most likely because only LINESTRING was
implemented in the plugin and not MULTILINESTRING</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">it should be possible to implemente that,
though it may be delicate.</font></div>
<div><font face="Arial">I think the code to modify is in the function
getGeometryType (ServerEdit.php)</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">regards</font></div>
<div><font face="Arial">Oliver</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial"></font> </div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>From:</b>
<a title="tekuganda@hotmail.com" href="mailto:tekuganda@hotmail.com">Broun Uganda</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="cartoweb-users@lists.maptools.org" href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</a>
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Monday, July 02, 2007
4:17 AM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> [Cartoweb-users]
Edit plugin MULTILINESTRING ERROR</div>
<div><br></div>
<div style="text-align: left;"><pre style="border: 0pt none ;">Hi all,<br>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 <span style="font-weight: bold;">linestring</span> instead of a<span style="font-weight: bold;"> multilinestring</span>? The geometry constranint is that it should return a multiline string or null but why does it return a linestring?<br>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"]</pre></div><br>Broun
Uganda<br>
<hr>
Live Earth is coming. Learn more about the hottest summer
event - only on MSN. <a href="http://liveearth.msn.com/?source=msntaglineliveearthwlm" target="_blank">Check it out!</a>
<hr>
<br>_______________________________________________<br>Cartoweb-users
mailing
list<br>Cartoweb-users@lists.maptools.org<br>http://lists.maptools.org/mailman/listinfo/cartoweb-users<br><br></blockquote></blockquote><br>
<hr>
Hotmail to go? Get your Hotmail, news, sports and much more! <a href="http://mobile.msn.com/" target="_blank">Check out the New MSN
Mobile</a> </blockquote></blockquote><br>
<hr>
Change is good. See what's different about Windows Live Hotmail. <a href="http://www.windowslive-hotmail.com/learnmore/default.html?locale=en-us&ocid=RMT_TAGLM_HMWL_reten_changegood_0607" target="_blank">Check it out!</a> </blockquote></blockquote><br>
<hr>
Make every IM count. Download Windows Live Messenger and join the i'm
Initiative now. It's free. <a href="http://im.live.com/messenger/im/home/?source=TAGWL_June07" target="_blank">Make it count!</a> </blockquote>
</blockquote><br /><hr />Live Earth is coming. Learn more about the hottest summer event - only on MSN. <a href='http://liveearth.msn.com?source=msntaglineliveearthwlm' target='_new'>Check it out!</a></body>
</html>