[postgis-devel] ST_GeometryType output is this right?
Paragon Corporation
lr at pcorp.us
Sat Apr 11 22:40:49 PDT 2009
I was doing some tests on ST_GeometryType and noticed it just returns
ST_Geometry for CurvedPolygon and CircularString. I thought these are
supported in the SQL MM specs so why does it return a generic when the old
returns something more meaningful.
So not sure if this is a bug or by design? Same behavior for both 1.3 and
1.4
Example:
SELECT ST_GeometryType(geom) As newname, GeometryType(geom) as oldname
FROM ( VALUES (ST_GeomFromText('POLYGON((-0.25 -1.25,-0.25 1.25,2.5 1.25,2.5
-1.25,-0.25 -1.25),
(2.25 0,1.25 1,1.25 -1,2.25 0),(1 -1,1 1,0 0,1 -1))') ),
( ST_Point(1,2) ),
( ST_Buffer(ST_Point(1,2), 3) ),
( ST_LineToCurve(ST_Buffer(ST_Point(1,2), 3)) ) ,
( ST_LineToCurve(ST_Boundary(ST_Buffer(ST_Point(1,2), 3))) )
) As foo(geom);
Gives me:
newname | oldname
-------------+----------------
ST_Polygon | POLYGON
ST_Point | POINT
ST_Polygon | POLYGON
ST_Geometry | CURVEPOLYGON
ST_Geometry | CIRCULARSTRING
Thanks,
Regina
More information about the postgis-devel
mailing list