PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ lwpoint_construct()

LWPOINT* lwpoint_construct ( int32_t  srid,
GBOX bbox,
POINTARRAY point 
)

Definition at line 129 of file lwpoint.c.

130 {
131  LWPOINT *result;
132  lwflags_t flags = 0;
133 
134  if (point == NULL)
135  return NULL; /* error */
136 
137  result = lwalloc(sizeof(LWPOINT));
138  result->type = POINTTYPE;
139  FLAGS_SET_Z(flags, FLAGS_GET_Z(point->flags));
140  FLAGS_SET_M(flags, FLAGS_GET_M(point->flags));
141  FLAGS_SET_BBOX(flags, bbox?1:0);
142  result->flags = flags;
143  result->srid = srid;
144  result->point = point;
145  result->bbox = bbox;
146 
147  return result;
148 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:262
uint16_t lwflags_t
Definition: liblwgeom.h:299
#define FLAGS_SET_BBOX(flags, value)
Definition: liblwgeom.h:174
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:102
#define FLAGS_GET_Z(flags)
Definition: liblwgeom.h:165
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:166
void * lwalloc(size_t size)
Definition: lwutil.c:227
#define FLAGS_SET_M(flags, value)
Definition: liblwgeom.h:173
#define FLAGS_SET_Z(flags, value)
Definition: liblwgeom.h:172
lwflags_t flags
Definition: liblwgeom.h:431

References POINTARRAY::flags, FLAGS_GET_M, FLAGS_GET_Z, FLAGS_SET_BBOX, FLAGS_SET_M, FLAGS_SET_Z, lwalloc(), POINTTYPE, and result.

Referenced by BOX3D_to_LWGEOM(), GeneratePointGeometry(), geography_interpolate_points(), geography_substring(), GEOS2LWGEOM(), lwcircstring_get_lwpoint(), LWGEOM_line_interpolate_point(), LWGEOM_line_substring(), lwline_clip_to_ordinate_range(), lwline_get_lwpoint(), lwline_make_geos_friendly(), lwpoint_filterm(), lwpoint_force_dims(), lwpoint_from_twkb_state(), lwpoint_from_wkb_state(), lwpoint_make(), lwpoint_make2d(), lwpoint_make3dm(), lwpoint_make3dz(), lwpoint_make4d(), parse_geojson_multipoint(), parse_geojson_point(), parse_gml_point(), parse_kml_point(), SFCGAL2LWGEOM(), and wkt_parser_point_new().

Here is the call graph for this function:
Here is the caller graph for this function: