From 7823e2c1a78cb7a9f18174dd0b65a3b0ea23888d Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Thu, 28 May 2015 16:30:48 +0000 Subject: [PATCH] Remove dead code git-svn-id: http://svn.osgeo.org/postgis/trunk@13573 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwout_twkb.c | 47 ------------------------------------------ 1 file changed, 47 deletions(-) diff --git a/liblwgeom/lwout_twkb.c b/liblwgeom/lwout_twkb.c index ca8d1b13b..b8f1b9062 100644 --- a/liblwgeom/lwout_twkb.c +++ b/liblwgeom/lwout_twkb.c @@ -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 } /****************************************************************** -- 2.50.1