Function initializing 3dshortestline and 3dlongestline calculations.
98{
99 LWDEBUG(2,
"lw_dist3d_distanceline is called");
100 double x1, x2, y1, y2, z1, z2,
x,
y;
101 double initdistance = (mode ==
DIST_MIN ? DBL_MAX : -1.0);
105
109
110
111
112
114 {
115
117 "One or both of the geometries is missing z-value. The unknown z-value will be regarded as \"any value\"");
118
121
127 {
128
129 lwerror(
"Some unspecified error.");
131 }
134 {
137
140 {
141
143 lwerror(
"Some unspecified error.");
145 }
147 }
149 {
152
155 {
156
158 lwerror(
"Some unspecified error.");
160 }
162 }
163 }
164 else
165 {
167 {
168
169 lwerror(
"Some unspecified error.");
171 }
172 }
173
175 {
176 LWDEBUG(3,
"didn't find geometries to measure between, returning null");
178 }
179 else
180 {
187
190
192 }
193
194 return result;
195}
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)
LWLINE * lwline_from_ptarray(int32_t srid, uint32_t npoints, LWPOINT **points)
#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_distanceline(const LWGEOM *lw1, const LWGEOM *lw2, int32_t srid, int mode)
Function initializing shortestline and longestline calculations.
Structure used in distance-calculations.
Structure used in distance-calculations.