PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwline_construct()

LWLINE* lwline_construct ( int  srid,
GBOX bbox,
POINTARRAY points 
)

Definition at line 42 of file lwline.c.

References LWLINE::bbox, POINTARRAY::flags, LWLINE::flags, FLAGS_SET_BBOX, LINETYPE, lwalloc(), LWDEBUG, LWDEBUGF, LWLINE::points, LWLINE::srid, and LWLINE::type.

Referenced by _lwt_HealEdges(), BOX2D_to_LWGEOM(), BOX3D_to_LWGEOM(), GenerateLineStringGeometry(), GEOS2LWGEOM(), init_cg_suite(), linestring_from_pa(), lwcircstring_linearize(), lwcompound_linearize(), lwcurvepoly_construct_from_lwpoly(), LWGEOM_envelope(), LWGEOM_exteriorring_polygon(), lwgeom_from_encoded_polyline(), LWGEOM_interiorringn_polygon(), LWGEOM_line_substring(), lwgeom_segmentize_sphere(), lwgeom_split_wrapx(), lwline_clip_to_ordinate_range(), lwline_force_dims(), lwline_from_lwgeom_array(), lwline_from_lwmpoint(), lwline_from_ptarray(), lwline_from_twkb_state(), lwline_from_wkb_state(), lwline_grid(), lwline_locate_between_m(), lwline_measured_from_lwline(), lwline_remove_repeated_points(), lwline_removepoint(), lwline_segmentize2d(), lwline_set_effective_area(), lwline_simplify(), lwline_split_by_point_to(), lwmcurve_linearize(), lwt_AddPolygon(), parse_geojson_linestring(), parse_geojson_multilinestring(), parse_gml_curve(), parse_gml_line(), parse_kml_line(), path_to_geometry(), rt_raster_get_convex_hull(), rt_raster_get_envelope_geom(), RTreeCreateLeafNode(), SFCGAL2LWGEOM(), ST_BoundingDiagonal(), test_gbox_from_spherical_coordinates(), test_lwline_clip_big(), and wkt_parser_linestring_new().

43 {
44  LWLINE *result;
45  result = (LWLINE*) lwalloc(sizeof(LWLINE));
46 
47  LWDEBUG(2, "lwline_construct called.");
48 
49  result->type = LINETYPE;
50 
51  result->flags = points->flags;
52  FLAGS_SET_BBOX(result->flags, bbox?1:0);
53 
54  LWDEBUGF(3, "lwline_construct type=%d", result->type);
55 
56  result->srid = srid;
57  result->points = points;
58  result->bbox = bbox;
59 
60  return result;
61 }
#define LINETYPE
Definition: liblwgeom.h:86
uint8_t type
Definition: liblwgeom.h:418
GBOX * bbox
Definition: liblwgeom.h:420
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
int32_t srid
Definition: liblwgeom.h:421
uint8_t flags
Definition: liblwgeom.h:369
#define FLAGS_SET_BBOX(flags, value)
Definition: liblwgeom.h:148
void * lwalloc(size_t size)
Definition: lwutil.c:229
uint8_t flags
Definition: liblwgeom.h:419
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88
POINTARRAY * points
Definition: liblwgeom.h:422
Here is the call graph for this function:
Here is the caller graph for this function: