PostGIS
3.0.6dev-r@@SVN_REVISION@@
|
GSERIALIZED* gserialized2_from_lwgeom | ( | LWGEOM * | geom, |
size_t * | size | ||
) |
Allocate a new GSERIALIZED from an LWGEOM.
For all non-point types, a bounding box will be calculated and embedded in the serialization. The geodetic flag is used to control the box calculation (cartesian or geocentric). If set, the size pointer will contain the size of the final output, which is useful for setting the PgSQL VARSIZE information.
Definition at line 1165 of file gserialized2.c.
References LWGEOM::bbox, LWGEOM::flags, FLAGS_SET_BBOX, GSERIALIZED::gflags, gserialized2_from_extended_flags(), gserialized2_from_gbox(), gserialized2_from_lwgeom_any(), gserialized2_from_lwgeom_size(), gserialized2_set_srid(), lwalloc(), lwerror(), lwflags_get_g2flags(), lwgeom_add_bbox(), lwgeom_is_empty(), lwgeom_needs_bbox(), GSERIALIZED::size, SIZE_SET, and LWGEOM::srid.
Referenced by gserialized_from_lwgeom(), peek2_point_helper(), test_gserialized2_extended_flags(), test_gserialized2_is_empty(), test_gserialized2_peek_gbox_p_gets_correct_box(), test_gserialized2_peek_gbox_p_no_box_when_empty(), test_lwgeom_from_gserialized2(), and test_on_gser2_lwgeom_count_vertices().