id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1292	ST_SnapToGrid returns a value out of range	realityexists	pramsey	"PostGIS 2.0.0 as of 2011-11-08

I've found some odd behaviour in ST_SnapToGrid, which looks like a bug. When I run

SELECT ST_SnapToGrid(ST_Transform(ST_GeomFromText('POINT(180 50)', 
4269), 4326), 0.00001)::geography

an error is returned:

ERROR:  Coordinate values are out of range [-180 -90, 180 90] for 
GEOGRAPHY type

Calling ST_AsText() on the same geometry returns ""POINT(180 50)"", as 
expected. Interestingly, if I either decrease or even increase the 
precision the error does not occur. Eg. this works fine:

SELECT ST_SnapToGrid(ST_Transform(ST_GeomFromText('POINT(180 50)', 
4269), 4326), 0.000001)::geography

It's only the value 0.0001 that seems to cause a problem."	patch	closed	medium	PostGIS 2.1.0	postgis	trunk	fixed		
