PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ lw_curvering_getfirstpoint2d_cp()

static const POINT2D * lw_curvering_getfirstpoint2d_cp ( LWGEOM geom)
static

Definition at line 886 of file measures.c.

887{
888 switch (geom->type)
889 {
890 case LINETYPE:
891 return getPoint2d_cp(((LWLINE *)geom)->points, 0);
892 case CIRCSTRINGTYPE:
893 return getPoint2d_cp(((LWCIRCSTRING *)geom)->points, 0);
894 case COMPOUNDTYPE:
895 {
896 LWCOMPOUND *comp = (LWCOMPOUND *)geom;
897 LWLINE *line = (LWLINE *)(comp->geoms[0]);
898 return getPoint2d_cp(line->points, 0);
899 }
900 default:
901 lwerror("lw_curvering_getfirstpoint2d_cp: unknown type");
902 }
903 return NULL;
904}
#define COMPOUNDTYPE
Definition liblwgeom.h:124
#define LINETYPE
Definition liblwgeom.h:117
#define CIRCSTRINGTYPE
Definition liblwgeom.h:123
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition lwutil.c:190
static const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
Definition lwinline.h:91
LWGEOM ** geoms
Definition liblwgeom.h:575
uint8_t type
Definition liblwgeom.h:448
POINTARRAY * points
Definition liblwgeom.h:469

References CIRCSTRINGTYPE, COMPOUNDTYPE, LWCOMPOUND::geoms, getPoint2d_cp(), LINETYPE, lwerror(), LWLINE::points, and LWGEOM::type.

Referenced by lw_dist2d_curvepoly_curvepoly(), lw_dist2d_tri_circstring(), and lw_dist2d_tri_curvepoly().

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