No subject


Tue Oct 7 10:08:30 PDT 2008


the points to the st_centroid of the destination geometry. The
ST_Translate arguments that you provide are those of the vector between
the points and the centroid of the destination geometry, which therefore
translates all the points to this place.

To achieve what you want you'll have to compute the vector from the
centroid of the first geometry to the second, and apply this to your
points. The arguments to the st_translate you should be using are :

vec_x = st_x(st_centroid(geom_2)) - st_x(st_centroid(geom_1))
vec_y = st_y(st_centroid(geom_2)) - st_y(st_centroid(geom_1))

This also explains why it worked with all the points packed into a
single geometry.

-- 
Maxime