Opened 17 months ago

Closed 2 months ago

#5405 closed enhancement (fixed)

Reexpose SFCGAL ST_3DIntersects and ST_3DDistance perhaps as CG_3DIntersects, CG_3DDistance, CG_3DIntersection

Reported by: robe Owned by: lbartoletti
Priority: medium Milestone: PostGIS 3.5.0
Component: sfcgal Version: master
Keywords: Cc:

Description (last modified by robe)

There were several functions we got rid of when we removed the backend GUC in postgis. These were functions that had the same name in both PostGIS proper and SFCGAL, but hte SFCGAL variant would take oever when you did

set postgis.backend=sfcgal

From the 3.0 credits here is what we have

ST_3DDistance - Changed: 3.0.0 - SFCGAL version removed Returns the 3D cartesian minimum distance (based on spatial ref) between two geometries in projected units.

ST_3DIntersects - Changed: 3.0.0 SFCGAL backend removed, GEOS backend supports TINs. Returns TRUE if the Geometries "spatially intersect" in 3D - only for points, linestrings, polygons, polyhedral surface (area).

ST_Intersection - Changed: 3.0.0 does not depend on SFCGAL. (T)Returns a geometry that represents the shared portion of geomA and geomB.
ST_Intersects - Changed: 3.0.0 SFCGAL version removed. Returns TRUE if the Geometries/Geography "spatially intersect in 2D" - (share any portion of space) and FALSE if they don't (they are Disjoint). For geography tolerance is 0.00001 meters (so any points that close are considered to intersect)

I don't think there is a need to reexpose ST_Intersection and ST_Intersects as I think that was mostly to handle 2D TINS which don't have a solid counterpart.

I think ST_3DDistance and ST_3DIntersects that SFCGAL provided are still useful for true surfaces that are solids.

I don't think we settled on a prefix for these. I was thinking SC or SG or CG.

I'm adding the CG_3DIntersection even though we don't have an overlap yet between PostGIS and SFCGAL. This one I think we should deprecate the old and have the new name, but keep both for now, until if (GEOS or PostGIS proper offers a ST_3DIntersection)

Change History (5)

comment:1 by robe, 12 months ago

Description: modified (diff)
Summary: Reexpose SFCGAL ST_3DIntersects and ST_3DDistance perhaps as SC_3DIntersects, SC_3DDistanceReexpose SFCGAL ST_3DIntersects and ST_3DDistance perhaps as CG_3DIntersects, CG_3DDistance, CG_3DIntersection
Type: defectenhancement
Version: 3.3.xmaster

comment:2 by mdavis, 12 months ago

My vote is for prefix CG.

comment:3 by robe, 12 months ago

Owner: changed from robe to lbartoletti

comment:5 by robe, 2 months ago

Resolution: fixed
Status: newclosed

This was already done and committed.

Note: See TracTickets for help on using tickets.