1037 LWGEOM *lwgeom1, *lwgeom2;
1044 g1 = PG_GETARG_GSERIALIZED_P(0);
1045 g2 = PG_GETARG_GSERIALIZED_P(1);
1050 elog(ERROR,
"ST_Project(geography) is only valid for point inputs");
1059 PG_RETURN_POINTER(g2);
1070 elog(ERROR,
"ST_Project(geography) cannot project from an empty point");
1085 elog(ERROR,
"lwgeom_project_spheroid_lwpoint returned null");
1095 PG_FREE_IF_COPY(g1, 0);
1096 PG_FREE_IF_COPY(g2, 1);
1097 PG_RETURN_POINTER(g3);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
uint32_t gserialized_get_type(const GSERIALIZED *g)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
int32_t lwgeom_get_srid(const LWGEOM *geom)
Return SRID number.
void lwpoint_free(LWPOINT *pt)
void lwgeom_free(LWGEOM *geom)
LWPOINT * lwgeom_project_spheroid_lwpoint(const LWPOINT *from, const LWPOINT *to, const SPHEROID *spheroid, double distance)
Calculate the location of a point on a spheroid, give a start point, end point and distance.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
LWGEOM * lwpoint_as_lwgeom(const LWPOINT *obj)
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
static LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)
static double distance(double x1, double y1, double x2, double y2)