[postgis-devel] [PostGIS] #1978: STLength of three-point closed circularstrings incorrect

PostGIS trac at osgeo.org
Wed Sep 5 14:48:33 PDT 2012


#1978: STLength of three-point closed circularstrings incorrect
---------------------+------------------------------------------------------
 Reporter:  pnalos   |       Owner:  pramsey
     Type:  defect   |      Status:  new    
 Priority:  medium   |   Milestone:         
Component:  postgis  |     Version:  2.0.x  
 Keywords:           |  
---------------------+------------------------------------------------------
 Q: SELECT PostGIS_full_version();
 A: "POSTGIS="2.0.0 r9605" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.8.0, 6
 March 2012" GDAL="GDAL 1.9.0, released 2011/12/29" LIBXML="2.7.8"
 LIBJSON="UNKNOWN" RASTER"

 Q: select ST_Length(ST_GeomFromText('CIRCULARSTRING(0 0,1 0,0 0)',0))
 A: 1.0 <--- incorrect, should be pi

 If I split the geometry into two parts:
 Q: select ST_Length(ST_GeomFromText('CIRCULARSTRING(0.5 -0.5,1 0,0.5 0.5,0
 0,0.5 -0.5)',0))
 A: 3.14127725093278 <--- correct

 Apologies if this has been solved; I don't have the latest release or svn
 head installed.

 Aside: My previous PostGIS ("POSTGIS="1.5.0" GEOS="3.2.0-CAPI-1.6.0"
 PROJ="Rel. 4.6.1, 21 August 2008" LIBXML="2.7.6" USE_STATS") returns zero
 for all circularstring length queries I could think of.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1978>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list