PostGIS  2.1.10dev-r@@SVN_REVISION@@
int ptarray_transform ( POINTARRAY pa,
projPJ  inpj,
projPJ  outpj 

Transform given POINTARRAY from inpj projection to outpj projection.

Definition at line 40 of file liblwgeom/lwgeom_transform.c.

References getPoint4d_p(), LW_FAILURE, LW_SUCCESS, POINTARRAY::npoints, point4d_transform(), and ptarray_set_point4d().

Referenced by lwgeom_transform().

41 {
42  int i;
43  POINT4D p;
45  for ( i = 0; i < pa->npoints; i++ )
46  {
47  getPoint4d_p(pa, i, &p);
48  if ( ! point4d_transform(&p, inpj, outpj) ) return LW_FAILURE;
49  ptarray_set_point4d(pa, i, &p);
50  }
52  return LW_SUCCESS;
53 }
void ptarray_set_point4d(POINTARRAY *pa, int n, const POINT4D *p4d)
Definition: lwgeom_api.c:501
int npoints
Definition: liblwgeom.h:327
#define LW_SUCCESS
Definition: liblwgeom.h:55
#define LW_FAILURE
Definition: liblwgeom.h:54
int point4d_transform(POINT4D *pt, projPJ srcpj, projPJ dstpj)
int getPoint4d_p(const POINTARRAY *pa, int n, POINT4D *point)
Definition: lwgeom_api.c:217

Here is the call graph for this function:

Here is the caller graph for this function: