From daba9669b367bff6fea6044df78ff08d62bd8c38 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Tue, 15 Mar 2005 12:24:40 +0000 Subject: [PATCH] hole-in-ring detector made more readable git-svn-id: http://svn.osgeo.org/postgis/trunk@1537 b70326c6-7e19-0410-871a-916f4a2858ee --- loader/shp2pgsql.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/loader/shp2pgsql.c b/loader/shp2pgsql.c index ec0c7821e..966e407b7 100644 --- a/loader/shp2pgsql.c +++ b/loader/shp2pgsql.c @@ -979,17 +979,19 @@ InsertPolygon(void) outer->linked++; while(outer->next) outer = outer->next; outer->next = inner; - continue; // check next hole } - - // The ring wasn't within any outer rings, - // assume it is a new outer ring. + else + { + // The ring wasn't within any outer rings, + // assume it is a new outer ring. #ifdef DEBUG - fprintf(stderr, "InsertPolygon[%d]: hole %d is orphan\n", - call, pi); + fprintf(stderr, + "InsertPolygon[%d]: hole %d is orphan\n", + call, pi); #endif - Outer[out_index] = inner; - out_index++; + Outer[out_index] = inner; + out_index++; + } } if (!dump_format) printf("'"); @@ -1383,6 +1385,9 @@ utf8 (const char *fromcode, char *inputbuf) /********************************************************************** * $Log$ + * Revision 1.83 2005/03/15 12:24:40 strk + * hole-in-ring detector made more readable + * * Revision 1.82 2005/03/14 22:02:31 strk * Fixed holes handling. * -- 2.40.0