PostGIS  3.0.0dev-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 52 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().

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