[postgis-users] postgis help!!

Bruce Rindahl rindahl at lrcwe.com
Tue May 16 09:32:36 PDT 2006


The Translate function changed from 8.1.1 to 8.1.2.  Everyone please state
what version of PostGIS you are using to help track this down.
Bruce Rindahl

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Michael
Fuhr
Sent: Tuesday, May 16, 2006 10:14 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] postgis help!!

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
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list