/ Check-in [c486a63c]

 ```531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 ``` ``` GeoCoord t = p->a[ii]; p->a[ii] = p->a[jj]; p->a[jj] = t; t = p->a[ii+1]; p->a[ii+1] = p->a[jj+1]; p->a[jj+1] = t; } } sqlite3_result_blob(context, p->hdr, 4+8*p->nVertex, SQLITE_TRANSIENT); sqlite3_free(p); } } /* ** Implementation of the geopoly_reverse(X) function. ** ** Reverse the order of the vertexes in polygon X. This can be used ** to convert an historical polygon that uses a clockwise rotation into ** a well-formed GeoJSON polygon that uses counter-clockwise rotation. */ static void geopolyReverseFunc( sqlite3_context *context, int argc, sqlite3_value **argv ){ GeoPoly *p = geopolyFuncParam(context, argv[0], 0); if( p ){ int ii, jj; for(ii=2, jj=p->nVertex*2 - 4; iia[ii]; p->a[ii] = p->a[jj]; p->a[jj] = t; t = p->a[ii+1]; p->a[ii+1] = p->a[jj+1]; p->a[jj+1] = t; } sqlite3_result_blob(context, p->hdr, 4+8*p->nVertex, SQLITE_TRANSIENT); sqlite3_free(p); } } ``` ``` < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ``` ```531 532 533 534 535 536 537 538 539 540 541 542 543 544 ``` ``` GeoCoord t = p->a[ii]; p->a[ii] = p->a[jj]; p->a[jj] = t; t = p->a[ii+1]; p->a[ii+1] = p->a[jj+1]; p->a[jj+1] = t; } } sqlite3_result_blob(context, p->hdr, 4+8*p->nVertex, SQLITE_TRANSIENT); sqlite3_free(p); } } ```