<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>RE: [postgis-devel] Testing ST_LineMerge issue</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Disregard my last comment about putting the image on the ST_ISSimple.  I see you put a link to it which is good enough<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: postgis-devel-bounces@postgis.refractions.net on behalf of Obe, Regina<BR>
Sent: Fri 12/19/2008 2:17 PM<BR>
To: PostGIS Development Discussion; PostGIS Development Discussion<BR>
Subject: RE: [postgis-devel] Testing ST_LineMerge issue<BR>
<BR>
<BR>
Very cool.  Would be nice to throw those same pictures in the IsSimple section.  I think you are right that ST_IsSimple needs some work.  I didn't really have a good concept of what is meant by Simplicity and still don't.<BR>
<BR>
I was looking at what the competition was showcasing to get an idea<BR>
<A HREF="http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.spatial/rsbp4067.htm">http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.spatial/rsbp4067.htm</A><BR>
<A HREF="http://webhelp.esri.com/arcgisserver/9.3/java/index.htm#geodatabases/st_issimple.htm">http://webhelp.esri.com/arcgisserver/9.3/java/index.htm#geodatabases/st_issimple.htm</A><BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: postgis-devel-bounces@postgis.refractions.net on behalf of Kevin Neufeld<BR>
Sent: Fri 12/19/2008 2:07 PM<BR>
To: PostGIS Development Discussion<BR>
Subject: Re: [postgis-devel] Testing ST_LineMerge issue<BR>
<BR>
I find that simplicity / validity is always a big topic, so I upgraded the section (with pictures and all) in the<BR>
PostGIS docs regarding the OGC's definitions.<BR>
<BR>
<A HREF="http://postgis.refractions.net/documentation/manual-svn/ch04.html#OGC_Validity">http://postgis.refractions.net/documentation/manual-svn/ch04.html#OGC_Validity</A><BR>
<BR>
To answer your question Mark, the OGC specs say that a LINESTRING is simple if it does not pass through the same point<BR>
twice.  To me, this means self-intersections and perhaps coincident vertices.  At the moment, PostGIS returns true for<BR>
this when by rights it should be false:<BR>
SELECT issimple('LINESTRING(0 0, 1 1, 1 1, 2 2)');<BR>
  issimple<BR>
----------<BR>
  t<BR>
(1 row)<BR>
<BR>
Something to look into?  Are coincident vertices considered to be a self-intersection?<BR>
<BR>
Also, Regina, I think the examples in ST_IsSimple and ST_IsValid should be clarified.  The example in ST_Simple tests<BR>
the simplicity on a polygon, even though this will always return true.  ST_IsValid tests the validity of a linestring,<BR>
even though this will always return true (except for cases when the linestring is actually a linearring ... and even<BR>
then, I believe it just tests to see if the linestring has > 2 points).<BR>
<BR>
Cheers,<BR>
Kevin<BR>
<BR>
<BR>
Mark Cave-Ayland wrote:<BR>
> Obe, Regina wrote:<BR>
><BR>
>> Now there are 2 issues here.<BR>
>><BR>
>> 1) GEOS ST_LineMerge is obviously not smart enough to realize that<BR>
>> linemerging something like that is silly.<BR>
><BR>
> Ooops :)<BR>
><BR>
>> 2) ST_MakeLine lets you get away with creating this monstrosity.  Which<BR>
>> hmm I suppose there are reasons why someone may want to, but perhaps we<BR>
>> shouldn't go there.<BR>
><BR>
> This reminds me actually, what is the OGC-SFS take on repeated points? I<BR>
>  don't remember seeing any mention of this in any of the parser/unparser<BR>
> work I did earlier, although it seems to be required for a geometry to<BR>
> be valid. So is it also required for a geometry to be simple?<BR>
><BR>
><BR>
> ATB,<BR>
><BR>
> Mark.<BR>
><BR>
_______________________________________________<BR>
postgis-devel mailing list<BR>
postgis-devel@postgis.refractions.net<BR>
<A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>
<BR>
<BR>
<BR>
<BR>
-----------------------------------------<BR>
The substance of this message, including any attachments, may be<BR>
confidential, legally privileged and/or exempt from disclosure<BR>
pursuant to Massachusetts law. It is intended<BR>
solely for the addressee. If you received this in error, please<BR>
contact the sender and delete the material from any computer.<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>
<HTML><BODY><P><hr size=1></P>
<P><STRONG>
The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer.
</STRONG></P></BODY></HTML>

<P><hr size=1></P>
<P><STRONG><font size="2" color="339900"> Help make the earth a greener place. If at all possible resist printing this email and join us in saving paper. </p> <p> </font></STRONG></P>