Definition at line 437 of file shp2pgsql-core.c.
445 #if POSTGIS_DEBUG_LEVEL > 0
446 static int call = -1;
450 LWDEBUGF(4,
"FindPolygons[%d]: allocated space for %d rings\n", call, obj->
nParts);
457 for (pi=0; pi < obj->
nParts; pi++)
467 if (pi == obj->
nParts - 1)
485 for (vi = vs; vi < ve; vi++)
507 if (area < 0.0 || obj->nParts == 1)
509 Outer[out_index] = ring;
515 Inner[in_index] = ring;
520 LWDEBUGF(4,
"FindPolygons[%d]: found %d Outer, %d Inners\n", call, out_index, in_index);
524 for (pi = 0; pi < in_index; pi++)
528 Ring *inner = Inner[pi], *outer = NULL;
543 for (i = out_index - 1; i >= 0; i--)
547 in =
PIP(pt, Outer[i]->list, Outer[i]->n);
548 if ( in ||
PIP(pt2, Outer[i]->list, Outer[i]->n) )
567 LWDEBUGF(4,
"FindPolygons[%d]: hole %d is orphan\n", call, pi);
569 Outer[out_index] = inner;
Datum area(PG_FUNCTION_ARGS)
#define LWDEBUGF(level, msg,...)
int PIP(Point P, Point *V, int n)
PIP(): crossing number test for a point in a polygon input: P = a point, V[] = vertex points of a pol...
struct struct_ring * next
References area(), free(), struct_ring::linked, struct_ring::list, LWDEBUGF, struct_point::m, malloc(), struct_ring::n, struct_ring::next, SHPObject::nParts, SHPObject::nVertices, SHPObject::padfM, SHPObject::padfX, SHPObject::padfY, SHPObject::padfZ, SHPObject::panPartStart, PIP(), struct_point::x, struct_point::y, and struct_point::z.
Referenced by GeneratePolygonGeometry().