PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ ptarray_transform()

int ptarray_transform ( POINTARRAY pa,
projPJ  inpj,
projPJ  outpj 
)

Transform given POINTARRAY from inpj projection to outpj projection.

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

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

Referenced by gml_reproject_pa(), and lwgeom_transform().

54 {
55  int i;
56  POINT4D p;
57 
58  for ( i = 0; i < pa->npoints; i++ )
59  {
60  getPoint4d_p(pa, i, &p);
61  if ( ! point4d_transform(&p, inpj, outpj) ) return LW_FAILURE;
62  ptarray_set_point4d(pa, i, &p);
63  }
64 
65  return LW_SUCCESS;
66 }
void ptarray_set_point4d(POINTARRAY *pa, int n, const POINT4D *p4d)
Definition: lwgeom_api.c:549
int npoints
Definition: liblwgeom.h:370
#define LW_SUCCESS
Definition: liblwgeom.h:79
#define LW_FAILURE
Definition: liblwgeom.h:78
int point4d_transform(POINT4D *pt, projPJ srcpj, projPJ dstpj)
int getPoint4d_p(const POINTARRAY *pa, int n, POINT4D *point)
Definition: lwgeom_api.c:244
Here is the call graph for this function:
Here is the caller graph for this function: