When features are snapped or sometimes they are just this way, they are very close to the geodetic bounds but slightly over.
This routine nudges those points, and only those points, back over to the bounds. http://trac.osgeo.org/postgis/ticket/1292
Definition at line 3336 of file lwgeodetic.c.
References getPoint4d_p(), LW_FALSE, LW_TRUE, lwerror(), POINTARRAY::npoints, ptarray_set_point4d(), POINT4D::x, and POINT4D::y.
Referenced by lwgeom_nudge_geodetic().
3343 static double tolerance = 1e-10;
3346 lwerror(
"ptarray_nudge_geodetic called with null input");
3348 for(i = 0; i < pa->
npoints; i++ )
3351 if ( p.
x < -180.0 && (-180.0 - p.
x < tolerance) )
3356 if ( p.
x > 180.0 && (p.
x - 180.0 < tolerance) )
3361 if ( p.
y < -90.0 && (-90.0 - p.
y < tolerance) )
3366 if ( p.
y > 90.0 && (p.
y - 90.0 < tolerance) )
void ptarray_set_point4d(POINTARRAY *pa, int n, const POINT4D *p4d)
#define LW_TRUE
Return types for functions with status returns.
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
int getPoint4d_p(const POINTARRAY *pa, int n, POINT4D *point)