Function initializing 3dclosestpoint calculations.
236{
237
240 double initdistance = DBL_MAX;
242
246
247 LWDEBUG(2,
"lw_dist3d_distancepoint is called");
248
249
250
251
252
254 {
256 "One or both of the geometries is missing z-value. The unknown z-value will be regarded as \"any value\"");
257
260
266 {
267
268 lwerror(
"Some unspecified error.");
270 }
271
274 {
277
280 {
281
283 lwerror(
"Some unspecified error.");
285 }
287 }
288
290 {
293
296 {
297
299 lwerror(
"Some unspecified error.");
301 }
303 }
304 }
305 else
306 {
308 {
309
310 lwerror(
"Some unspecified error.");
312 }
313 }
315 {
316 LWDEBUG(3,
"didn't find geometries to measure between, returning null");
318 }
319 else
320 {
325 }
326
328}
char result[OUT_DOUBLE_BUFFER_SIZE]
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 lwnotice(const char *fmt,...) __attribute__((format(printf
Write a notice out to the notice handler.
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error 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.