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

◆ lwpoint_project_lwpoint()

LWPOINT * lwpoint_project_lwpoint ( const LWPOINT lwpoint1,
const LWPOINT lwpoint2,
double  distance 
)

Definition at line 277 of file lwpoint.c.

278{
279 POINT4D p1, p2, p3;
280 int srid = lwgeom_get_srid((const LWGEOM*)lwpoint1);
281 int hasz = lwgeom_has_z((const LWGEOM*)lwpoint1);
282 int hasm = lwgeom_has_m((const LWGEOM*)lwpoint1);
283 lwpoint_getPoint4d_p(lwpoint1, &p1);
284 lwpoint_getPoint4d_p(lwpoint2, &p2);
285 project_pt_pt(&p1, &p2, distance, &p3);
286 return lwpoint_make(srid, hasz, hasm, &p3);
287}
int32_t lwgeom_get_srid(const LWGEOM *geom)
Return SRID number.
Definition lwgeom.c:955
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
Definition lwgeom.c:962
int lwgeom_has_m(const LWGEOM *geom)
Return LW_TRUE if geometry has M ordinates.
Definition lwgeom.c:969
int project_pt_pt(const POINT4D *A, const POINT4D *B, double distance, POINT4D *R)
Azimuth is angle in radians from vertical axis.
Definition measures.c:2445
int lwpoint_getPoint4d_p(const LWPOINT *point, POINT4D *out)
Definition lwpoint.c:57
LWPOINT * lwpoint_make(int32_t srid, int hasz, int hasm, const POINT4D *p)
Definition lwpoint.c:206
static double distance(double x1, double y1, double x2, double y2)
Definition lwtree.c:1032

References distance(), lwgeom_get_srid(), lwgeom_has_m(), lwgeom_has_z(), lwpoint_getPoint4d_p(), lwpoint_make(), and project_pt_pt().

Referenced by geometry_project_geometry().

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