[postgis-users] postgis help!!
Michael Fuhr
mike at fuhr.org
Tue May 16 09:14:10 PDT 2006
On Tue, May 16, 2006 at 11:55:46AM +0100, Mark Cave-Ayland wrote:
> Could you post to the list a self-contained SQL test case to recreate your
> problem? Also you say that you are using the latest versions - can you
> confirm those are both PostgreSQL 8.1 and PostGIS 1.1.2 using SELECT
> version() and SELECT postgis_full_version()?
This looks like what Brent describes:
CREATE TABLE foo (id serial PRIMARY KEY);
SELECT AddGeometryColumn('foo', 'geom', -1, 'GEOMETRY', 2);
INSERT INTO foo (geom) VALUES (GeomFromText('LINESTRING(-177 -44,-176 -43)'));
UPDATE foo SET geom = Translate(geom, 360.0, 0.0, 0.0);
SELECT AsText(geom), AsText(Envelope(geom)) FROM foo;
astext | astext
-----------------------------+---------------------------------------------------------
LINESTRING(183 -44,184 -43) | POLYGON((-177 -44,-177 -43,-176 -43,-176 -44,-177 -44))
(1 row)
Does Translate() neglect to update the bounding box?
UPDATE foo SET geom = AddBBox(DropBBox(geom));
SELECT AsText(geom), AsText(Envelope(geom)) FROM foo;
astext | astext
-----------------------------+----------------------------------------------------
LINESTRING(183 -44,184 -43) | POLYGON((183 -44,183 -43,184 -43,184 -44,183 -44))
(1 row)
\x
SELECT version(), postgis_full_version();
-[ RECORD 1 ]--------+------------------------------------------------------------------------------------------------
version | PostgreSQL 8.1.3 on i386-unknown-freebsd6.1, compiled by GCC gcc (GCC) 3.4.4 [FreeBSD] 20050518
postgis_full_version | POSTGIS="1.1.2" GEOS="2.2.2-CAPI-1.1.0" PROJ="Rel. 4.4.9, 29 Oct 2004" USE_STATS
--
Michael Fuhr
More information about the postgis-users
mailing list