[postgis-tickets] [PostGIS] #2739: ST_Intersection problem

PostGIS trac at osgeo.org
Fri May 16 08:31:10 PDT 2014


#2739: ST_Intersection problem
---------------------+------------------------------------------------------
 Reporter:  pascal   |       Owner:  pramsey
     Type:  defect   |      Status:  new    
 Priority:  medium   |   Milestone:         
Component:  postgis  |     Version:  2.1.x  
 Keywords:           |  
---------------------+------------------------------------------------------
 The ST_Intersection of the following two Polygon-Tables in PostgreSQL DB
 result in a wrong intersection-geometry:

 Table A:
 "SRID=21781;POLYGON((652487.310697571 166905.704519917,652646.295802968
 166543.52900648,652525.223101453 166292.782810446,652525.223101453
 166292.782810446,651985.3579406 165631.183348616,651980.065144905
 165631.183348616,651853.038048234 166139.291735302,6 (...)"
 "SRID=21781;POLYGON((652525.223101453 166292.782810446,652526.8368147
 166305.841154341,654187.160949569 166372.174745866,655557.995034481
 166017.557434325,652377.024822003 164360.912381903,652377.024822003
 164360.912381903,651980.065144905 165631.183348616, (...)"
 "SRID=21781;POLYGON((652526.8368147 166305.841154341,652644.509155265
 166539.828790745,652855.11313311 166689.246287948,654119.42970467
 166448.093284111,654187.160949569 166372.174745866,652526.8368147
 166305.841154341))"
 "SRID=21781;POLYGON((651792.92747552 165636.217563159,651980.065144905
 165631.183348616,651853.038048234 166139.291735302,651704.839768784
 166901.45431533,651574.948487674 166891.790206689,651094.095728285
 166224.521543424,651094.095728285 166224.521543424, (...)"
 "SRID=21781;POLYGON((651704.839768784 166901.45431533,651574.948487674
 166891.790206689,651444.19411769 167068.852341229,652488.173531591
 166906.747111024,652487.310697571 166905.704519917,651853.038048234
 166139.291735302,651704.839768784 166901.45431533))"

 Table B:
 "SRID=21781;MULTIPOLYGON(((651629.556330106
 166612.81993413,651956.345108947 166568.130870357,652076.446967838
 166193.859961257,651956.345108947 166087.723434796,651978.689640834
 165892.208780788,651917.046727391 165883.257018676,651925.425926848
 165849.740 (...)"

 SQL:
 CRATE TABLE inters AS
 (SELECT
 ST_Intersection(a.geom,b.geom) AS intersection_geom
 FROM tableA AS a, tableB AS b
 WHERE a.geom && b.geom);

 Result:
 "SRID=21781;GEOMETRYCOLLECTION(LINESTRING(651925.425926848
 165849.740220846,651918.909381221
 165875.806403356),LINESTRING(651918.909381221
 165875.806403356,651917.046727391
 165883.257018676),POLYGON((651917.046727391
 165883.257018676,651853.038048234 166139 (...)"
 "SRID=21781;GEOMETRYCOLLECTION EMPTY"
 "SRID=21781;GEOMETRYCOLLECTION EMPTY"
 "SRID=21781;MULTIPOLYGON(((651918.909381221
 165875.806403356,651925.425926848 165849.740220846,651869.760047887
 165848.916250258,651851.255982418 165952.608843544,651898.337289386
 165958.094770693,651853.038048234 166139.291735302,651917.046727391
 165883.25 (...)"
 "SRID=21781;POLYGON((652026.642685167 166349.064004929,651853.038048234
 166139.291735302,651764.552769598 166594.358882576,651956.345108947
 166568.130870357,652026.642685167 166349.064004929))"

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2739>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list