]> granicus.if.org Git - postgis/commitdiff
Remove dead code
authorPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 28 May 2015 16:30:48 +0000 (16:30 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 28 May 2015 16:30:48 +0000 (16:30 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13573 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwout_twkb.c

index ca8d1b13b63c1948f06f1b16e9f6e74e14d43149..b8f1b9062f42c2595a73bf4f5bc97215c00e9f1f 100644 (file)
@@ -172,53 +172,6 @@ static int ptarray_to_twkb_buf(const POINTARRAY *pa, TWKB_GLOBALS *globals, TWKB
        lwfree(b.buf_start);
        
        return 0;
-       
-       
-#if 0
-
-       /* Set the number of points (if it's not a POINT type) */
-       if ( register_npoints )
-       {
-               bytebuffer_append_uvarint(ts->geom_buf, pa->npoints);
-               LWDEBUGF(4, "Register npoints:%d", pa->npoints);
-       }
-
-       for ( i = 0; i < pa->npoints; i++ )
-       {
-               LWDEBUGF(4, "Writing point #%d", i);
-               double *dbl_ptr = (double*)getPoint_internal(pa, i);
-
-               /* Write this coordinate to the buffer as a varint */
-               for ( j = 0; j < ndims; j++ )
-               {
-                       /* To get the relative coordinate we don't get the distance */
-                       /* from the last point but instead the distance from our */
-                       /* last accumulated point. This is important to not build up an */
-                       /* accumulated error when rounding the coordinates */
-                       r = (int64_t) lround(globals->factor[j] * dbl_ptr[j]) - ts->accum_rels[j];
-                       LWDEBUGF(4, "deltavalue: %d, ", r);
-                       ts->accum_rels[j] += r;
-                       bytebuffer_append_varint(ts->geom_buf, r);
-               }
-
-               /* See if this coordinate expands the bounding box */
-               if( globals->variant & TWKB_BBOX )
-               {
-                       for ( j = 0; j < ndims; j++ )
-                       {
-                               if( ts->accum_rels[j] > ts->bbox_max[j] )
-                                       ts->bbox_max[j] = ts->accum_rels[j];
-
-                               if( ts->accum_rels[j] < ts->bbox_min[j] )
-                                       ts->bbox_min[j] = ts->accum_rels[j];
-                       }
-               }
-
-       }
-
-       return 0;
-       
-#endif
 }
 
 /******************************************************************