[postgis-devel] Death to Pointless Operators

Paul Ramsey pramsey at opengeo.org
Sat Dec 18 13:50:51 PST 2010


On Sat, Dec 18, 2010 at 8:59 AM, Paragon Corporation <lr at pcorp.us> wrote:
> Is it really a lot of effort to keep those.  Sadly we have some examples in
> our book that use those and I can't change those chapters since they've
> already gone to final proofing.

It's not zero effort, I have to write new functions for them all. And
I have never used them in all my years of PostGIS'ing.

> We have on occasion found them useful when we only care about box checks
> really fudge factors like basic position of objects relative to another for
> say an inventory app.

You've used overleft and overright? Really? I means, yes, overlaps,
contains, within. But below? Above?

> Where is = in all of this?  It in neither of your keep or remove -- and all
> the GROUP BY etc will crumble without =.  I  know it's the same as ~, but
> you can't use ~ can you -- doesn't it have to be =.

I'm talking about the GiST index operators only. =, < and > are btree
operators, and they are a different kettle of fish. groupby and
orderby require them, even if the < and > are basically  meaningless
(just like overleft and overright!)

> If you get rid of anything you should really get rid of that ~ -- its just
> confusing because it means something completely different as Nicklas
> mentioned a while ago (when you are talking about the built-in polygon/point
> and I think even pgsphere --

~ is the opposite of @. But it can be any symbol we like. How about !@ ?

> ~ means true geometric equality.

Does it? And what means box equality?

> I say we keep these -- and BTW all those duplicated functions that cause
> code bloat that don't start with ST_ -- put them in a legacy.sql script that
> doesn't get installed by default in PostGIS 2.0.

That's book-keeping stuff, not going to happen until the underlying
things work. And I'm sure people will hate me if I do it. So maybe you
should do it? :)

> We really want to get rid of all of these because it casues unnecessary
> function bloat and confusion as to which one you should be using.

P.

> Thanks,
> Leo and Regina
>
>
>
> -----Original Message-----
> From: postgis-devel-bounces at postgis.refractions.net
> [mailto:postgis-devel-bounces at postgis.refractions.net] On Behalf Of Paul
> Ramsey
> Sent: Saturday, December 18, 2010 11:49 AM
> To: PostGIS Development Discussion
> Subject: [postgis-devel] Death to Pointless Operators
>
> Do we have to drag the following operators forward into the new regime? I
> find it hard to imagine use cases for:
>
>  << geometry_left
> &< geometry_overleft
> <<| geometry_below
> &<| geometry_overbelow
> &> geometry_overright
>>> geometry_right
> |&> geometry_overabove
> |>> geometry_above
>
> I vote that we Destroy, Destroy, Destroy, leaving behind only
>
> &&  bbox overlaps
> @  bbox within
> ~  bbox contains
> ~=  bbox same
>
> P.
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>



More information about the postgis-devel mailing list