From: Regina Obe Date: Sun, 4 Oct 2015 23:28:10 +0000 (+0000) Subject: add an ST_3DIntersection graphic. Fix graphic link on ST_3DDifference X-Git-Tag: 2.2.0~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e10897a22ad447fe283836f2704b3d87052a8d4f;p=postgis add an ST_3DIntersection graphic. Fix graphic link on ST_3DDifference git-svn-id: http://svn.osgeo.org/postgis/trunk@14187 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/html/images/st_3dintersection01.png b/doc/html/images/st_3dintersection01.png new file mode 100644 index 000000000..3568cc185 Binary files /dev/null and b/doc/html/images/st_3dintersection01.png differ diff --git a/doc/reference_sfcgal.xml b/doc/reference_sfcgal.xml index 47385e664..03050a432 100644 --- a/doc/reference_sfcgal.xml +++ b/doc/reference_sfcgal.xml @@ -501,16 +501,57 @@ MULTIPOLYGON( Description - + Return a geometry that is the shared portion between geom1 and geom2. Availability: 2.1.0 &sfcgal_required; &Z_support; &P_support; &T_support; - - - Examples: 3D linestring and Polygon + + + Examples + 3D images were generated using PostGIS and rendering in HTML using X3Dom HTML Javascript rendering library. + + + + + + SELECT ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(100 90)'), + 50, 'quad_segs=2'),0,0,30) AS geom1, + ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(80 80)'), + 50, 'quad_segs=1'),0,0,30) AS geom2; + + + + + + + Original 3D geometries overlaid. geom2 is shown semi-transparent + + + + + SELECT ST_3DIntersection(geom1,geom2) +FROM ( SELECT ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(100 90)'), + 50, 'quad_segs=2'),0,0,30) AS geom1, + ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(80 80)'), + 50, 'quad_segs=1'),0,0,30) AS geom2 ) As t; + + + + + + What's left after removing geom2 + + + + + + + + + 3D linestrings and polygons SELECT ST_AsText(ST_3DIntersection(linestring, polygon)) As wkt FROM ST_GeomFromText('LINESTRING Z (2 2 6,1.5 1.5 7,1 1 8,0.5 0.5 8,0 0 10)') AS linestring CROSS JOIN ST_GeomFromText('POLYGON((0 0 8, 0 1 8, 1 1 8, 1 0 8, 0 0 8))') AS polygon; @@ -594,7 +635,7 @@ FROM ST_GeomFromText('LINESTRING Z (2 2 6,1.5 1.5 7,1 1 8,0.5 0.5 8,0 0 10)') A - + Original 3D geometries overlaid. geom2 is the part that will be removed. @@ -609,7 +650,7 @@ FROM ( SELECT ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(100 90)'), - + What's left after removing geom2 @@ -622,15 +663,15 @@ FROM ( SELECT ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(100 90)'), - - See Also - - - , - , - - - + + See Also + + + , + , + + +