<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Oh, a 2d semantic on the n-d index, I see. Uh, I guess we could, because More, but maybe working on the ticket list is a better idea… </div> <div id="bloop_sign_1433953730071271936" class="bloop_sign"><div><br></div><span style="font-family:helvetica,arial;font-size:13px"></span>-- <br><span>http://postgis.net</span><div><span>http://cleverelephant.ca</span></div><div><br></div></div> <br><p style="color:#000;">On June 10, 2015 at 9:27:42 AM, Sandro Santilli (<a href="mailto:strk@keybit.net">strk@keybit.net</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>An update:
<br>I've added a |=| operator (mnemonic: it's two rotated T for time, and
<br>an equal sign forms at the center for "syncronized") that returns
<br>the same as a new ST_DistanceCPA function (distance between the points
<br>of closest approach).
<br>
<br>When building PostGIS against PostgreSQL 9.5+, this operator is capable
<br>of using an N-dimensional index (where it was added with strategy number 20).
<br>
<br>It's been an interesting excercise as it shows you can have different
<br>operators with different "distance" semantic all using the same index.
<br>I'm now wondering if we should then add <-> to the N-D operator too now.
<br>
<br>--strk;
<br>
<br>On Thu, Jun 04, 2015 at 09:37:59PM +0200, Sandro Santilli wrote:
<br>> On Thu, Jun 04, 2015 at 11:00:41AM -0700, Paul Ramsey wrote:
<br>> > Yes, I’d cry, because then KNN won’t work. You’d have to also
<br>> > figure out how to implement a closest approach model that works on index
<br>> > keys, such that the closest-approach distance between two keys was always
<br>> > less than the same distance between two actual objects. 
<br>>  
<br>> That shouldn't be a big problem.
<br>>  
<br>> Time can only make the minimum distance between two trajectories _larger_
<br>> than it is in space. That is, while spatial only minimum distance is the
<br>> distance between any point in one geometry to any point in another,
<br>> spatio-temporal one reduces the possible pairs to only those points having
<br>> the same T (M) value.
<br>>  
<br>> So by only computing the spatial distance between keys (discarding M)
<br>> would already ensure it is less (or equal) than the same distance between
<br>> any two actual objects below those keys. Maybe not optimal, but should work.
<br>>  
<br>> --strk;
<br></div></div></span></blockquote></body></html>