Use Proj to reproject a given POINTARRAY.
Definition at line 367 of file lwgeom_in_gml.c.
368{
369 PJ *pj;
371 char text_in[16];
372 char text_out[16];
373
375 return pa;
376
378 {
380 return NULL;
381 }
382
383 snprintf(text_in, 16, "EPSG:%d", epsg_in);
384 snprintf(text_out, 16, "EPSG:%d", epsg_out);
385 pj = proj_create_crs_to_crs(NULL, text_in, text_out, NULL);
386
388 if (!lwp)
389 {
390 proj_destroy(pj);
392 return NULL;
393 }
394
396 {
397 proj_destroy(pj);
398 elog(ERROR, "gml_reproject_pa: reprojection failed");
399 return NULL;
400 }
401 proj_destroy(pj);
402 pfree(lwp);
403
404 return pa;
405}
int ptarray_transform(POINTARRAY *pa, LWPROJ *pj)
LWPROJ * lwproj_from_PJ(PJ *pj, int8_t extra_geography_data)
Allocate a new LWPROJ containing the reference to the PROJ's PJ If extra_geography_data is true,...
#define SRID_UNKNOWN
Unknown SRID value.
static void gml_lwpgerror(char *msg, __attribute__((__unused__)) int error_code)
References gml_lwpgerror(), LW_FAILURE, LW_FALSE, lwproj_from_PJ(), ptarray_transform(), and SRID_UNKNOWN.
Referenced by parse_gml_curve(), parse_gml_data(), parse_gml_line(), parse_gml_linearring(), parse_gml_patch(), parse_gml_point(), parse_gml_polygon(), and parse_gml_triangle().