Opened 10 years ago
Closed 5 years ago
#3075 closed defect (wontfix)
sfcgal ST_3DIntersects hangs on this query
Reported by: | robe | Owned by: | colivier |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS SFCGAL |
Component: | sfcgal | Version: | 2.1.x |
Keywords: | Cc: |
Description
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)
Attachments (2)
Change History (10)
by , 10 years ago
Attachment: | drone_crash.png added |
---|
by , 10 years ago
Attachment: | data_sfo_3dbuildings.sql.bz2 added |
---|
comment:1 by , 10 years ago
comment:2 by , 9 years ago
Sadly this issue still exists with:
POSTGIS="2.2.0dev r13966" GEOS="3.5.0-CAPI-1.9.0 r4088" SFCGAL="1.1.0" PROJ="Rel. 4.9.1, 04 March 2015" GDAL="GDAL 2.0.0, released 2015/06/14" LIBXML="2.7.8" LIBJSON="0.12" RASTER
I built with boost 1.59.0 and CGAL 4.6.1
comment:3 by , 9 years ago
Milestone: | PostGIS 2.2.0 → PostGIS SFCGAL |
---|
As I recall I think this is still an issue even in SFCGAL 1.2. This I feel is probably an SFCGAL issue and not how it connects to PostGIS so changing to SFCGAL.
comment:4 by , 6 years ago
Tested with:
POSTGIS="3.0.0dev r16844" [EXTENSION] PGSQL="100" GEOS="3.6.2-CAPI-1.10.2 4d2925d6" SFCGAL="1.3.5" PROJ="Rel. 5.1.0, June 1st, 2018" LIBXML="2.9.4" LIBJSON="0.12.1"
No crash. It gives me the same result than with the GEOS backend (after more time though ...)
comment:5 by , 6 years ago
Bara för att det inte skall bli förvirring. ST_3DIntersects finns inte i GEOS. Det är native PostGIS, eller SFCgal som är de 2 alternativen.
Är PostGIS native snabbare? Kul i sådana fall :-)
comment:6 by , 6 years ago
@nicklas, please use english here.
(Google translation) Just because there will not be confusion. ST_3DIntersects are not available in GEOS. It is native PostGIS, or SFCgal which are the 2 options. Is PostGIS native faster? Fun in such cases :-)
Yes, the "GEOS" backend implements intersects3d by lwgeom_mindistance3d_tolerance()
comment:7 by , 6 years ago
Ouch, sorry. Brain fart here. I had to recheck if I really had written it in Swedish, couldn't believe it. Good Google translate made a decent job here.
Yes, lwgeom_mindistance3d_tolerance is found in the PostGIS code base here https://trac.osgeo.org/postgis/browser/trunk/liblwgeom/measures3d.c
comment:8 by , 5 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
SFCGAL 3DIntersects removed from PostGIS 3.
Where are my manners - forgot to output version details: