PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ reverse_points()

static int reverse_points ( int  num_points,
double *  x,
double *  y,
double *  z,
double *  m 
)
static

Definition at line 449 of file pgsql2shp-core.c.

Referenced by create_multipolygon(), and create_polygon().

450 {
451 
452  int i,j;
453  double temp;
454  j = num_points -1;
455  for (i=0; i <num_points; i++)
456  {
457  if (j <= i)
458  {
459  break;
460  }
461  temp = x[j];
462  x[j] = x[i];
463  x[i] = temp;
464 
465  temp = y[j];
466  y[j] = y[i];
467  y[i] = temp;
468 
469  if ( z )
470  {
471  temp = z[j];
472  z[j] = z[i];
473  z[i] = temp;
474  }
475 
476  if ( m )
477  {
478  temp = m[j];
479  m[j] = m[i];
480  m[i] = temp;
481  }
482 
483  j--;
484  }
485  return 1;
486 }
Here is the caller graph for this function: