Generated with sparks and insights from 21 sources

img6

img7

img8

img9

img10

img11

Introduction

  • Functionality: PostGIS provides several functions for 3D spatial analysis, including collision detection for 3D geometries.

  • ST_3DIntersects: This function returns TRUE if two geometries spatially intersect in 3D. It supports points, linestrings, polygons, and polyhedral surfaces.

  • ST_3DIntersection: This function returns the shared portion of two geometries in 3D. It is useful for finding the exact intersection geometry.

  • ST_3DDWithin: This function tests if two 3D geometries are within a given 3D distance, which can be used for proximity-based collision detection.

  • ST_3DDifference: This function returns the part of one geometry that does not intersect with another, useful for subtracting overlapping areas.

  • ST_3DLength: This function calculates the 3D length of a linestring or multilinestring, which can be useful in various spatial analyses.

  • ST_3DUnion: This function performs a 3D union of geometries, combining them into a single geometry.

  • ST_3DArea: This function computes the area of 3D surface geometries, which can be useful in volumetric analyses.

ST_3DIntersects [1]

  • Description: Tests if two geometries spatially intersect in 3D.

  • Supported Geometries: Points, linestrings, polygons, and polyhedral surfaces.

  • Usage: Useful for detecting collisions or overlaps in 3D space.

  • Implementation: Includes a bounding box comparison that utilizes spatial indexes.

  • Availability: Available since PostGIS 2.0.0.

img6

img7

img8

ST_3DIntersection [1]

  • Description: Returns the shared portion of two geometries in 3D.

  • Usage: Useful for finding the exact intersection geometry.

  • Implementation: Requires the SFCGAL backend for proper 3D intersection.

  • Supported Geometries: Points, linestrings, polygons, and polyhedral surfaces.

  • Availability: Available since PostGIS 2.1.0.

img6

img7

img8

ST_3DDWithin [1]

  • Description: Tests if two 3D geometries are within a given 3D distance.

  • Usage: Useful for proximity-based collision detection.

  • Implementation: Includes a bounding box comparison that utilizes spatial indexes.

  • Supported Geometries: Points, linestrings, polygons, and polyhedral surfaces.

  • Availability: Available since PostGIS 2.0.0.

img6

img7

img8

img9

img10

img11

ST_3DDifference [1]

  • Description: Returns the part of one geometry that does not intersect with another.

  • Usage: Useful for subtracting overlapping areas.

  • Implementation: Requires the SFCGAL backend for proper 3D difference calculation.

  • Supported Geometries: Points, linestrings, polygons, and polyhedral surfaces.

  • Availability: Available since PostGIS 2.2.0.

img6

img7

ST_3DLength [1]

  • Description: Calculates the 3D length of a linestring or multilinestring.

  • Usage: Useful in various spatial analyses.

  • Supported Geometries: Linestrings and multilinestrings.

  • Implementation: Returns the 3-dimensional or 2-dimensional length of the geometry.

  • Availability: Available since PostGIS 2.0.0.

img6

img7

ST_3DUnion [1]

  • Description: Performs a 3D union of geometries, combining them into a single geometry.

  • Usage: Useful for merging multiple geometries into one.

  • Implementation: Requires the SFCGAL backend for proper 3D union.

  • Supported Geometries: Points, linestrings, polygons, and polyhedral surfaces.

  • Availability: Available since PostGIS 2.2.0.

img6

img7

img8

img9

ST_3DArea [1]

  • Description: Computes the area of 3D surface geometries.

  • Usage: Useful in volumetric analyses.

  • Supported Geometries: Polyhedral surfaces, triangles, and triangulated irregular network surfaces (TIN).

  • Implementation: Requires the SFCGAL backend for proper 3D area calculation.

  • Availability: Available since PostGIS 2.1.0.

img6

img7

img8

<br><br>