Hello. I've come across a strange situation. It would be very helpfull if someone out there could give me an idea of what's going on. Here is a sequence of SQL commands issued directly through 'psql' to the Postgres server.
<br><br>1) INSERT INTO table(gid,the_geom) VALUES(1,geometryFromText('LINESTRING(583945 6137700, 583945 6137690)',-1));<br><br>2) SELECT gid,asText(the_geom) FROM table WHERE the_geom && geometryFromText('POLYGON((583943 6137697, 583947 6137697, 583947 6137693, 583943 6137693, 583943 6137697))',-1);
<br><br>This works as expected, and the geometry I've just created in step 1 is listed in the results.<br><br>gid |                  astext<br>----+-------------------------------------------<br>1    | LINESTRING(583945 6137700,583945 6137690)
<br><br><br>3) UPDATE table SET the_geom = translate(the_geom, 10, 0, 0) WHERE gid = 1;<br><br>4) SELECT gid,asText(the_geom) FROM table WHERE gid = 1;<br><br>gid |                  astext<br>----+-------------------------------------------
<br>1    | LINESTRING(583955 6137700,583955 6137690)<br><br>Well, finally, I try to repeat step 2 with a new polygon to again select that record.<br><br>5) SELECT gid,asText(the_geom) FROM table WHERE the_geom && geometryFromText('POLYGON((583953 6137697, 583957 6137697, 583957 6137693, 583953 6137693, 583953 6137697))',-1);
<br><br>gid | astext<br>----+--------<br>(0 rows)<br><br><br>If there isn't something I'm understanding bad, the final step should have retorned me the record created in step 1 and moved in step 3. I've tried this with different geometrys, and it's the same. After using 'translate' over the geometry, it's not accessible anymore using the '&&' operator. It doesn't work neither if using 'intersects' instead of '&&'.
<br><br>I'm using postgres 8.1.4 and postgis 1.1.2. I've using postgres+postgis for a pair of years, and this is the first time I've seen this occur.<br><br>Well, thanks very much,<br>Antonio Grassi<br>