[postgis-users] creating a grid; transform error

Puneet Kishor punk.kish at gmail.com
Thu Mar 15 19:47:11 PDT 2012


I am trying to create a simple 1 deg x 1 deg grid and transform it to spherical mercator

	SELECT ST_Transform(ST_MakeEnvelope(minx, miny, maxx, maxy, 4326), 900913) the_geom
	FROM (
		SELECT lng minx, lat miny, (lng + 1) maxx, (lat + 1) maxy
		FROM (
			SELECT Generate_series(-180, 180, 1) lng, Generate_series(-90, 90, 1) lat
		) series 
		WHERE (lng + 1) < 181 AND (lat + 1) < 91
	) lat_lng


I get

	ERROR: transform: couldn't project point (-180 -90 0): tolerance condition error (-20)



What am I doing wrong?


--
Puneet Kishor


More information about the postgis-users mailing list