687{
693
694
695 g = PG_GETARG_GSERIALIZED_P(0);
696
697
699 {
700 POSTGIS_DEBUG(4,"gserialized_get_gbox_p returned LW_FAILURE");
701 elog(ERROR, "Error in gserialized_get_gbox_p calculation.");
702 PG_RETURN_NULL();
703 }
705
706
708
710
711 g_out = geography_serialize(lwpoint);
712
713 PG_FREE_IF_COPY(g, 0);
714 PG_RETURN_POINTER(g_out);
715
716}
char * gbox_to_string(const GBOX *gbox)
Allocate a string representation of the GBOX, based on dimensionality of flags.
int gserialized_get_gbox_p(const GSERIALIZED *g, GBOX *gbox)
Read the box from the GSERIALIZED or calculate it if necessary.
int gbox_pt_outside(const GBOX *gbox, POINT2D *pt_outside)
Calculate a spherical point that falls outside the geocentric gbox.
LWPOINT * lwpoint_make2d(int32_t srid, double x, double y)