Gently move coordinates of LWGEOM if they are close enough into geodetic range.
Gently move coordinates of LWGEOM if they are close enough into geodetic range.
This routine nudges those points, and only those points, back over to the bounds. http://trac.osgeo.org/postgis/ticket/1292
Definition at line 3404 of file lwgeodetic.c.
3405{
3407 uint32_t i = 0;
3409
3410 assert(geom);
3411
3412
3415
3417
3420
3423
3425 {
3427 for ( i = 0; i < poly->
nrings; i++ )
3428 {
3430 rv = (rv ==
LW_TRUE ? rv : n);
3431 }
3432 return rv;
3433 }
3434
3437
3439 {
3441
3442 for ( i = 0; i < col->
ngeoms; i++ )
3443 {
3445 rv = (rv ==
LW_TRUE ? rv : n);
3446 }
3447 return rv;
3448 }
3449
3451 return rv;
3452}
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
int lwtype_is_collection(uint8_t type)
Determine whether a type number is a collection or not.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define LW_TRUE
Return types for functions with status returns.
int lwgeom_nudge_geodetic(LWGEOM *geom)
When features are snapped or sometimes they are just this way, they are very close to the geodetic bo...
static int ptarray_nudge_geodetic(POINTARRAY *pa)
When features are snapped or sometimes they are just this way, they are very close to the geodetic bo...
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
References LWCOLLECTION::geoms, LINETYPE, LW_FALSE, LW_TRUE, lwerror(), lwgeom_is_empty(), lwgeom_nudge_geodetic(), lwtype_is_collection(), lwtype_name(), LWCOLLECTION::ngeoms, LWPOLY::nrings, POINTTYPE, POLYGONTYPE, ptarray_nudge_geodetic(), LWPOLY::rings, TRIANGLETYPE, and LWGEOM::type.
Referenced by geography_from_geometry(), gserialized_geography_from_lwgeom(), and lwgeom_nudge_geodetic().