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

PostGIS trac at osgeo.org
Fri Sep 7 14:46:47 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:           |  
---------------------+------------------------------------------------------

Comment(by pramsey):

 Arg, this is actually a bug in lwcircstring_segmentize!
 {{{double lwcircstring_length_2d(const LWCIRCSTRING *circ)
 {
         double length = 0.0;
         LWLINE *line;
         if ( lwcircstring_is_empty(circ) )
                 return 0.0;
         line = lwcircstring_segmentize(circ, 32);
         length = lwline_length_2d(line);
         lwline_free(line);
         return length;
 }
 }}}
 Which makes me want to re-write the length function to actually work on
 arcs...! But since this bug exists back into early pre-history, I'm going
 to have to track the problem in segmentize instead for now.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1978#comment:1>
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