Opened 12 years ago

Closed 11 years ago

#157 closed defect (fixed)

ST_GeometryType output doesn't correctly identify curved geometries

Reported by: robe Owned by: robe
Priority: low Milestone: PostGIS 1.4.1
Component: postgis Version: 1.4
Keywords: Cc:

Description

Both in 1.3 and 1.4SVN but we decided to not fix 1.3

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

Change History (3)

comment:1 Changed 12 years ago by robe

Owner: changed from pramsey to robe

comment:2 Changed 11 years ago by pramsey

This function is defined as a SQL wrapper on top of geometrytype() and as a result will not be transparently upgraded with a 1.4.1 library upgrade. Word of warning.

comment:3 Changed 11 years ago by pramsey

Resolution: fixed
Status: newclosed

Patched in trunk at r4752 and in 1.4 branch at r4753

Note: See TracTickets for help on using tickets.