[postgis-devel] Testing ST_LineMerge issue

Obe, Regina robe.dnd at cityofboston.gov
Fri Dec 19 11:17:35 PST 2008


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.

I was looking at what the competition was showcasing to get an idea
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.spatial/rsbp4067.htm
http://webhelp.esri.com/arcgisserver/9.3/java/index.htm#geodatabases/st_issimple.htm



-----Original Message-----
From: postgis-devel-bounces at postgis.refractions.net on behalf of Kevin Neufeld
Sent: Fri 12/19/2008 2:07 PM
To: PostGIS Development Discussion
Subject: Re: [postgis-devel] Testing ST_LineMerge issue
 
I find that simplicity / validity is always a big topic, so I upgraded the section (with pictures and all) in the 
PostGIS docs regarding the OGC's definitions.

http://postgis.refractions.net/documentation/manual-svn/ch04.html#OGC_Validity

To answer your question Mark, the OGC specs say that a LINESTRING is simple if it does not pass through the same point 
twice.  To me, this means self-intersections and perhaps coincident vertices.  At the moment, PostGIS returns true for 
this when by rights it should be false:
SELECT issimple('LINESTRING(0 0, 1 1, 1 1, 2 2)');
  issimple
----------
  t
(1 row)

Something to look into?  Are coincident vertices considered to be a self-intersection?

Also, Regina, I think the examples in ST_IsSimple and ST_IsValid should be clarified.  The example in ST_Simple tests 
the simplicity on a polygon, even though this will always return true.  ST_IsValid tests the validity of a linestring, 
even though this will always return true (except for cases when the linestring is actually a linearring ... and even 
then, I believe it just tests to see if the linestring has > 2 points).

Cheers,
Kevin


Mark Cave-Ayland wrote:
> Obe, Regina wrote:
> 
>> Now there are 2 issues here.
>>
>> 1) GEOS ST_LineMerge is obviously not smart enough to realize that
>> linemerging something like that is silly.
> 
> Ooops :)
> 
>> 2) ST_MakeLine lets you get away with creating this monstrosity.  Which
>> hmm I suppose there are reasons why someone may want to, but perhaps we
>> shouldn't go there.
> 
> This reminds me actually, what is the OGC-SFS take on repeated points? I 
>  don't remember seeing any mention of this in any of the parser/unparser 
> work I did earlier, although it seems to be required for a geometry to 
> be valid. So is it also required for a geometry to be simple?
> 
> 
> ATB,
> 
> Mark.
> 
_______________________________________________
postgis-devel mailing list
postgis-devel at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-devel




-----------------------------------------
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20081219/e6b40cd0/attachment.html>


More information about the postgis-devel mailing list