Check to see if this geocentric gbox is wrapped around a pole.
Only makes sense if this gbox originated from a polygon, as it's assuming the box is generated from external edges and there's an "interior" which contains the pole.
This function is overdetermined, for very large polygons it might add an unwarranted pole. STILL NEEDS WORK!
Definition at line 316 of file lwgeodetic.c.
317{
319#if POSTGIS_DEBUG_LEVEL >= 4
324#endif
325
326 if (gbox->
xmin < 0.0 && gbox->
xmax > 0.0 &&
327 gbox->
ymin < 0.0 && gbox->
ymax > 0.0)
328 {
329
330 if ((gbox->
zmin > 0.0) && (gbox->
zmax > 0.0))
331 {
332 LWDEBUG(4,
"enclosed positive z axis");
334 }
335
336 else if ((gbox->
zmin < 0.0) && (gbox->
zmax < 0.0))
337 {
338 LWDEBUG(4,
"enclosed negative z axis");
340 }
341
342 else
343 {
344 LWDEBUG(4,
"enclosed both z axes");
347 }
349 }
350
351
352 if (gbox->
xmin < 0.0 && gbox->
xmax > 0.0 &&
353 gbox->
zmin < 0.0 && gbox->
zmax > 0.0)
354 {
355 if ((gbox->
ymin > 0.0) && (gbox->
ymax > 0.0))
356 {
357 LWDEBUG(4,
"enclosed positive y axis");
359 }
360 else if ((gbox->
ymin < 0.0) && (gbox->
ymax < 0.0))
361 {
362 LWDEBUG(4,
"enclosed negative y axis");
364 }
365 else
366 {
367 LWDEBUG(4,
"enclosed both y axes");
370 }
372 }
373
374
375 if (gbox->
ymin < 0.0 && gbox->
ymax > 0.0 &&
376 gbox->
zmin < 0.0 && gbox->
zmax > 0.0)
377 {
378 if ((gbox->
xmin > 0.0) && (gbox->
xmax > 0.0))
379 {
380 LWDEBUG(4,
"enclosed positive x axis");
382 }
383 else if ((gbox->
xmin < 0.0) && (gbox->
xmax < 0.0))
384 {
385 LWDEBUG(4,
"enclosed negative x axis");
387 }
388 else
389 {
390 LWDEBUG(4,
"enclosed both x axes");
393 }
394
396 }
397
398 return rv;
399}
char * gbox_to_string(const GBOX *gbox)
Allocate a string representation of the GBOX, based on dimensionality of flags.
#define LW_TRUE
Return types for functions with status returns.
#define LWDEBUG(level, msg)
#define LWDEBUGF(level, msg,...)
References gbox_to_string(), LW_FALSE, LW_TRUE, LWDEBUG, LWDEBUGF, lwfree(), GBOX::xmax, GBOX::xmin, GBOX::ymax, GBOX::ymin, GBOX::zmax, and GBOX::zmin.
Referenced by lwpolygon_calculate_gbox_geodetic().