[postgis-tickets] [PostGIS] #3075: sfcgal ST_3DIntersects hangs on this query

PostGIS trac at osgeo.org
Sat Mar 7 02:00:00 PST 2015


#3075: sfcgal ST_3DIntersects hangs on this query
--------------------+-------------------------------------------------------
 Reporter:  robe    |       Owner:  colivier     
     Type:  defect  |      Status:  new          
 Priority:  medium  |   Milestone:  PostGIS 2.2.0
Component:  sfcgal  |     Version:  2.1.x        
 Keywords:          |  
--------------------+-------------------------------------------------------
 I built a 3d building table using ST_Extrude and slapped on a 3D index.


 {{{
 CREATE INDEX idx_sfo_3dbuilds_geom
    ON data.sfo_3dbuildings USING gist(geom gist_geometry_ops_nd);

 }}}

 When I do a query like this:


 {{{
 set postgis.backend=geos;
 WITH drone_path AS (SELECT ST_GeomFromText('LINESTRING Z (6011567 2117852
 12,6011567 2117860 50,
     6011765 2117429 20, 6011765 2117500 100,  6011765 2118500 300, 6011800
 2119500 30, 6012800 2129500 150)',2227) As geom)
 SELECT b.gid
 FROM data.sfo_3dbuildings As b INNER JOIN drone_path As d ON
 ST_3DIntersects(b.geom, d.geom);
 }}}

 I get this answer:

 {{{
  gid
 ------
  4354
  4367
  4379
  4429
  4449
  4451
  4509
  4612
  4836
  4842
 }}}

 Which seems like a fairly respectible answer when I view it in my
 x3dviewer - see attached image.  Granted its a very messed up drone path I
 have going on.


 {{{
 set postgis.backend=sfcgal;
 }}}

 When I switch to use sfcgal my postgres server goes into memory death and
 I have to kill the connection.

 Dataset and image is attached (buildings in red are those the native
 ST_3DIntersects marks as collision targets)

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/3075>
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