[postgis-users] ST_Touches and line segment

Kevin Neufeld kneufeld at refractions.net
Thu Mar 19 11:05:15 PDT 2009


That might be a nice expansion (or as an array list) - I know I've come across situations where it would have been useful.

Or/And, you could provide some routines that return TRUE on successful pattern matches, ie. 
ST_MatrixMatches('101-F00-FF2','1TT-F*T-***').  In the same manner, one would only compute relate once (presumably in a 
subquery) and then compare the matrices.

-- Kevin

Martin Davis wrote:
> I've had some thoughts that it would be nice to extend the concept of 
> Intersection Matrix Pattern to allow OR combinations of patterns.  This 
> seems to indicate that it's also necessary to be able to specify 
> different patterns for different combinations of geometry dimension.
> 
> Perhaps a syntax like:
> 
> "PP:***-*1*-*** LL:1***-***-*** PL:***-1**-***"
> 
> The LP pattern can be automatically inferred from this.
> 
> Note that I'm also using a "dashed triplet" syntax, which is more 
> readable than a solid string of 9 chars (think phone numbers or IP 
> addresses)
> 
> 
> Kevin Neufeld wrote:
>> Martin Davis wrote:
>>> Kevin Neufeld wrote:
>>>>
>>>> If you have overlapping polygons then use ST_Relate with a custom 
>>>> matrix.  IE. ST_Relate(g1, g2, '****1****') will return TRUE for all 
>>>> geometry pairs where the intersection of the boundaries occur on a 
>>>> line (1).
>>> You need to know the type of the input geometries.   The above 
>>> pattern will work for polygons, but not for lines.  The L/L and P/L 
>>> situation require different patterns:
>>>
>>> L/L: 1********
>>> P/L: ***1*****
>>
>> Ah, yes, of course :)
>> The symmetric relation is also true:
>>
>> L/P: *1*******
>>
>> -- Kevin
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
> 



More information about the postgis-users mailing list