[postgis-devel] [PostGIS] #1252: SRID appearing in ST_AsText for particular multipolygon

PostGIS trac at osgeo.org
Mon Apr 23 09:30:43 PDT 2012

#1252: SRID appearing in ST_AsText for particular multipolygon
 Reporter:  robe             |       Owner:  pramsey      
     Type:  defect           |      Status:  new          
 Priority:  medium           |   Milestone:  PostGIS 1.5.4
Component:  postgis          |     Version:  1.5.X        
 Keywords:  windows, 64-bit  |  

Comment(by ipackham):

 Hi Strk

 I have not managed to install 1.5.4SVN on Windows. Any hints on how to do
 this? (I have tried MSYS and CygWin, but after running ./configure both
 say "no acceptable C compiler found in $PATH" - calling $PATH I get the
 message "...C/Program: No such file or directory")

 In the meantime I have confirmed that after running the same SQL script,
 the strange geometries do not seem to be present in PostGIS 2.0, and QGIS
 loads the table OK.

 In version 1.5.3 I think I have a workaround (SQL version) using
 ST_AsBinary on the geomeries before ST_Union, then adding back in the
 SRID. Something like

 SELECT b.code,
 SRID), SRID) as inters_geom
 from table1 a, table2 b
 where a.the_geom && b.the_geom
 and ST_Intersects(a.the_geom,b.the_geom)
 group by b.code;

 Funnily enough, if you replace ST_AsBinary with ST_AsText, this also
 works. So there is probably something strange in the original geometries
 that cause ST_Intersection or ST_Union to behave like this.

Ticket URL: <http://trac.osgeo.org/postgis/ticket/1252#comment:23>
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-devel mailing list