PostGIS  2.5.0dev-r@@SVN_REVISION@@
static LWMPOINT* lwpoint_locate_along ( const LWPOINT lwpoint,
double  m,
double  offset 
)
static

Definition at line 183 of file lwlinearreferencing.c.

References FP_EQUALS, lwgeom_get_srid(), lwgeom_has_m(), lwgeom_has_z(), lwmpoint_add_lwpoint(), lwmpoint_construct_empty(), lwpoint_as_lwgeom(), lwpoint_clone(), lwpoint_get_m(), and r.

Referenced by lwgeom_locate_along().

184 {
185  double point_m = lwpoint_get_m(lwpoint);
186  LWGEOM *lwg = lwpoint_as_lwgeom(lwpoint);
188  if ( FP_EQUALS(m, point_m) )
189  {
190  lwmpoint_add_lwpoint(r, lwpoint_clone(lwpoint));
191  }
192  return r;
193 }
char * r
Definition: cu_in_wkt.c:24
LWPOINT * lwpoint_clone(const LWPOINT *lwgeom)
Definition: lwpoint.c:239
int32_t lwgeom_get_srid(const LWGEOM *geom)
Return SRID number.
Definition: lwgeom.c:909
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
Definition: lwgeom.c:923
LWMPOINT * lwmpoint_construct_empty(int srid, char hasz, char hasm)
Definition: lwmpoint.c:39
double lwpoint_get_m(const LWPOINT *point)
Definition: lwpoint.c:107
LWMPOINT * lwmpoint_add_lwpoint(LWMPOINT *mobj, const LWPOINT *obj)
Definition: lwmpoint.c:45
#define FP_EQUALS(A, B)
LWGEOM * lwpoint_as_lwgeom(const LWPOINT *obj)
Definition: lwgeom.c:334
int lwgeom_has_m(const LWGEOM *geom)
Return LW_TRUE if geometry has M ordinates.
Definition: lwgeom.c:930

Here is the call graph for this function:

Here is the caller graph for this function: