PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ lwpoint_construct_empty()

LWPOINT* lwpoint_construct_empty ( int  srid,
char  hasz,
char  hasm 
)

Definition at line 120 of file lwpoint.c.

References LWPOINT::bbox, LWPOINT::flags, gflags(), lwalloc(), LWPOINT::point, POINTTYPE, ptarray_construct(), LWPOINT::srid, and LWPOINT::type.

Referenced by centroid(), GEOS2LWGEOM(), lwgeom_construct_empty(), LWGEOM_line_interpolate_point(), lwpoint_force_dims(), lwpoint_from_twkb_state(), lwpoint_from_wkb_state(), parse_gml_point(), pointonsurface(), postgis_valid_typmod(), SFCGAL2LWGEOM(), and wkt_parser_point_new().

121 {
122  LWPOINT *result = lwalloc(sizeof(LWPOINT));
123  result->type = POINTTYPE;
124  result->flags = gflags(hasz, hasm, 0);
125  result->srid = srid;
126  result->point = ptarray_construct(hasz, hasm, 0);
127  result->bbox = NULL;
128  return result;
129 }
POINTARRAY * ptarray_construct(char hasz, char hasm, uint32_t npoints)
Construct an empty pointarray, allocating storage and setting the npoints, but not filling in any inf...
Definition: ptarray.c:62
uint8_t type
Definition: liblwgeom.h:391
POINTARRAY * point
Definition: liblwgeom.h:395
int32_t srid
Definition: liblwgeom.h:394
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
Definition: g_util.c:130
uint8_t flags
Definition: liblwgeom.h:392
GBOX * bbox
Definition: liblwgeom.h:393
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:70
void * lwalloc(size_t size)
Definition: lwutil.c:199
Here is the call graph for this function:
Here is the caller graph for this function: