PostGIS  2.5.7dev-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.

54 {
55  uint32_t 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 }
int point4d_transform(POINT4D *pt, projPJ srcpj, projPJ dstpj)
#define LW_FAILURE
Definition: liblwgeom.h:79
#define LW_SUCCESS
Definition: liblwgeom.h:80
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
Definition: lwgeom_api.c:123
void ptarray_set_point4d(POINTARRAY *pa, uint32_t n, const POINT4D *p4d)
Definition: lwgeom_api.c:435
uint32_t npoints
Definition: liblwgeom.h:374
unsigned int uint32_t
Definition: uthash.h:78

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

Referenced by gml_reproject_pa(), and lwgeom_transform().

Here is the call graph for this function:
Here is the caller graph for this function: