2463 int n_args = PG_NARGS();
2466 for(i=0; i<n_args; i++)
2468 seri_geoms[i] = PG_GETARG_GSERIALIZED_P(i);
2490 if(srids[0] != srids[i])
2502 PG_FREE_IF_COPY(seri_geoms[j], j);
2505 lwpgerror(
"Empty geometry");
2510 lwpgerror(
"Argument must be POINT geometries");
2515 lwpgerror(
"Operation on mixed SRID geometries");
2520 for(i=0; i<n_args; i++)
2526 for (j=0;j<n_args;j++)
2527 PG_FREE_IF_COPY(seri_geoms[j], j);
2528 lwpgerror(
"Error unserializing geometry");
2537 lwpgerror(
"Error extracting point");
2563 result += (result<0) * 2 * M_PI ;
2564 PG_RETURN_FLOAT8(result);
int32_t gserialized_get_srid(const GSERIALIZED *s)
Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function)...
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
int gserialized_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
uint32_t gserialized_get_type(const GSERIALIZED *s)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
int azimuth_pt_pt(const POINT2D *p1, const POINT2D *p2, double *ret)
Compute the azimuth of segment AB in radians.
int getPoint2d_p(const POINTARRAY *pa, uint32_t n, POINT2D *point)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)