[postgis-users] no row selected on spatial query

Puneet Kishor punk.kish at gmail.com
Thu Oct 27 15:57:32 PDT 2011


I inherited two tables like so

	db=# select ST_Extent(the_geom) from t1;
	                    st_extent                    
	-------------------------------------------------
	 BOX(-180 5.67656603969958,180 89.9999951703269)
	(1 row)

	db=# select ST_Extent(the_geom) from t2;
	                         st_extent                         
	-----------------------------------------------------------
	 BOX(-3666182.8927 1296299.9824,4440422.8742 8820425.3008)
	(1 row)

I want to convert t2 to match t1. So, I tried the following --

	db=# UPDATE t2 SET the_geom = ST_Transform(the_geom, 4326);
	UPDATE 1354


But that didn't do it.

	db=# select ST_Extent(the_geom) from t2;
	                         st_extent                         
	-----------------------------------------------------------
	 BOX(-3666182.8927 1296299.9824,4440422.8742 8820425.3008)
	(1 row)


What do I do to transform t2 so its geometry matches t1?

--
Puneet Kishor



More information about the postgis-users mailing list