void lwpoly_reverse(LWPOLY *poly) { int i; if ( lwpoly_is_empty(poly) ) return; for (i=0; i<poly->nrings; i++) ptarray_reverse(poly->rings[i]); }
void lwpoly_force_clockwise(LWPOLY *poly) { int i; /* No-op empties */ if ( lwpoly_is_empty(poly) ) return; /* External ring */ if ( ptarray_isccw(poly->rings[0]) ) ptarray_reverse(poly->rings[0]); /* Internal rings */ for (i=1; i<poly->nrings; i++) if ( ! ptarray_isccw(poly->rings[i]) ) ptarray_reverse(poly->rings[i]); }
void lwcircstring_reverse(LWCIRCSTRING *curve) { ptarray_reverse(curve->points); }
void lwtriangle_reverse(LWTRIANGLE *triangle) { if( lwtriangle_is_empty(triangle) ) return; ptarray_reverse(triangle->points); }
void lwtriangle_force_clockwise(LWTRIANGLE *triangle) { if ( ptarray_isccw(triangle->points) ) ptarray_reverse(triangle->points); }
void lwline_reverse(LWLINE *line) { ptarray_reverse(line->points); }