PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ reverse_points()

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

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

Referenced by create_multipolygon(), and create_polygon().

438 {
439 
440  int i,j;
441  double temp;
442  j = num_points -1;
443  for (i=0; i <num_points; i++)
444  {
445  if (j <= i)
446  {
447  break;
448  }
449  temp = x[j];
450  x[j] = x[i];
451  x[i] = temp;
452 
453  temp = y[j];
454  y[j] = y[i];
455  y[i] = temp;
456 
457  if ( z )
458  {
459  temp = z[j];
460  z[j] = z[i];
461  z[i] = temp;
462  }
463 
464  if ( m )
465  {
466  temp = m[j];
467  m[j] = m[i];
468  m[i] = temp;
469  }
470 
471  j--;
472  }
473  return 1;
474 }
Here is the caller graph for this function: