PostGIS  2.2.7dev-r@@SVN_REVISION@@
int ptarray_transform ( POINTARRAY geom,
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 gml_reproject_pa(), and lwgeom_transform().

41 {
42  int i;
43  POINT4D p;
44 
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  }
51 
52  return LW_SUCCESS;
53 }
void ptarray_set_point4d(POINTARRAY *pa, int n, const POINT4D *p4d)
Definition: lwgeom_api.c:536
#define LW_SUCCESS
Definition: liblwgeom.h:65
#define LW_FAILURE
Definition: liblwgeom.h:64
int point4d_transform(POINT4D *pt, projPJ srcpj, projPJ dstpj)
int getPoint4d_p(const POINTARRAY *pa, int n, POINT4D *point)
Definition: lwgeom_api.c:231

Here is the call graph for this function:

Here is the caller graph for this function: