RFC: Change LWCURVE to LWCIRCSTRING (was Re: [postgis-devel] STYLE)
mark.cave-ayland at siriusit.co.uk
Mon Dec 22 05:22:39 PST 2008
Paul Ramsey wrote:
> On Fri, Dec 19, 2008 at 3:52 AM, Mark Cave-Ayland
> <mark.cave-ayland at siriusit.co.uk> wrote:
>> BTW I noticed your r3450 commit, and this got me thinking. One of things
>> that really trips me up at the moment is LWCURVE - why oh why was it not
>> called LWCIRCSTRING??! This tends to trip me up a lot, since SQL-MM defines
>> a curve as a LINESTRING or a CIRCULARSTRING and so makes the logic a lot
>> harder to follow when trying to map SQL types to C types.
> Hmmm, working this week, I was surprised to see my attempt to use
> LINESTRINGTYPE fail :) Perhaps it is in that tradition. Not that I
> would mind seeing the internal names harmonized with the standard
> names, for cognitive assonance.
Yeah - for me LINETYPE vs. LINESTRINGTYPE isn't really an issue since
it's clear when you come to read the code that when you see LINETYPE,
the geometry involved is a a line.
The catch with LWCURVE is that the SQL-MM spec defines a curve as a
superclass of LINESTRING and CIRCULARSTRING; and so when looking at the
code, there is immediate confusion since the name implies that the type
is a collection when in fact it is not. Changing this to LWCIRCSTRING
would both tell you immediately that its associated text is
CIRCULARSTRING, and that it is not a collection. Note that the
LWMULTICURVE (MULTICURVETYPE) already correctly uses this convention.
since it can contain curve elements which can be either a CIRCULARSTRING
or a LINESTRING.
I see that it was Mark L that originally committed the code. Mark, do
you have any comment on this?
Sirius Corporation - The Open Source Experts
T: +44 870 608 0063
More information about the postgis-devel