Function initializing 3dclosestpoint calculations.
202{
203
206 double initdistance = DBL_MAX;
208
212
213 LWDEBUG(2,
"lw_dist3d_distancepoint is called");
214
215
216
217
218
220 {
222 "One or both of the geometries is missing z-value. The unknown z-value will be regarded as \"any value\"");
223
226
232 {
233
234 lwerror(
"Some unspecified error.");
236 }
237
240 {
243
246 {
247
249 lwerror(
"Some unspecified error.");
251 }
253 }
254
256 {
259
262 {
263
265 lwerror(
"Some unspecified error.");
267 }
269 }
270 }
271 else
272 {
274 {
275
276 lwerror(
"Some unspecified error.");
278 }
279 }
281 {
282 LWDEBUG(3,
"didn't find geometries to measure between, returning null");
284 }
285 else
286 {
291 }
292
293 return result;
294}
LWPOINT * lwpoint_make3dz(int32_t srid, double x, double y, double z)
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
LWCOLLECTION * lwcollection_construct_empty(uint8_t type, int32_t srid, char hasz, char hasm)
#define LWDEBUG(level, msg)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.
static LWGEOM * create_v_line(const LWGEOM *lwgeom, double x, double y, int32_t srid)
This function is used to create a vertical line used for cases where one if the geometries lacks z-va...
int lw_dist3d_recursive(const LWGEOM *lwg1, const LWGEOM *lwg2, DISTPTS3D *dl)
This is a recursive function delivering every possible combination of subgeometries.
int lw_dist2d_comp(const LWGEOM *lw1, const LWGEOM *lw2, DISTPTS *dl)
This function just deserializes geometries Bboxes is not checked here since it is the subgeometries b...
LWGEOM * lw_dist2d_distancepoint(const LWGEOM *lw1, const LWGEOM *lw2, int32_t srid, int mode)
Function initializing closestpoint calculations.
Structure used in distance-calculations.
Structure used in distance-calculations.