[postgis-users] TRANSFORM on multipolygons with several geometries crashes database engine (pgsql7.4.1, pg0.8-dev)

Paul Ramsey pramsey at refractions.net
Tue Jan 13 10:32:16 PST 2004


We have historically had no problems at all with Transform, so my guess 
is that you are having a different problem... step 1, can you provide us 
with a small sample data set that displays the problem on your site? 
step 2, a little more information on your operating system and build 
environment.
Thanks!
Paul

Havard Tveite wrote:

> Dear list,
> 
> We are having problems with the transform function.
> 
> TRANSFORM on multipolygons with more than one geometry (e.g.
> polygons with holes) crashes the database engine.
> PostGreSQL 7.4.1
> PostGIS 0.8-developing version, 12. january 2004 build (same
>      results on the 0.8 version)
> Geos 1.0 - 7. november 2003
> 
>  From coordinate system 4326 (WGS84 lat-long).
> 
> Interaction with PostGreSQL (real data set created with shp2pgsql):
> 
> %postgistest=# select TRANSFORM(the_geom, 32633) from test1 where gid = 59;
> %server closed the connection unexpectedly
> %        This probably means the server terminated abnormally
> %        before or while processing the request.
> %The connection to the server was lost. Attempting reset: Failed.
> 
> A simple example geometry that will also make TRANSFORM crash PostGreSQL:
> MULTIPOLYGON(((11 59,11 59.1,11.2 59.1,11.2 59,11 59),(11.1 59.02,11.15 
> 59.07,11.05 59.07,11.1 59.02)))
> 
> To reproduce the problem (database called "postgistest"):
> 
> create table pgtest (gid serial);
> select 
> AddGeometryColumn('postgistest','pgtest','the_geom','4326','MULTIPOLYGON',2); 
> 
> begin;
> Insert into pgtest (gid,the_geom) 
> values('1',GeometryFromText('MULTIPOLYGON(((11 59,11 59.1,11.2 59.1,11.2 
> 59,11 59),(11.1 59.02,11.15 59.07,11.05 59.07,11.1 59.02)))',4326));
> Insert into pgtest (gid,the_geom) 
> values('2',GeometryFromText('MULTIPOLYGON(((11 59,11 59.1,11.2 59.1,11.2 
> 59,11 59)))',4326));
> end;
> 
> select TRANSFORM(the_geom, 32633) from pgtest where gid = 2;
> select TRANSFORM(the_geom, 32633) from pgtest where gid = 1;
> 
> The first select statement returns:
> %                                                                                              
> transform
> %------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
> 
> % SRID=32633;MULTIPOLYGON(((270278.433402198 
> 6546929.75103777,270945.446198309 6558052.09702025,282390.013847871 
> 6557382.6223687,281756.381195413 6546259.0260906,270278.433402198 
> 6546929.75103777)))
> %(1 row)
> 
> The second select statement returns:
> %server closed the connection unexpectedly
> %        This probably means the server terminated abnormally
> %        before or while processing the request.
> %The connection to the server was lost. Attempting reset: Failed.
> 
> 


-- 
       __
      /
      | Paul Ramsey
      | Refractions Research
      | Email: pramsey at refractions.net
      | Phone: (250) 885-0632
      \_




More information about the postgis-users mailing list