Current Path : /home/usr.opt/mysql57/mysql-test/suite/gis/r/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/suite/gis/r/spatial_analysis_functions_buffer.result |
# Creating the spatial Geometry object USE test; CREATE TABLE gis_geometrycollection (fid INTEGER NOT NULL PRIMARY KEY, g GEOMETRY); SET @star_elem_vertical= 'POLYGON((5 0,15 25,25 0,15 5,5 0))'; SET @star_elem_horizontal= 'POLYGON((25 0,0 15,30 15,22 10,25 0))'; SET @star_center= 'POINT(15 10)'; SET @star_top= 'POINT(15 25)'; SET @star_bottom_left= 'POINT(5 0)'; SET @star_bottom_right= 'POINT(25 0)'; SET @star_bottom_points= 'MULTIPOINT(5 0,25 0)'; SET @star_all_points= 'MULTIPOINT(5 0,25 0,15 10,15 25)'; SET @star_line_horizontal= 'LINESTRING(10 15,20 15)'; SET @star_line_vertical= 'LINESTRING(15 5,15 25)'; SET @star_top_to_center= 'LINESTRING(15 25,15 10)'; SET @star_lines_near_horizontal= 'MULTILINESTRING((25 0,0 15,15 30,0 5))'; SET @star_lines_near_vertical= 'MULTILINESTRING((0 5,15 25,0 25))'; SET @star= 'POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,30 15,22 10,25 0,15 5,5 0))'; SET @star_elem_vertical_val= '((5 0,15 25,25 0,15 5,5 0))'; SET @star_elem_horizontal_val= '((25 0,0 15,30 15,22 10,25 0))'; SET @star_of_elems='MULTIPOLYGON(((5 0,15 25,25 0,15 5,5 0)),((25 0,0 15,30 15,22 10,25 0)))'; SET @star_collection_elems='GEOMETRYCOLLECTION(MULTIPOLYGON(((5 0,15 25,25 0,15 5,5 0)),((25 0,0 15,30 15,22 10,25 0))),POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,30 15,22 10,25 0,15 5,5 0)),LINESTRING(15 25,15 10),MULTIPOINT(5 0,25 0),POINT(15 25))'; SET @star_collection_multilinestr='GEOMETRYCOLLECTION(MULTIPOLYGON(((5 0,15 25,25 0,15 5,5 0)),((25 0,0 15,30 15,22 10,25 0))),POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,30 15,22 10,25 0,15 5,5 0)),MULTILINESTRING((25 0,0 15,15 30,0 5)),LINESTRING(15 25,15 10),MULTIPOINT(5 0,25 0),POINT(15 25))'; # INSERT base star INSERT INTO gis_geometrycollection VALUES (100,ST_GEOMFROMTEXT(@star)), (101,ST_GEOMFROMTEXT(@star_elem_vertical)), (102,ST_GEOMFROMTEXT(@star_elem_horizontal)), (103,ST_GEOMFROMTEXT(@star_of_elems)), (104,ST_GEOMFROMTEXT(@star_top)), (105,ST_GEOMFROMTEXT(@star_center)), (106,ST_GEOMFROMTEXT(@star_bottom_left)), (107,ST_GEOMFROMTEXT(@star_bottom_right)), (108,ST_GEOMFROMTEXT(@star_bottom_points)), (109,ST_GEOMFROMTEXT(@star_all_points)), (110,ST_GEOMFROMTEXT(@star_line_horizontal)), (111,ST_GEOMFROMTEXT(@star_line_vertical)), (112,ST_GEOMFROMTEXT(@star_top_to_center)), (113,ST_GEOMFROMTEXT(@star_lines_near_horizontal)), (114,ST_GEOMFROMTEXT(@star_lines_near_vertical)), (115,ST_GEOMFROMTEXT(@star_collection_elems)), (116,ST_GEOMFROMTEXT(@star_collection_multilinestr)); # Checking the integrity of the above create/insert statements # 17 rows. SELECT count(ST_ASTEXT(g) != 'NULL') FROM gis_geometrycollection; count(ST_ASTEXT(g) != 'NULL') 17 ##################################################################################### # ST_BUFFER(point, distance) ##################################################################################### SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_center), 0)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_center), 0)) POINT(15 10) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_top), 1)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_top), 1)) POLYGON((16 25,15.98078528040323 25.195090322016124,15.923879532511288 25.382683432365088,15.831469612302547 25.555570233019598,15.70710678118655 25.707106781186546,15.555570233019605 25.831469612302545,15.382683432365093 25.923879532511286,15.195090322016132 25.98078528040323,15.000000000000002 26,14.804909677983874 25.980785280403232,14.617316567634912 25.923879532511286,14.444429766980399 25.831469612302545,14.292893218813454 25.70710678118655,14.168530387697455 25.555570233019605,14.076120467488714 25.38268343236509,14.01921471959677 25.195090322016128,14 25,14.01921471959677 24.804909677983872,14.076120467488714 24.617316567634912,14.168530387697455 24.4444297669804,14.292893218813452 24.292893218813454,14.444429766980399 24.168530387697455,14.61731656763491 24.076120467488714,14.804909677983872 24.019214719596768,15 24,15.195090322016128 24.019214719596768,15.38268343236509 24.076120467488714,15.555570233019603 24.168530387697455,15.707106781186548 24.292893218813454,15.831469612302545 24.4444297669804,15.923879532511286 24.61731656763491,15.98078528040323 24.804909677983872,16 25)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(-0 0)'), 2)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(-0 0)'), 2)) POLYGON((2 0,1.9616 0.3902,1.8478 0.7654,1.6629 1.1111,1.4142 1.4142,1.1111 1.6629,0.7654 1.8478,0.3902 1.9616,0 2,-0.3902 1.9616,-0.7654 1.8478,-1.1111 1.6629,-1.4142 1.4142,-1.6629 1.1111,-1.8478 0.7654,-1.9616 0.3902,-2 0,-1.9616 -0.3902,-1.8478 -0.7654,-1.6629 -1.1111,-1.4142 -1.4142,-1.1111 -1.6629,-0.7654 -1.8478,-0.3902 -1.9616,0 -2,0.3902 -1.9616,0.7654 -1.8478,1.1111 -1.6629,1.4142 -1.4142,1.6629 -1.1111,1.8478 -0.7654,1.9616 -0.3902,2 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(2.34 -2.34)'), 3)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(2.34 -2.34)'), 3)) POLYGON((5.34 -2.34,5.2824 -1.7547,5.1116 -1.1919,4.8344 -0.6733,4.4613 -0.2187,4.0067 0.1544,3.4881 0.4316,2.9253 0.6024,2.34 0.66,1.7547 0.6024,1.1919 0.4316,0.6733 0.1544,0.2187 -0.2187,-0.1544 -0.6733,-0.4316 -1.1919,-0.6024 -1.7547,-0.66 -2.34,-0.6024 -2.9253,-0.4316 -3.4881,-0.1544 -4.0067,0.2187 -4.4613,0.6733 -4.8344,1.1919 -5.1116,1.7547 -5.2824,2.34 -5.34,2.9253 -5.2824,3.4881 -5.1116,4.0067 -4.8344,4.4613 -4.4613,4.8344 -4.0067,5.1116 -3.4881,5.2824 -2.9253,5.34 -2.34)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1000 -1000)'), 5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1000 -1000)'), 5)) POLYGON((1005 -1000,1004.9039264020162 -999.0245483899193,1004.6193976625565 -998.0865828381745,1004.1573480615127 -997.222148834902,1003.5355339059328 -996.4644660940672,1002.777851165098 -995.8426519384873,1001.9134171618255 -995.3806023374435,1000.9754516100807 -995.0960735979838,1000 -995,999.0245483899193 -995.0960735979838,998.0865828381745 -995.3806023374435,997.222148834902 -995.8426519384873,996.4644660940672 -996.4644660940672,995.8426519384873 -997.222148834902,995.3806023374435 -998.0865828381745,995.0960735979838 -999.0245483899193,995 -1000,995.0960735979838 -1000.9754516100807,995.3806023374435 -1001.9134171618255,995.8426519384873 -1002.777851165098,996.4644660940672 -1003.5355339059328,997.222148834902 -1004.1573480615127,998.0865828381745 -1004.6193976625565,999.0245483899193 -1004.9039264020162,1000 -1005,1000.9754516100807 -1004.9039264020162,1001.9134171618255 -1004.6193976625565,1002.777851165098 -1004.1573480615127,1003.5355339059328 -1003.5355339059328,1004.1573480615127 -1002.777851165098,1004.6193976625565 -1001.9134171618255,1004.9039264020162 -1000.9754516100807,1005 -1000)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(-0 0)'), 10)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(-0 0)'), 10)) POLYGON((10 0,9.8079 1.9509,9.2388 3.8268,8.3147 5.5557,7.0711 7.0711,5.5557 8.3147,3.8268 9.2388,1.9509 9.8079,0 10,-1.9509 9.8079,-3.8268 9.2388,-5.5557 8.3147,-7.0711 7.0711,-8.3147 5.5557,-9.2388 3.8268,-9.8079 1.9509,-10 0,-9.8079 -1.9509,-9.2388 -3.8268,-8.3147 -5.5557,-7.0711 -7.0711,-5.5557 -8.3147,-3.8268 -9.2388,-1.9509 -9.8079,0 -10,1.9509 -9.8079,3.8268 -9.2388,5.5557 -8.3147,7.0711 -7.0711,8.3147 -5.5557,9.2388 -3.8268,9.8079 -1.9509,10 0)) SELECT ST_ASTEXT(ST_BUFFER(g, 100)) FROM gis_geometrycollection WHERE fid=105; ST_ASTEXT(ST_BUFFER(g, 100)) POLYGON((115 10,113.0785 29.509,107.388 48.2683,98.147 65.557,85.7107 80.7107,70.557 93.147,53.2683 102.388,34.509 108.0785,15 110,-4.509 108.0785,-23.2683 102.388,-40.557 93.147,-55.7107 80.7107,-68.147 65.557,-77.388 48.2683,-83.0785 29.509,-85 10,-83.0785 -9.509,-77.388 -28.2683,-68.147 -45.557,-55.7107 -60.7107,-40.557 -73.147,-23.2683 -82.388,-4.509 -88.0785,15 -90,34.509 -88.0785,53.2683 -82.388,70.557 -73.147,85.7107 -60.7107,98.147 -45.557,107.388 -28.2683,113.0785 -9.509,115 10)) ##################################################################################### # ST_BUFFER(multipoint, distance) ##################################################################################### SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_all_points), 0)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_all_points), 0)) MULTIPOINT((5 0),(25 0),(15 10),(15 25)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_bottom_points), 2)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_bottom_points), 2)) MULTIPOLYGON(((7 0,6.9616 0.3902,6.8478 0.7654,6.6629 1.1111,6.4142 1.4142,6.1111 1.6629,5.7654 1.8478,5.3902 1.9616,5 2,4.6098 1.9616,4.2346 1.8478,3.8889 1.6629,3.5858 1.4142,3.3371 1.1111,3.1522 0.7654,3.0384 0.3902,3 0,3.0384 -0.3902,3.1522 -0.7654,3.3371 -1.1111,3.5858 -1.4142,3.8889 -1.6629,4.2346 -1.8478,4.6098 -1.9616,5 -2,5.3902 -1.9616,5.7654 -1.8478,6.1111 -1.6629,6.4142 -1.4142,6.6629 -1.1111,6.8478 -0.7654,6.9616 -0.3902,7 0)),((27 0,26.9616 0.3902,26.8478 0.7654,26.6629 1.1111,26.4142 1.4142,26.1111 1.6629,25.7654 1.8478,25.3902 1.9616,25 2,24.6098 1.9616,24.2346 1.8478,23.8889 1.6629,23.5858 1.4142,23.3371 1.1111,23.1522 0.7654,23.0384 0.3902,23 0,23.0384 -0.3902,23.1522 -0.7654,23.3371 -1.1111,23.5858 -1.4142,23.8889 -1.6629,24.2346 -1.8478,24.6098 -1.9616,25 -2,25.3902 -1.9616,25.7654 -1.8478,26.1111 -1.6629,26.4142 -1.4142,26.6629 -1.1111,26.8478 -0.7654,26.9616 -0.3902,27 0))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(0 0,0 0,0 0,0 0)'), 5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(0 0,0 0,0 0,0 0)'), 5)) POLYGON((4.9039 -0.9755,5 0,4.9039 0.9755,4.6194 1.9134,4.1573 2.7779,3.5355 3.5355,2.7779 4.1573,1.9134 4.6194,0.9755 4.9039,0 5,-0.9755 4.9039,-1.9134 4.6194,-2.7779 4.1573,-3.5355 3.5355,-4.1573 2.7779,-4.6194 1.9134,-4.9039 0.9755,-5 0,-4.9039 -0.9755,-4.6194 -1.9134,-4.1573 -2.7779,-3.5355 -3.5355,-2.7779 -4.1573,-1.9134 -4.6194,-0.9755 -4.9039,0 -5,0.9755 -4.9039,1.9134 -4.6194,2.7779 -4.1573,3.5355 -3.5355,4.1573 -2.7779,4.6194 -1.9134,4.9039 -0.9755)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(0 0,0 5,5 5,5 0,0 0)'), 5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(0 0,0 5,5 5,5 0,0 0)'), 5)) POLYGON((2.5 -4.3059,3.0866 -4.6194,4.0245 -4.9039,5 -5,5.9755 -4.9039,6.9134 -4.6194,7.7779 -4.1573,8.5355 -3.5355,9.1573 -2.7779,9.6194 -1.9134,9.9039 -0.9755,10 0,9.9039 0.9755,9.6194 1.9134,9.3059 2.5,9.6194 3.0866,9.9039 4.0245,10 5,9.9039 5.9755,9.6194 6.9134,9.1573 7.7779,8.5355 8.5355,7.7779 9.1573,6.9134 9.6194,5.9755 9.9039,5 10,4.0245 9.9039,3.0866 9.6194,2.5 9.3059,1.9134 9.6194,0.9755 9.9039,0 10,-0.9755 9.9039,-1.9134 9.6194,-2.7779 9.1573,-3.5355 8.5355,-4.1573 7.7779,-4.6194 6.9134,-4.9039 5.9755,-5 5,-4.9039 4.0245,-4.6194 3.0866,-4.3059 2.5,-4.6194 1.9134,-4.9039 0.9755,-5 0,-4.9039 -0.9755,-4.6194 -1.9134,-4.1573 -2.7779,-3.5355 -3.5355,-2.7779 -4.1573,-1.9134 -4.6194,-0.9755 -4.9039,0 -5,0.9755 -4.9039,1.9134 -4.6194,2.5 -4.3059)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(1 -1,1000 -1000,0 0)'), 100)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(1 -1,1000 -1000,0 0)'), 100)) MULTIPOLYGON(((1100 -1000,1098.079 -980.491,1092.388 -961.732,1083.147 -944.443,1070.711 -929.289,1055.557 -916.853,1038.268 -907.612,1019.509 -901.921,1000 -900,980.491 -901.921,961.732 -907.612,944.443 -916.853,929.289 -929.289,916.853 -944.443,907.612 -961.732,901.921 -980.491,900 -1000,901.921 -1019.509,907.612 -1038.268,916.853 -1055.557,929.289 -1070.711,944.443 -1083.147,961.732 -1092.388,980.491 -1098.079,1000 -1100,1019.509 -1098.079,1038.268 -1092.388,1055.557 -1083.147,1070.711 -1070.711,1083.147 -1055.557,1092.388 -1038.268,1098.079 -1019.509,1100 -1000)),((-70.162 -71.161,-69.711 -71.711,-54.557 -84.147,-37.268 -93.388,-18.509 -99.079,1 -101,20.509 -99.079,39.268 -93.388,56.557 -84.147,71.711 -71.711,84.147 -56.557,93.388 -39.268,99.079 -20.509,101 -1,99.079 18.509,93.388 37.268,84.147 54.557,71.711 69.711,71.162 70.161,70.711 70.711,55.557 83.147,38.268 92.388,19.509 98.079,0 100,-19.509 98.079,-38.268 92.388,-55.557 83.147,-70.711 70.711,-83.147 55.557,-92.388 38.268,-98.078 19.509,-100 0,-98.078 -19.509,-92.388 -38.268,-83.147 -55.557,-70.711 -70.711,-70.162 -71.161))) SELECT ST_ASTEXT(ST_BUFFER(g, 20)) FROM gis_geometrycollection WHERE fid=108; ST_ASTEXT(ST_BUFFER(g, 20)) POLYGON((15 -17.2234,17.3463 -18.4776,21.0982 -19.6157,25 -20,28.9018 -19.6157,32.6537 -18.4776,36.1114 -16.6294,39.1421 -14.1421,41.6294 -11.1114,43.4776 -7.6537,44.6157 -3.9018,45 0,44.6157 3.9018,43.4776 7.6537,41.6294 11.1114,39.1421 14.1421,36.1114 16.6294,32.6537 18.4776,28.9018 19.6157,25 20,21.0982 19.6157,17.3463 18.4776,15 17.2234,12.6537 18.4776,8.9018 19.6157,5 20,1.0982 19.6157,-2.6537 18.4776,-6.1114 16.6294,-9.1421 14.1421,-11.6294 11.1114,-13.4776 7.6537,-14.6157 3.9018,-15 0,-14.6157 -3.9018,-13.4776 -7.6537,-11.6294 -11.1114,-9.1421 -14.1421,-6.1114 -16.6294,-2.6537 -18.4776,1.0982 -19.6157,5 -20,8.9018 -19.6157,12.6537 -18.4776,15 -17.2234)) ##################################################################################### # ST_BUFFER(linestring, distance) ##################################################################################### SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_top_to_center), 0)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_top_to_center), 0)) LINESTRING(15 25,15 10) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_line_horizontal), 1)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_line_horizontal), 1)) POLYGON((10 16,9.804909677983874 15.98078528040323,9.617316567634912 15.923879532511288,9.444429766980399 15.831469612302547,9.292893218813454 15.707106781186548,9.168530387697455 15.555570233019603,9.076120467488714 15.382683432365091,9.01921471959677 15.19509032201613,9 15,9.01921471959677 14.804909677983872,9.076120467488714 14.61731656763491,9.168530387697455 14.444429766980399,9.292893218813452 14.292893218813452,9.444429766980399 14.168530387697455,9.61731656763491 14.076120467488714,9.804909677983872 14.01921471959677,10 14,20 14,20 14,20.195090322016128 14.01921471959677,20.38268343236509 14.076120467488714,20.5555702330196 14.168530387697455,20.707106781186546 14.292893218813452,20.831469612302545 14.444429766980399,20.923879532511286 14.61731656763491,20.980785280403232 14.804909677983872,21 15,20.980785280403232 15.195090322016128,20.923879532511286 15.38268343236509,20.831469612302545 15.555570233019601,20.707106781186546 15.707106781186548,20.5555702330196 15.831469612302545,20.38268343236509 15.923879532511286,20.195090322016128 15.98078528040323,20 16,10 16)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,-0 0,0 0)'), 5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,-0 0,0 0)'), 5)) POLYGON((5 0,4.9039 0.9755,4.6194 1.9134,4.1573 2.7779,3.5355 3.5355,2.7779 4.1573,1.9134 4.6194,0.9755 4.9039,0 5,-0.9755 4.9039,-1.9134 4.6194,-2.7779 4.1573,-3.5355 3.5355,-4.1573 2.7779,-4.6194 1.9134,-4.9039 0.9755,-5 0,-4.9039 -0.9755,-4.6194 -1.9134,-4.1573 -2.7779,-3.5355 -3.5355,-2.7779 -4.1573,-1.9134 -4.6194,-0.9755 -4.9039,0 -5,0.9755 -4.9039,1.9134 -4.6194,2.7779 -4.1573,3.5355 -3.5355,4.1573 -2.7779,4.6194 -1.9134,4.9039 -0.9755,5 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(10 10,10 15,15 15,15 10,10 10)'), 10)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(10 10,10 15,15 15,15 10,10 10)'), 10)) POLYGON((10 0,15 0,16.9509 0.1921,18.8268 0.7612,20.5557 1.6853,22.0711 2.9289,23.3147 4.4443,24.2388 6.1732,24.8079 8.0491,25 10,25 15,24.8079 16.9509,24.2388 18.8268,23.3147 20.5557,22.0711 22.0711,20.5557 23.3147,18.8268 24.2388,16.9509 24.8079,15 25,10 25,8.0491 24.8079,6.1732 24.2388,4.4443 23.3147,2.9289 22.0711,1.6853 20.5557,0.7612 18.8268,0.1921 16.9509,0 15,0 10,0.1921 8.0491,0.7612 6.1732,1.6853 4.4443,2.9289 2.9289,4.4443 1.6853,6.1732 0.7612,8.0491 0.1921,10 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 -1,1000 -1000,0.0001 0)'), 1000)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 -1,1000 -1000,0.0001 0)'), 1000)) POLYGON((1707.1068 -292.8932,708.1068 706.1068,707.1069 707.1067,555.5704 831.4696,382.6836 923.8795,195.0905 980.7853,0.0002 1000,-195.0902 980.7853,-382.6833 923.8796,-555.5701 831.4696,-707.1066 707.1068,-831.4695 555.5703,-923.8794 382.6835,-980.7852 195.0904,-999.9999 0.0001,-980.7852 -195.0903,-923.8795 -382.6834,-831.4695 -555.5702,-707.1067 -707.1067,-706.1068 -708.1068,292.8932 -1707.1067,444.4298 -1831.4696,617.3166 -1923.8795,804.9097 -1980.7853,1000 -2000,1195.0903 -1980.7853,1382.6834 -1923.8795,1555.5702 -1831.4696,1707.1068 -1707.1068,1831.4696 -1555.5703,1923.8795 -1382.6835,1980.7853 -1195.0904,2000 -1000,1980.7853 -804.9097,1923.8795 -617.3166,1831.4696 -444.4298,1707.1068 -292.8932)) SELECT ST_ASTEXT(ST_BUFFER(g, 20)) FROM gis_geometrycollection WHERE fid=110; ST_ASTEXT(ST_BUFFER(g, 20)) POLYGON((10 35,6.0982 34.6157,2.3463 33.4776,-1.1114 31.6294,-4.1421 29.1421,-6.6294 26.1114,-8.4776 22.6537,-9.6157 18.9018,-10 15,-9.6157 11.0982,-8.4776 7.3463,-6.6294 3.8886,-4.1421 0.8579,-1.1114 -1.6294,2.3463 -3.4776,6.0982 -4.6157,10 -5,20 -5,20 -5,23.9018 -4.6157,27.6537 -3.4776,31.1114 -1.6294,34.1421 0.8579,36.6294 3.8886,38.4776 7.3463,39.6157 11.0982,40 15,39.6157 18.9018,38.4776 22.6537,36.6294 26.1114,34.1421 29.1421,31.1114 31.6294,27.6537 33.4776,23.9018 34.6157,20 35,10 35)) ##################################################################################### # ST_BUFFER(multilinestring, distance) ##################################################################################### SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_lines_near_vertical), 0)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_lines_near_vertical), 0)) LINESTRING(0 5,15 25,0 25) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_lines_near_horizontal), 2)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_lines_near_horizontal), 2)) POLYGON((5.0978 9.609,23.971 -1.715,24.3254 -1.8828,24.7056 -1.9782,25.0972 -1.9976,25.4851 -1.9403,25.8543 -1.8084,26.1907 -1.607,26.4813 -1.3438,26.715 -1.029,26.8828 -0.6746,26.9782 -0.2944,26.9976 0.0972,26.9403 0.4851,26.8084 0.8543,26.607 1.1907,26.3438 1.4813,26.029 1.715,7.1557 13.0389,16.715 28.971,16.8806 29.3193,16.9763 29.6928,16.9985 30.0778,16.9464 30.4599,16.822 30.8249,16.6298 31.1592,16.3771 31.4504,16.0731 31.6877,15.7293 31.8623,15.3583 31.9676,14.9741 31.9998,14.5908 31.9577,14.2227 31.8428,13.8835 31.6593,13.5858 31.4142,-1.4142 16.4142,-1.6463 16.1356,-1.8243 15.8196,-1.9424 15.4767,-1.9965 15.1181,-1.985 14.7556,-1.9083 14.4012,-1.7687 14.0664,-1.5711 13.7624,-1.3218 13.499,-1.029 13.285,1.6678 11.6669,-1.715 6.029,-1.8828 5.6746,-1.9782 5.2944,-1.9976 4.9028,-1.9403 4.5149,-1.8084 4.1457,-1.607 3.8093,-1.3438 3.5187,-1.029 3.285,-0.6746 3.1172,-0.2944 3.0218,0.0972 3.0024,0.4851 3.0597,0.8543 3.1916,1.1907 3.393,1.4813 3.6562,1.715 3.971,5.0978 9.609),(4.9264 17.098,3.7258 15.0969,3.2255 15.3971,4.9264 17.098)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,-0 0),(0 0,0 -0))'), 10)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,-0 0),(0 0,0 -0))'), 10)) POLYGON((9.8079 -1.9509,10 0,9.8079 1.9509,9.2388 3.8268,8.3147 5.5557,7.0711 7.0711,5.5557 8.3147,3.8268 9.2388,1.9509 9.8079,0 10,-1.9509 9.8079,-3.8268 9.2388,-5.5557 8.3147,-7.0711 7.0711,-8.3147 5.5557,-9.2388 3.8268,-9.8079 1.9509,-10 0,-9.8079 -1.9509,-9.2388 -3.8268,-8.3147 -5.5557,-7.0711 -7.0711,-5.5557 -8.3147,-3.8268 -9.2388,-1.9509 -9.8079,0 -10,1.9509 -9.8079,3.8268 -9.2388,5.5557 -8.3147,7.0711 -7.0711,8.3147 -5.5557,9.2388 -3.8268,9.8079 -1.9509)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,0 5,5 5,5 0,0 0))'), 50)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,0 5,5 5,5 0,0 0))'), 50)) POLYGON((0 -50,5 -50,14.7545 -49.0393,24.1342 -46.194,32.7785 -41.5735,40.3553 -35.3553,46.5735 -27.7785,51.194 -19.1342,54.0393 -9.7545,55 0,55 5,54.0393 14.7545,51.194 24.1342,46.5735 32.7785,40.3553 40.3553,32.7785 46.5735,24.1342 51.194,14.7545 54.0393,5 55,0 55,-9.7545 54.0393,-19.1342 51.194,-27.7785 46.5735,-35.3553 40.3553,-41.5735 32.7785,-46.194 24.1342,-49.0393 14.7545,-50 5,-50 0,-49.0393 -9.7545,-46.194 -19.1342,-41.5735 -27.7785,-35.3553 -35.3553,-27.7785 -41.5735,-19.1342 -46.194,-9.7545 -49.0393,0 -50)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 10,10 0),(10 0,0 0),(0 0,10 10))'), 100)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 10,10 0),(10 0,0 0),(0 0,10 10))'), 100)) POLYGON((5 109.5075,0 110,-19.509 108.0785,-38.2683 102.388,-55.557 93.147,-70.7107 80.7107,-83.147 65.557,-92.388 48.2683,-98.0785 29.509,-100 10,-99.5075 5,-100 0,-98.0785 -19.509,-92.388 -38.2683,-83.147 -55.557,-70.7107 -70.7107,-55.557 -83.147,-38.2683 -92.388,-19.509 -98.0785,0 -100,10 -100,29.509 -98.0785,48.2683 -92.388,65.557 -83.147,80.7107 -70.7107,93.147 -55.557,102.388 -38.2683,108.0785 -19.509,110 0,109.5075 5,110 10,108.0785 29.509,102.388 48.2683,93.147 65.557,80.7107 80.7107,65.557 93.147,48.2683 102.388,29.509 108.0785,10 110,5 109.5075)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((1 -1,1000 -1000,0 0),(2 2,4 -9))'), 1000)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((1 -1,1000 -1000,0 0),(2 2,4 -9))'), 1000)) POLYGON((292.89 -1707.11,444.43 -1831.47,617.32 -1923.88,804.91 -1980.79,1000 -2000,1195.09 -1980.79,1382.68 -1923.88,1555.57 -1831.47,1707.11 -1707.11,1831.47 -1555.57,1923.88 -1382.68,1980.79 -1195.09,2000 -1000,1980.79 -804.91,1923.88 -617.32,1831.47 -444.43,1707.11 -292.89,735.31 678.9,720.7 697.32,571.24 824.17,399.9 919.43,213.27 979.43,18.53 1001.86,-176.85 985.88,-194.48 980.85,-195.09 980.79,-201.44 978.86,-365.36 932.08,-379.37 924.88,-382.68 923.88,-415.68 906.24,-539.75 842.54,-549.85 834.53,-555.57 831.47,-609.84 786.93,-693.32 720.7,-699.7 713.19,-707.11 707.11,-772.93 626.91,-820.17 571.24,-823.45 565.34,-831.47 555.57,-895.94 434.96,-915.43 399.9,-916.56 396.37,-923.88 382.68,-972.63 221.96,-975.43 213.27,-975.52 212.44,-980.79 195.09,-1000 0,-980.79 -195.09,-930.55 -360.69,-926.08 -376.36,-925.39 -377.7,-923.88 -382.68,-897.34 -432.34,-836.54 -550.75,-714.7 -704.33,-682.91 -731.3,292.89 -1707.11)) SELECT ST_ASTEXT(ST_BUFFER(g, 20)) FROM gis_geometrycollection WHERE fid=114; ST_ASTEXT(ST_BUFFER(g, 20)) POLYGON((-17.2187 14.9912,-18.0336 13.648,-19.3743 9.9636,-19.9704 6.0885,-19.799 2.1716,-18.8668 -1.6367,-17.2095 -5.1899,-14.8909 -8.3515,-12 -11,-8.648 -13.0336,-4.9636 -14.3743,-1.0885 -14.9704,2.8284 -14.799,6.6367 -13.8668,10.1899 -12.2095,13.3515 -9.8909,16 -7,31 13,32.9301 16.1394,34.2515 19.5796,34.9192 23.2039,34.9106 26.8891,34.2259 30.5103,32.8885 33.9443,30.9438 37.0746,28.4577 39.795,25.5146 42.013,22.2146 43.6534,18.6696 44.6605,15 45,0 45,-3.9018 44.6157,-7.6537 43.4776,-11.1114 41.6294,-14.1421 39.1421,-16.6294 36.1114,-18.4776 32.6537,-19.6157 28.9018,-20 25,-19.6157 21.0982,-18.4776 17.3463,-17.2187 14.9912)) ##################################################################################### # ST_BUFFER(polygon, distance) ##################################################################################### SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star), 0)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star), 0)) POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,30 15,22 10,25 0,15 5,5 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_elem_vertical), 0.5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_elem_vertical), 0.5)) POLYGON((15 4.441,24.7764 -0.4472,24.8628 -0.4808,24.954 -0.4979,25.0468 -0.4978,25.1379 -0.4806,25.2243 -0.4469,25.303 -0.3978,25.3712 -0.335,25.4267 -0.2606,25.4675 -0.1773,25.4922 -0.0879,25.5 0.0045,25.4905 0.0968,25.4642 0.1857,15.4642 25.1857,15.4227 25.2671,15.367 25.3396,15.299 25.4008,15.221 25.4485,15.1356 25.4813,15.0457 25.4979,14.9543 25.4979,14.8644 25.4813,14.779 25.4485,14.701 25.4008,14.633 25.3396,14.5773 25.2671,14.5358 25.1857,4.5358 0.1857,4.5095 0.0968,4.5 0.0045,4.5078 -0.0879,4.5325 -0.1773,4.5733 -0.2606,4.6288 -0.335,4.697 -0.3978,4.7757 -0.4469,4.8621 -0.4806,4.9532 -0.4978,5.046 -0.4979,5.1372 -0.4808,5.2236 -0.4472,15 4.441)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((3 3,5 5,7 3,3 3))'), 1)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((3 3,5 5,7 3,3 3))'), 1)) POLYGON((2.2929 3.7071,2.1685 3.5556,2.0761 3.3827,2.0192 3.1951,2 3,2.0192 2.8049,2.0761 2.6173,2.1685 2.4444,2.2929 2.2929,2.4444 2.1685,2.6173 2.0761,2.8049 2.0192,3 2,7 2,7.1951 2.0192,7.3827 2.0761,7.5556 2.1685,7.7071 2.2929,7.8315 2.4444,7.9239 2.6173,7.9808 2.8049,8 3,7.9808 3.1951,7.9239 3.3827,7.8315 3.5556,7.7071 3.7071,5.7071 5.7071,5.5556 5.8315,5.3827 5.9239,5.1951 5.9808,5 6,4.8049 5.9808,4.6173 5.9239,4.4444 5.8315,4.2929 5.7071,2.2929 3.7071)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0))'), 5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0))'), 5)) POLYGON((-5 0,-4.9039 -0.9755,-4.6194 -1.9134,-4.1573 -2.7779,-3.5355 -3.5355,-2.7779 -4.1573,-1.9134 -4.6194,-0.9755 -4.9039,0 -5,10 -5,10.9755 -4.9039,11.9134 -4.6194,12.7779 -4.1573,13.5355 -3.5355,14.1573 -2.7779,14.6194 -1.9134,14.9039 -0.9755,15 0,15 10,14.9039 10.9755,14.6194 11.9134,14.1573 12.7779,13.5355 13.5355,12.7779 14.1573,11.9134 14.6194,10.9755 14.9039,10 15,0 15,-0.9755 14.9039,-1.9134 14.6194,-2.7779 14.1573,-3.5355 13.5355,-4.1573 12.7779,-4.6194 11.9134,-4.9039 10.9755,-5 10,-5 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((10 10,10 20,20 20,20 10,10 10))'), 10)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((10 10,10 20,20 20,20 10,10 10))'), 10)) POLYGON((0 10,0.1921 8.0491,0.7612 6.1732,1.6853 4.4443,2.9289 2.9289,4.4443 1.6853,6.1732 0.7612,8.0491 0.1921,10 0,20 0,21.9509 0.1921,23.8268 0.7612,25.5557 1.6853,27.0711 2.9289,28.3147 4.4443,29.2388 6.1732,29.8079 8.0491,30 10,30 20,29.8079 21.9509,29.2388 23.8268,28.3147 25.5557,27.0711 27.0711,25.5557 28.3147,23.8268 29.2388,21.9509 29.8079,20 30,10 30,8.0491 29.8079,6.1732 29.2388,4.4443 28.3147,2.9289 27.0711,1.6853 25.5557,0.7612 23.8268,0.1921 21.9509,0 20,0 10)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((10 0,0 10,-10 0,0 -10,10 0 ))'), 10)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((10 0,0 10,-10 0,0 -10,10 0 ))'), 10)) POLYGON((17.0711 -7.0711,18.3147 -5.5557,19.2388 -3.8268,19.8079 -1.9509,20 0,19.8079 1.9509,19.2388 3.8268,18.3147 5.5557,17.0711 7.0711,7.0711 17.0711,5.5557 18.3147,3.8268 19.2388,1.9509 19.8079,0 20,-1.9509 19.8079,-3.8268 19.2388,-5.5557 18.3147,-7.0711 17.0711,-17.0711 7.0711,-18.3147 5.5557,-19.2388 3.8268,-19.8079 1.9509,-20 0,-19.8079 -1.9509,-19.2388 -3.8268,-18.3147 -5.5557,-17.0711 -7.0711,-7.0711 -17.0711,-5.5557 -18.3147,-3.8268 -19.2388,-1.9509 -19.8079,0 -20,1.9509 -19.8079,3.8268 -19.2388,5.5557 -18.3147,7.0711 -17.0711,17.0711 -7.0711)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4))'), 100)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4))'), 100)) POLYGON((-100 0,-98.0785 -19.509,-92.388 -38.2683,-83.147 -55.557,-70.7107 -70.7107,-55.557 -83.147,-38.2683 -92.388,-19.509 -98.0785,0 -100,10 -100,29.509 -98.0785,48.2683 -92.388,65.557 -83.147,80.7107 -70.7107,93.147 -55.557,102.388 -38.2683,108.0785 -19.509,110 0,110 10,108.0785 29.509,102.388 48.2683,93.147 65.557,80.7107 80.7107,65.557 93.147,48.2683 102.388,29.509 108.0785,10 110,0 110,-19.509 108.0785,-38.2683 102.388,-55.557 93.147,-70.7107 80.7107,-83.147 65.557,-92.388 48.2683,-98.0785 29.509,-100 10,-100 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(0 0,0 10,10 10,10 0,0 0))'), 5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(0 0,0 10,10 10,10 0,0 0))'), 5)) POLYGON((-5 0,-4.9039 -0.9755,-4.6194 -1.9134,-4.1573 -2.7779,-3.5355 -3.5355,-2.7779 -4.1573,-1.9134 -4.6194,-0.9755 -4.9039,0 -5,10 -5,10.9755 -4.9039,11.9134 -4.6194,12.7779 -4.1573,13.5355 -3.5355,14.1573 -2.7779,14.6194 -1.9134,14.9039 -0.9755,15 0,15 10,14.9039 10.9755,14.6194 11.9134,14.1573 12.7779,13.5355 13.5355,12.7779 14.1573,11.9134 14.6194,10.9755 14.9039,10 15,0 15,-0.9755 14.9039,-1.9134 14.6194,-2.7779 14.1573,-3.5355 13.5355,-4.1573 12.7779,-4.6194 11.9134,-4.9039 10.9755,-5 10,-5 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((4 4,4 6,6 6,6 4,4 4),(0 0,0 10,10 10,10 0,0 0))'), 10)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((4 4,4 6,6 6,6 4,4 4),(0 0,0 10,10 10,10 0,0 0))'), 10)) POLYGON((-6 4,-5.8079 2.0491,-5.2388 0.1732,-4.3147 -1.5557,-3.0711 -3.0711,-1.5557 -4.3147,0.1732 -5.2388,2.0491 -5.8079,4 -6,6 -6,7.9509 -5.8079,9.8268 -5.2388,11.5557 -4.3147,13.0711 -3.0711,14.3147 -1.5557,15.2388 0.1732,15.8079 2.0491,16 4,16 6,15.8079 7.9509,15.2388 9.8268,14.3147 11.5557,13.0711 13.0711,11.5557 14.3147,9.8268 15.2388,7.9509 15.8079,6 16,4 16,2.0491 15.8079,0.1732 15.2388,-1.5557 14.3147,-3.0711 13.0711,-4.3147 11.5557,-5.2388 9.8268,-5.8079 7.9509,-6 6,-6 4)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((4 4,4 6,6 6,6 4,4 4),(8 8,8 10,10 10,10 8,8 8))'), 2)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((4 4,4 6,6 6,6 4,4 4),(8 8,8 10,10 10,10 8,8 8))'), 2)) POLYGON((2 4,2.0384 3.6098,2.1522 3.2346,2.3371 2.8889,2.5858 2.5858,2.8889 2.3371,3.2346 2.1522,3.6098 2.0384,4 2,6 2,6.3902 2.0384,6.7654 2.1522,7.1111 2.3371,7.4142 2.5858,7.6629 2.8889,7.8478 3.2346,7.9616 3.6098,8 4,8 6,7.9616 6.3902,7.8478 6.7654,7.6629 7.1111,7.4142 7.4142,7.1111 7.6629,6.7654 7.8478,6.3902 7.9616,6 8,4 8,3.6098 7.9616,3.2346 7.8478,2.8889 7.6629,2.5858 7.4142,2.3371 7.1111,2.1522 6.7654,2.0384 6.3902,2 6,2 4)) SELECT ST_ASTEXT(ST_BUFFER(g, 20)) FROM gis_geometrycollection WHERE fid=100; ST_ASTEXT(ST_BUFFER(g, 20)) POLYGON((15 -17.3607,16.0557 -17.8885,19.6688 -19.2764,23.4815 -19.9423,27.3511 -19.8613,31.1326 -19.0366,34.6845 -17.4989,37.8737 -15.3058,40.5807 -12.5396,42.7043 -9.3037,44.1648 -5.7194,44.9075 -1.9209,44.9049 1.7904,46.0036 3.0049,47.9326 6.1444,49.2528 9.5845,49.9196 13.2084,49.9102 16.8932,49.225 20.5137,47.8872 23.947,45.9422 27.0766,43.4562 29.7963,40.5133 32.0138,37.2136 33.6538,33.6691 34.6606,32.3688 34.7809,30.9438 37.0746,28.4577 39.795,25.5146 42.013,22.2146 43.6534,18.6696 44.6605,15 45,11.3304 44.6605,7.7854 43.6534,4.4854 42.013,1.5423 39.795,-0.9438 37.0746,-2.3763 34.7688,-3.8547 34.625,-7.5649 33.5141,-10.9914 31.709,-14.0057 29.2773,-16.4949 26.3102,-18.3655 22.919,-19.5474 19.2308,-19.9963 15.384,-19.6954 11.5228,-18.6559 7.792,-16.9169 4.3314,-14.8483 1.6639,-14.9987 0.2282,-14.696 -3.4738,-13.714 -7.056,-12.0864 -10.3949,-9.8696 -13.3752,-7.1399 -15.8941,-3.9914 -17.8649,-0.5329 -19.2195,3.1165 -19.9111,6.8309 -19.916,10.4821 -19.234,13.9443 -17.8885,15 -17.3607)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0))'), -2)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0))'), -2)) POLYGON((8 2,8 8,2 8,2 2,8 2)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0))'), -5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0))'), -5)) GEOMETRYCOLLECTION() SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0))'), -10)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0))'), -10)) GEOMETRYCOLLECTION() SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4))'), -2)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4))'), -2)) MULTIPOLYGON(((4 2,3.6098 2.0384,3.2346 2.1522,2.8889 2.3371,2.5858 2.5858,2.3371 2.8889,2.1522 3.2346,2.0384 3.6098,2 4,2 2,4 2)),((6 8,6.3902 7.9616,6.7654 7.8478,7.1111 7.6629,7.4142 7.4142,7.6629 7.1111,7.8478 6.7654,7.9616 6.3902,8 6,8 8,6 8)),((2 8,2 6,2.0384 6.3902,2.1522 6.7654,2.3371 7.1111,2.5858 7.4142,2.8889 7.6629,3.2346 7.8478,3.6098 7.9616,4 8,2 8)),((8 2,8 4,7.9616 3.6098,7.8478 3.2346,7.6629 2.8889,7.4142 2.5858,7.1111 2.3371,6.7654 2.1522,6.3902 2.0384,6 2,8 2))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4))'), -3)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4))'), -3)) GEOMETRYCOLLECTION() SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4))'), -5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4))'), -5)) GEOMETRYCOLLECTION() SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,2 4,4 4,4 2,2 2),(6 6,6 8,8 8,8 6,6 6))'), -1)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,2 4,4 4,4 2,2 2),(6 6,6 8,8 8,8 6,6 6))'), -1)) MULTIPOLYGON(((4 1,9 1,9 6,8.9808 5.8049,8.9239 5.6173,8.8315 5.4444,8.7071 5.2929,8.5556 5.1685,8.3827 5.0761,8.1951 5.0192,8 5,6 5,5.8049 5.0192,5.6173 5.0761,5.4444 5.1685,5.2929 5.2929,5.1685 5.4444,5.0761 5.6173,5.0192 5.8049,5 6,5 8,5.0192 8.1951,5.0761 8.3827,5.1685 8.5556,5.2929 8.7071,5.4444 8.8315,5.6173 8.9239,5.8049 8.9808,6 9,1 9,1 4,1.0192 4.1951,1.0761 4.3827,1.1685 4.5556,1.2929 4.7071,1.4444 4.8315,1.6173 4.9239,1.8049 4.9808,2 5,4 5,4.1951 4.9808,4.3827 4.9239,4.5556 4.8315,4.7071 4.7071,4.8315 4.5556,4.9239 4.3827,4.9808 4.1951,5 4,5 2,4.9808 1.8049,4.9239 1.6173,4.8315 1.4444,4.7071 1.2929,4.5556 1.1685,4.3827 1.0761,4.1951 1.0192,4 1)),((1 1,2 1,1.8049 1.0192,1.6173 1.0761,1.4444 1.1685,1.2929 1.2929,1.1685 1.4444,1.0761 1.6173,1.0192 1.8049,1 2,1 1)),((9 9,8 9,8.1951 8.9808,8.3827 8.9239,8.5556 8.8315,8.7071 8.7071,8.8315 8.5556,8.9239 8.3827,8.9808 8.1951,9 8,9 9))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,2 4,4 4,4 2,2 2),(6 6,6 8,8 8,8 6,6 6))'), -2)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,2 4,4 4,4 2,2 2),(6 6,6 8,8 8,8 6,6 6))'), -2)) MULTIPOLYGON(((2 8,2 6,4 6,4 8,2 8)),((8 2,8 4,6 4,6 2,8 2))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,2 4,4 4,4 2,2 2),(6 6,6 8,8 8,8 6,6 6))'), -3)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,2 4,4 4,4 2,2 2),(6 6,6 8,8 8,8 6,6 6))'), -3)) GEOMETRYCOLLECTION() SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,2 4,4 4,4 2,2 2),(6 6,6 8,8 8,8 6,6 6))'), -5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,2 4,4 4,4 2,2 2),(6 6,6 8,8 8,8 6,6 6))'), -5)) GEOMETRYCOLLECTION() ##################################################################################### # ST_BUFFER(multipolygon, distance) ##################################################################################### SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_of_elems), 0)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_of_elems), 0)) MULTIPOLYGON(((5 0,15 25,25 0,15 5,5 0)),((25 0,0 15,30 15,22 10,25 0))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((3 3,5 5,7 3,3 3)))'), 0.5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((3 3,5 5,7 3,3 3)))'), 0.5)) POLYGON((2.6464 3.3536,2.5843 3.2778,2.5381 3.1913,2.5096 3.0975,2.5 3,2.5096 2.9025,2.5381 2.8087,2.5843 2.7222,2.6464 2.6464,2.7222 2.5843,2.8087 2.5381,2.9025 2.5096,3 2.5,7 2.5,7.0975 2.5096,7.1913 2.5381,7.2778 2.5843,7.3536 2.6464,7.4157 2.7222,7.4619 2.8087,7.4904 2.9025,7.5 3,7.4904 3.0975,7.4619 3.1913,7.4157 3.2778,7.3536 3.3536,5.3536 5.3536,5.2778 5.4157,5.1913 5.4619,5.0975 5.4904,5 5.5,4.9025 5.4904,4.8087 5.4619,4.7222 5.4157,4.6464 5.3536,2.6464 3.3536)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 10,10 0,0 0,0 10)),((0 0,10 10,10 0,0 0)))'), 1)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 10,10 0,0 0,0 10)),((0 0,10 10,10 0,0 0)))'), 1)) POLYGON((5 6.4142,0.7071 10.7071,0.5556 10.8315,0.3827 10.9239,0.1951 10.9808,-0 11,-0.1951 10.9808,-0.3827 10.9239,-0.5556 10.8315,-0.7071 10.7071,-0.8315 10.5556,-0.9239 10.3827,-0.9808 10.1951,-1 10,-1 0,-0.9808 -0.1951,-0.9239 -0.3827,-0.8315 -0.5556,-0.7071 -0.7071,-0.5556 -0.8315,-0.3827 -0.9239,-0.1951 -0.9808,0 -1,10 -1,10.1951 -0.9808,10.3827 -0.9239,10.5556 -0.8315,10.7071 -0.7071,10.8315 -0.5556,10.9239 -0.3827,10.9808 -0.1951,11 -0,11 10,10.9808 10.1951,10.9239 10.3827,10.8315 10.5556,10.7071 10.7071,10.5556 10.8315,10.3827 10.9239,10.1951 10.9808,10 11,9.8049 10.9808,9.6173 10.9239,9.4444 10.8315,9.2929 10.7071,5 6.4142)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,0 0)),((10 10,10 15,15 15,10 10)))'), 20)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,0 0)),((10 10,10 15,15 15,10 10)))'), 20)) POLYGON((-3.5192 29.6534,-3.9018 29.6157,-7.6537 28.4776,-11.1114 26.6294,-14.1421 24.1421,-16.6294 21.1114,-18.4776 17.6537,-19.6157 13.9018,-20 10,-20 0,-19.6157 -3.9018,-18.4776 -7.6537,-16.6294 -11.1114,-14.1421 -14.1421,-11.1114 -16.6294,-7.6537 -18.4776,-3.9018 -19.6157,0 -20,3.9018 -19.6157,7.6537 -18.4776,11.1114 -16.6294,14.1421 -14.1421,24.1421 -4.1421,29.1421 0.8579,31.6294 3.8886,33.4776 7.3463,34.6157 11.0982,35 15,34.6157 18.9018,33.4776 22.6537,31.6294 26.1114,29.1421 29.1421,26.1114 31.6294,22.6537 33.4776,18.9018 34.6157,15 35,10 35,6.0982 34.6157,2.3463 33.4776,-1.1114 31.6294,-3.5192 29.6534)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((4 4,4 6,6 6,6 4, 4 4)))'), 4)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((4 4,4 6,6 6,6 4, 4 4)))'), 4)) POLYGON((-4 0,-3.9231 -0.7804,-3.6955 -1.5307,-3.3259 -2.2223,-2.8284 -2.8284,-2.2223 -3.3259,-1.5307 -3.6955,-0.7804 -3.9231,0 -4,10 -4,10.7804 -3.9231,11.5307 -3.6955,12.2223 -3.3259,12.8284 -2.8284,13.3259 -2.2223,13.6955 -1.5307,13.9231 -0.7804,14 0,14 10,13.9231 10.7804,13.6955 11.5307,13.3259 12.2223,12.8284 12.8284,12.2223 13.3259,11.5307 13.6955,10.7804 13.9231,10 14,0 14,-0.7804 13.9231,-1.5307 13.6955,-2.2223 13.3259,-2.8284 12.8284,-3.3259 12.2223,-3.6955 11.5307,-3.9231 10.7804,-4 10,-4 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4)))'), 4)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4)))'), 4)) POLYGON((-4 0,-3.9231 -0.7804,-3.6955 -1.5307,-3.3259 -2.2223,-2.8284 -2.8284,-2.2223 -3.3259,-1.5307 -3.6955,-0.7804 -3.9231,0 -4,10 -4,10.7804 -3.9231,11.5307 -3.6955,12.2223 -3.3259,12.8284 -2.8284,13.3259 -2.2223,13.6955 -1.5307,13.9231 -0.7804,14 0,14 10,13.9231 10.7804,13.6955 11.5307,13.3259 12.2223,12.8284 12.8284,12.2223 13.3259,11.5307 13.6955,10.7804 13.9231,10 14,0 14,-0.7804 13.9231,-1.5307 13.6955,-2.2223 13.3259,-2.8284 12.8284,-3.3259 12.2223,-3.6955 11.5307,-3.9231 10.7804,-4 10,-4 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(0 0,0 10,10 10,10 0,0 0)))'), 5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(0 0,0 10,10 10,10 0,0 0)))'), 5)) POLYGON((-5 0,-4.9039 -0.9755,-4.6194 -1.9134,-4.1573 -2.7779,-3.5355 -3.5355,-2.7779 -4.1573,-1.9134 -4.6194,-0.9755 -4.9039,0 -5,10 -5,10.9755 -4.9039,11.9134 -4.6194,12.7779 -4.1573,13.5355 -3.5355,14.1573 -2.7779,14.6194 -1.9134,14.9039 -0.9755,15 0,15 10,14.9039 10.9755,14.6194 11.9134,14.1573 12.7779,13.5355 13.5355,12.7779 14.1573,11.9134 14.6194,10.9755 14.9039,10 15,0 15,-0.9755 14.9039,-1.9134 14.6194,-2.7779 14.1573,-3.5355 13.5355,-4.1573 12.7779,-4.6194 11.9134,-4.9039 10.9755,-5 10,-5 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((4 4,4 6,6 6,6 4,4 4),(0 0,0 10,10 10,10 0,0 0)))'), 5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((4 4,4 6,6 6,6 4,4 4),(0 0,0 10,10 10,10 0,0 0)))'), 5)) GEOMETRYCOLLECTION() SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((4 4,4 6,6 6,6 4,4 4),(8 8,8 10,10 10,10 8,8 8)))'), 2)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((4 4,4 6,6 6,6 4,4 4),(8 8,8 10,10 10,10 8,8 8)))'), 2)) POLYGON((2 4,2.0384 3.6098,2.1522 3.2346,2.3371 2.8889,2.5858 2.5858,2.8889 2.3371,3.2346 2.1522,3.6098 2.0384,4 2,6 2,6.3902 2.0384,6.7654 2.1522,7.1111 2.3371,7.4142 2.5858,7.6629 2.8889,7.8478 3.2346,7.9616 3.6098,8 4,8 6,7.9616 6.3902,7.8478 6.7654,7.6629 7.1111,7.4142 7.4142,7.1111 7.6629,6.7654 7.8478,6.3902 7.9616,6 8,4 8,3.6098 7.9616,3.2346 7.8478,2.8889 7.6629,2.5858 7.4142,2.3371 7.1111,2.1522 6.7654,2.0384 6.3902,2 6,2 4)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((10 10,10 0,5 10,10 10)),((0 10,0 20,5 10,0 10)))'), 20)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((10 10,10 0,5 10,10 10)),((0 10,0 20,5 10,0 10)))'), 20)) POLYGON((-8.2927 -8.136,-7.8885 -8.9443,-5.8618 -12.1821,-3.2565 -14.9755,-0.1676 -17.2226,3.2922 -18.8416,6.9966 -19.7732,10.8106 -19.9836,14.5951 -19.465,18.2119 -18.2364,21.5292 -16.3425,24.4259 -13.8526,26.7964 -10.8573,28.5542 -7.466,29.6352 -3.8023,30 0,30 10,29.6157 13.9018,28.4776 17.6537,26.6294 21.1114,24.1421 24.1421,21.1114 26.6294,18.2927 28.136,17.8885 28.9443,15.8618 32.1821,13.2565 34.9755,10.1676 37.2226,6.7078 38.8416,3.0034 39.7732,-0.8106 39.9836,-4.5951 39.465,-8.2119 38.2364,-11.5292 36.3425,-14.4259 33.8526,-16.7964 30.8573,-18.5542 27.466,-19.6352 23.8023,-20 20,-20 10,-19.6157 6.0982,-18.4776 2.3463,-16.6294 -1.1114,-14.1421 -4.1421,-11.1114 -6.6294,-8.2927 -8.136)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(0 0,0 10,10 10,10 0,0 0)),((0 0,0 10,10 10,10 0,0 0)))'), 100)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(0 0,0 10,10 10,10 0,0 0)),((0 0,0 10,10 10,10 0,0 0)))'), 100)) POLYGON((10 110,0 110,-19.509 108.0785,-38.2683 102.388,-55.557 93.147,-70.7107 80.7107,-83.147 65.557,-92.388 48.2683,-98.0785 29.509,-100 10,-100 0,-98.0785 -19.509,-92.388 -38.2683,-83.147 -55.557,-70.7107 -70.7107,-55.557 -83.147,-38.2683 -92.388,-19.509 -98.0785,0 -100,10 -100,29.509 -98.0785,48.2683 -92.388,65.557 -83.147,80.7107 -70.7107,93.147 -55.557,102.388 -38.2683,108.0785 -19.509,110 0,110 10,108.0785 29.509,102.388 48.2683,93.147 65.557,80.7107 80.7107,65.557 93.147,48.2683 102.388,29.509 108.0785,10 110)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(0 0,0 10,10 10,10 0,0 0)),' '((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6, 4 4)))'), 1000)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(0 0,0 10,10 10,10 0,0 0)),' '((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6, 4 4)))'), 1000)) POLYGON((10 1010,0 1010,-195.0903 990.7853,-382.6834 933.8795,-555.5702 841.4696,-707.1068 717.1068,-831.4696 565.5702,-923.8795 392.6834,-980.7853 205.0903,-1000 10,-1000 0,-980.7853 -195.0903,-923.8795 -382.6834,-831.4696 -555.5702,-707.1068 -707.1068,-555.5702 -831.4696,-382.6834 -923.8795,-195.0903 -980.7853,0 -1000,10 -1000,205.0903 -980.7853,392.6834 -923.8795,565.5702 -831.4696,717.1068 -707.1068,841.4696 -555.5702,933.8795 -382.6834,990.7853 -195.0903,1010 0,1010 10,990.7853 205.0903,933.8795 392.6834,841.4696 565.5702,717.1068 717.1068,565.5702 841.4696,392.6834 933.8795,205.0903 990.7853,10 1010)) SELECT ST_ASTEXT(ST_BUFFER(g, 20)) FROM gis_geometrycollection WHERE fid=103; ST_ASTEXT(ST_BUFFER(g, 20)) POLYGON((15.000001034274 -17.360680292135,16.055728090001 -17.888543819998,17.05695241022 -18.277767398939,18.036969761672 -18.748765556701,18.791543359698 -18.952076436705,19.513605851123 -19.232770971526,20.560323430982 -19.428653186497,21.601027046921 -19.709058396185,22.389620895482 -19.770985011858,23.160268586622 -19.915204953167,24.215869804709 -19.914396496148,25.280859015937 -19.998027858096,26.076802800948 -19.91297501152,26.870235860276 -19.912363441514,27.898439945493 -19.718318771356,28.95112445877 -19.605831160941,29.727007318712 -19.373220151413,30.515848948033 -19.224344212027,31.481833991057 -18.84712011122,32.486808017295 -18.54582717789,33.215198543551 -18.170226369641,33.971663531698 -17.874821774608,34.843454553241 -17.330602224035,35.767478416673 -16.854121411289,36.421934267429 -16.345232902906,37.118766195662 -15.910232741694,37.868228891705 -15.220630359922,38.681390555289 -14.588336179073,39.23747994126 -13.960736648624,39.84886619747 -13.398177960067,40.452478682288 -12.589495516168,41.129291729157 -11.825647902577,41.565485691838 -11.098358088614,42.068021715792 -10.425096388487,42.507787320356 -9.527207557571,43.027802344439 -8.660158349006,43.32621505532 -7.856199441815,43.699872356845 -7.093290762243,43.963765683364 -6.138563136424,44.312255965376 -5.199689368395,44.459455114067 -4.345222020385,44.688266689815 -3.517407390498,44.770500401079 -2.539654230981,44.938901960873 -1.562110301703,44.926432690103 -0.685615870684,44.999194398682 0.17950878459,44.900370525731 1.146355088366,44.891418507445 1.775576406702,46.00363701272 3.004850881915,47.93259127868 6.144370715087,49.252848420451 9.584482693302,49.919594126876 13.208416951261,49.910196632822 16.893164029441,49.224974923287 20.513650260851,47.887187905897 23.946983224481,45.942244919301 27.076623159353,43.45616437569 29.796338746271,40.513332856672 32.013812983715,37.213640726934 33.653776761362,33.669091493324 34.660563766424,32.368108982336 34.780922427548,31.90644890027 35.685129179498,29.678014161645 38.585135268761,26.958748218274 41.030855905158,23.839583028956 42.940506455343,20.424823139988 44.250228411628,16.828657752429 44.916224813565,13.171342247571 44.916224813565,9.575176860011 44.250228411628,6.160416971044 42.940506455343,3.041251781726 41.030855905158,0.321985838355 38.585135268761,-1.90644890027 35.685129179498,-2.368940236166 34.779294335031,-3.694618779319 34.655782662502,-7.26206237471 33.63497920755,-10.579533192563 31.972727459883,-13.532838135665 29.726245006582,-16.020319327581 26.972859668531,-17.956353353016 23.807347742745,-19.274298564215 20.338671637916,-19.928789002022 16.686229199389,-19.897295970845 12.97574382832,-19.180903515418 9.334936864233,-17.804271106102 5.889131195082,-15.814784817162 2.756937426164,-14.842110268168 1.716355116701,-14.999194398682 0.17950878459,-14.688266689815 -3.517407390498,-13.699872356845 -7.093290762243,-12.068021715792 -10.425096388487,-9.84886619747 -13.398177960067,-7.118766195662 -15.910232741694,-3.971663531698 -17.874821774608,-0.515848948033 -19.224344212027,3.129764139724 -19.912363441514,6.839731413378 -19.915204953167,10.486394148877 -19.232770971526,13.944271909999 -17.888543819998,15.000001034274 -17.360680292135)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))'), -2)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))'), -2)) POLYGON((8 2,8 8,2 8,2 2,8 2)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))'), -5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))'), -5)) GEOMETRYCOLLECTION() SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4)))'), -2)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4)))'), -2)) MULTIPOLYGON(((4 2,3.6098 2.0384,3.2346 2.1522,2.8889 2.3371,2.5858 2.5858,2.3371 2.8889,2.1522 3.2346,2.0384 3.6098,2 4,2 2,4 2)),((6 8,6.3902 7.9616,6.7654 7.8478,7.1111 7.6629,7.4142 7.4142,7.6629 7.1111,7.8478 6.7654,7.9616 6.3902,8 6,8 8,6 8)),((2 8,2 6,2.0384 6.3902,2.1522 6.7654,2.3371 7.1111,2.5858 7.4142,2.8889 7.6629,3.2346 7.8478,3.6098 7.9616,4 8,2 8)),((8 2,8 4,7.9616 3.6098,7.8478 3.2346,7.6629 2.8889,7.4142 2.5858,7.1111 2.3371,6.7654 2.1522,6.3902 2.0384,6 2,8 2))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4)))'), -3)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4)))'), -3)) GEOMETRYCOLLECTION() SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((14 14,14 16,16 16,16 14,14 14)))'), -1)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((14 14,14 16,16 16,16 14,14 14)))'), -1)) POLYGON((1 1,9 1,9 9,1 9,1 1)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((14 14,14 16,16 16,16 14,14 14)))'), -2)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((14 14,14 16,16 16,16 14,14 14)))'), -2)) POLYGON((8 2,8 8,2 8,2 2,8 2)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((14 14,14 16,16 16,16 14,14 14)))'), -4)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((14 14,14 16,16 16,16 14,14 14)))'), -4)) POLYGON((6 4,6 6,4 6,4 4,6 4)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((14 14,14 16,16 16,16 14,14 14)))'), -5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((14 14,14 16,16 16,16 14,14 14)))'), -5)) GEOMETRYCOLLECTION() SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((14 14,14 16,16 16,16 14,14 14)))'), -10)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((14 14,14 16,16 16,16 14,14 14)))'), -10)) GEOMETRYCOLLECTION() SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((10 10,10 20,20 20,20 10,10 10)))'), -1)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((10 10,10 20,20 20,20 10,10 10)))'), -1)) MULTIPOLYGON(((9 1,9 9,1 9,1 1,9 1)),((19 11,19 19,11 19,11 11,19 11))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((10 10,10 20,20 20,20 10,10 10)))'), -3)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((10 10,10 20,20 20,20 10,10 10)))'), -3)) MULTIPOLYGON(((7 3,7 7,3 7,3 3,7 3)),((17 13,17 17,13 17,13 13,17 13))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((10 10,10 20,20 20,20 10,10 10)))'), -5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((10 10,10 20,20 20,20 10,10 10)))'), -5)) GEOMETRYCOLLECTION() SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((10 10,10 20,20 20,20 10,10 10)))'), -10)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((10 10,10 20,20 20,20 10,10 10)))'), -10)) GEOMETRYCOLLECTION() ##################################################################################### # ST_BUFFER(geometrycollection, distance) ##################################################################################### SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_collection_elems), 0)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_collection_elems), 0)) GEOMETRYCOLLECTION(MULTIPOLYGON(((5 0,15 25,25 0,15 5,5 0)),((25 0,0 15,30 15,22 10,25 0))),POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,30 15,22 10,25 0,15 5,5 0)),LINESTRING(15 25,15 10),MULTIPOINT((5 0),(25 0)),POINT(15 25)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_collection_multilinestr), 1)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(@star_collection_multilinestr), 1)) POLYGON((7.766188802991 16,15.857492925713 29.485504244572,15.940291061129 29.659628555309,15.988134057995 29.846406108749,15.999243362145 30.038893485424,15.973205987343 30.229935004293,15.910989867968 30.412428733796,15.814907876237 30.579590504793,15.688531841633 30.725206110742,15.536559768828 30.84386231962,15.364641190271 30.931148109786,15.179167145907 30.983818648851,14.987032597506 30.999915919702,14.795380109788 30.978841509403,14.611334326959 30.921378855086,14.441737115443 30.829664119825,14.292893218813 30.707106781187,-0.707106781187 15.707106781187,-0.755468841921 15.649058956452,-0.801015966379 15.598642983427,-0.810804423644 15.582638368942,-0.823172286857 15.567791674957,-0.823873533705 15.566546886139,-0.824742876616 15.565507902218,-0.838215676584 15.541084926405,-0.861530562574 15.499698608781,-0.897817667651 15.440367387137,-0.903750412172 15.424753104401,-0.912171969699 15.40980763499,-0.91472816007 15.402375638324,-0.918273137568 15.395947527863,-0.936304149186 15.339687585907,-0.938540849249 15.333188783867,-0.963714928211 15.266933581896,-0.966292388853 15.252549832205,-0.971179529001 15.238349160788,-0.973316934816 15.224186901832,-0.977369413652 15.211539663557,-0.984333182175 15.15187157115,-0.996439450101 15.084311459969,-0.996333065647 15.071777323142,-0.998254802091 15.059053789912,-0.99759462183 15.038228850995,-0.999815675461 15.01919935162,-0.995406702061 14.962633858598,-0.994864798542 14.898787191416,-0.992845977329 14.888527258781,-0.992507556683 14.877816736304,-0.986712248396 14.851063008983,-0.984770218923 14.826139090296,-0.970474552954 14.774832541528,-0.959045175771 14.716746843212,-0.955942693628 14.708981116877,-0.954126761635 14.700597056241,-0.941047222049 14.669212388824,-0.932797228049 14.639598374942,-0.910492137059 14.595215245586,-0.890213555305 14.544456559754,-0.886847054417 14.539156431191,-0.884374373667 14.533221715157,-0.862186935867 14.499091075785,-0.845845618808 14.466572226873,-0.817650819152 14.430215737237,-0.790739240858 14.387846871308,-0.787886138854 14.384794572793,-0.785543844349 14.381193997601,-0.752865464217 14.346674818878,-0.727175957447 14.313548889642,-0.695312929006 14.285758130872,-0.664046310797 14.252308554872,-0.662360719464 14.251070977228,-0.660884711646 14.24951255979,-0.616842814913 14.21732020001,-0.581238193719 14.186266528793,2.867524706499 11.722862077612,-0.857492925713 5.514495755428,-0.941389582191 5.337321292749,-0.989109164963 5.147183761963,-0.998817837225 4.951390041746,-0.970142500145 4.757464374964,-0.904185130847 4.572859216236,-0.803480434044 4.404668838285,-0.671898434757 4.259356703014,-0.514495755428 4.142507074287,-0.337321292749 4.058610417809,-0.147183761963 4.010890835037,0.048609958254 4.001182162775,0.242535625036 4.029857499855,0.427140783764 4.095814869153,0.595331161715 4.196519565956,0.740643296986 4.328101565243,0.857492925713 4.485504244572,4.50019330127 10.556670008917,5.892614926281 9.562085728793,4.019419324309 0.196116135138,4.019364011416 0.195582471188,4.019214719597 0.195090322016,4.019137935231 0.194310717269,4.018902171714 0.193512406144,4.009155651173 0.098156469837,4.000065081195 0.011408687709,4.000165105596 0.010196680724,4.000040280066 0.00897543923,4.000428326367 0.004361586531,4 0,4.005450729638 -0.055354557643,4.008094395109 -0.086787618644,4.015200021201 -0.173692261649,4.015493646129 -0.174764373367,4.015586665509 -0.175870369525,4.01828346564 -0.185627044997,4.019214719597 -0.195090322016,4.038172450076 -0.257582828587,4.041119982789 -0.268246622241,4.064302118633 -0.352802316894,4.064743623817 -0.353713912284,4.065006382158 -0.354664538112,4.071873782635 -0.36868594606,4.076120467489 -0.382683432365,4.107307172088 -0.441031517012,4.107422252034 -0.4412664797,4.145677772042 -0.519743716476,4.146209767988 -0.520460286186,4.14659891421 -0.521254819424,4.159238505439 -0.538188529317,4.168530387697 -0.55557023302,4.2090951096 -0.605000977494,4.256520218947 -0.668758413155,4.257088491709 -0.669281635932,4.257556690126 -0.669908898003,4.277193438934 -0.687977316268,4.292893218813 -0.707106781187,4.339754090104 -0.745565062976,4.393006345088 -0.794706677269,4.393567486569 -0.795056904058,4.394061690217 -0.795511637085,4.42143825433 -0.812601545918,4.44442976698 -0.831469612303,4.494473810691 -0.858218447429,4.550428549089 -0.893244373353,4.550935683057 -0.893440735303,4.551416823415 -0.89374108873,4.586726182533 -0.907529667726,4.617316567635 -0.923879532511,4.667599723332 -0.939133657633,4.723357114359 -0.960972795569,4.723784320348 -0.96105193512,4.724207552598 -0.961217210601,4.767072421995 -0.969306893654,4.804909677984 -0.980785280403,4.852743132659 -0.985494890321,4.905827487762 -0.99555589393,4.906168420866 -0.995557820361,4.906488206986 -0.995618172076,4.955908646297 -0.995656023826,5 -1,5.04327105789 -0.995736673395,5.091546005578 -0.995800847993,5.091751554664 -0.995760067657,5.091986570669 -0.995760247658,5.146373879422 -0.985582243726,5.195090322016 -0.980785280403,5.232197555352 -0.969527080439,5.274106970947 -0.961699208941,5.274207949786 -0.961659462828,5.274319707444 -0.961638548576,5.331562681726 -0.939385720229,5.382683432365 -0.923879532511,5.412638489156 -0.907868035334,5.4472135955 -0.894427191,15.0000007955 3.881966409,24.5527864045 -0.894427191,24.587352624667 -0.907864252706,24.617316567635 -0.923879532511,24.634455891058 -0.929078015948,24.651848488084 -0.937438277835,24.657610390544 -0.938989604117,24.662678707251 -0.941389582191,24.693474018469 -0.949119547972,24.725680292556 -0.961638548576,24.729733558128 -0.962397108993,24.733439590444 -0.96381821318,24.770065620098 -0.970215827365,24.804909677984 -0.980785280403,24.817224043199 -0.981997076523,24.830051352346 -0.985452919809,24.841978822599 -0.986389255112,24.852816238037 -0.989109164963,24.879561906802 -0.990435865608,24.908013429331 -0.995760247658,24.916288736963 -0.995753999079,24.924075646999 -0.997113580602,24.96253493646 -0.996310581919,25 -1,25.006792781673 -0.9993309694,25.014042950797 -0.999901392905,25.031911508875 -0.997990905966,25.048609958254 -0.998817837225,25.070125170677 -0.995636848621,25.093511793014 -0.995618172076,25.105715074874 -0.993315299337,25.117555122776 -0.993066358865,25.155540188269 -0.984781301441,25.167628038646 -0.983489619663,25.195090322016 -0.980785280403,25.196256431902 -0.98043139922,25.197556222938 -0.980291558047,25.220572638098 -0.973390115916,25.242535625036 -0.970142500145,25.25825950767 -0.964525814087,25.275792447402 -0.961217210601,25.291242026604 -0.955183503853,25.306632078379 -0.951828119205,25.338463685956 -0.938047259436,25.374340400865 -0.927291358895,25.378488869691 -0.925152165443,25.382683432365 -0.923879532511,25.404182546807 -0.912387853479,25.427140783764 -0.904185130847,25.437087777996 -0.898229579571,25.448583176585 -0.89374108873,25.466189798531 -0.882749302361,25.484225451823 -0.87494326205,25.509310971245 -0.857692629233,25.538373920834 -0.842706070564,25.546783036765 -0.836167352241,25.55557023302 -0.831469612303,25.574422829232 -0.815997686439,25.595331161715 -0.803480434044,25.600116664941 -0.799145465135,25.605938309783 -0.795511637085,25.624274170429 -0.778639669528,25.643684249166 -0.765291178164,25.66199846378 -0.746578716539,25.684069527764 -0.729416808954,25.695116884952 -0.716948820248,25.707106781187 -0.707106781187,25.722578745182 -0.688256117742,25.740643296986 -0.671898434757,25.741420870749 -0.67084970609,25.742443309874 -0.669908898003,25.759868816025 -0.646564519176,25.779036628812 -0.626978413479,25.791025081156 -0.608707338892,25.806464586458 -0.591282395129,25.818147101157 -0.57180350576,25.831469612303 -0.55557023302,25.840754978677 -0.538198534378,25.85340108579 -0.521254819424,25.855197309898 -0.517587764416,25.857492925713 -0.514495755428,25.869526250095 -0.489087825062,25.885213551082 -0.46518487613,25.891824155768 -0.448957762982,25.901390117222 -0.43300791745,25.911410085551 -0.406012945406,25.923879532511 -0.382683432365,25.928122613774 -0.368695975079,25.934993617842 -0.354664538112,25.937541555714 -0.345447624025,25.941389582191 -0.337321292749,25.947924774945 -0.311279325415,25.958238617235 -0.285969845332,25.960764846989 -0.273045418812,25.965612798269 -0.25998446842,25.971542209415 -0.225565191795,25.980785280403 -0.195090322016,25.981717787578 -0.185622417786,25.984413334491 -0.175870369525,25.985676016638 -0.160861150608,25.989109164963 -0.147183761963,25.990374857012 -0.121629699351,25.995376988335 -0.096045047207,25.995371108092 -0.087242273227,25.996945098044 -0.078105515085,25.996359518767 -0.036943767555,26 0,25.999572020933 0.004345344387,25.999959719934 0.00897543923,25.997866662349 0.029455351072,25.998817837225 0.048609958254,25.995254942624 0.072707925728,25.99523780685 0.097476703972,25.994385661567 0.101803307169,25.994319786195 0.10643384227,25.985557545267 0.149872054347,25.981097828286 0.193512406144,25.980865392958 0.194298093996,25.980785280403 0.195090322016,25.974522422658 0.215736688843,25.973688080439 0.218557562609,25.970142500145 0.242535625036,25.962616433313 0.26360105295,25.957826285221 0.287347885566,23.177098224214 9.556438748626,30.529998940003 14.152001695995,30.676573065982 14.263624493626,30.800181850636 14.400242544096,30.896629563934 14.557218535754,30.962642421023 14.729224134665,30.995979706344 14.910420847563,30.995509831641 15.094658201472,30.961248746164 15.275682513043,30.894359395295 15.447349161224,30.797112245965 15.603831157968,30.672808218785 15.739816937314,30.525666642834 15.850690649186,30.360682036347 15.932688838068,30.183454574666 15.983028188321,30 16,20.618032 16,15.894427191 25.4472135955,15.868243399231 25.489363512044,15.845322445013 25.534256458975,15.837249093741 25.544762832549,15.831469612303 25.55557023302,15.813517766841 25.577447866751,15.797188509938 25.603730469351,15.764192060128 25.639836670104,15.733900708082 25.679256763438,15.718866023622 25.692779029672,15.707106781187 25.707106781187,15.689535539553 25.721527831855,15.672882972781 25.739748947239,15.634369047803 25.768776008922,15.597937410914 25.801542795258,15.574712681402 25.815761701535,15.55557023302 25.831469612303,15.54046974181 25.839543133904,15.525731112119 25.850650808352,15.483165918214 25.87180949512,15.441979151448 25.897025322767,15.409915390307 25.909323291975,15.382683432365 25.923879532511,15.371737387165 25.927198902657,15.360729159316 25.932670613678,15.315655498843 25.945476419416,15.271241156999 25.962511420581,15.230395620696 25.97007586139,15.195090322016 25.980785280403,15.189369613183 25.981350320726,15.183479408002 25.983023553553,15.137527978709 25.987274601925,15.091432887621 25.995811240678,15.045263278577 25.995811240678,15 26,14.954734311183 25.995811240678,14.908567112379 25.995811240678,14.86247200239 25.987274598424,14.816520591998 25.983023553553,14.810631845595 25.981350641727,14.804909677984 25.980785280403,14.769596383631 25.970074380622,14.728758843001 25.962511420581,14.684337741084 25.945473826609,14.639270840684 25.932670613678,14.62826496485 25.927199963326,14.617316567635 25.923879532511,14.590078541578 25.909320964566,14.558020848552 25.897025322767,14.516830433463 25.871807261503,14.474268887881 25.850650808352,14.459536619676 25.839547149777,14.44442976698 25.831469612303,14.42528795471 25.815762090982,14.402062589086 25.801542795258,14.365614407706 25.768761128728,14.327117027219 25.739748947239,14.310467592479 25.72152970423,14.292893218813 25.707106781187,14.281142843925 25.692787005185,14.266099291918 25.679256763438,14.235803453957 25.639830832294,14.202811490062 25.603730469351,14.186470361003 25.577427892615,14.168530387697 25.55557023302,14.162762829278 25.544778348745,14.154677554987 25.534256458975,14.131745817097 25.489342391159,14.105572809 25.4472135955,9.381968 16,7.766188802991 16),(2.414215765597 16,9.963197981187 23.548984418813,5.433810141734 16,2.414215765597 16)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'), 0)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'), 0)) GEOMETRYCOLLECTION() SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())'), 10)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())'), 10)) GEOMETRYCOLLECTION(GEOMETRYCOLLECTION()) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION()))'), 100)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION()))'), 100)) GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())) SELECT ST_AREA(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(10 10),MULTIPOINT(0 0,10 10))'), 10)) BETWEEN 568.21 AND 568.22; ST_AREA(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(10 10),MULTIPOINT(0 0,10 10))'), 10)) BETWEEN 568.21 AND 568.22 1 SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(10 10),MULTIPOINT(0 0,10 10)))'), 5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(10 10),MULTIPOINT(0 0,10 10)))'), 5)) MULTIPOLYGON(((5 0,4.9039 0.9755,4.6194 1.9134,4.1573 2.7779,3.5355 3.5355,2.7779 4.1573,1.9134 4.6194,0.9755 4.9039,0 5,-0.9755 4.9039,-1.9134 4.6194,-2.7779 4.1573,-3.5355 3.5355,-4.1573 2.7779,-4.6194 1.9134,-4.9039 0.9755,-5 0,-4.9039 -0.9755,-4.6194 -1.9134,-4.1573 -2.7779,-3.5355 -3.5355,-2.7779 -4.1573,-1.9134 -4.6194,-0.9755 -4.9039,0 -5,0.9755 -4.9039,1.9134 -4.6194,2.7779 -4.1573,3.5355 -3.5355,4.1573 -2.7779,4.6194 -1.9134,4.9039 -0.9755,5 0)),((15 10,14.9039 10.9755,14.6194 11.9134,14.1573 12.7779,13.5355 13.5355,12.7779 14.1573,11.9134 14.6194,10.9755 14.9039,10 15,9.0245 14.9039,8.0866 14.6194,7.2221 14.1573,6.4645 13.5355,5.8427 12.7779,5.3806 11.9134,5.0961 10.9755,5 10,5.0961 9.0245,5.3806 8.0866,5.8427 7.2221,6.4645 6.4645,7.2221 5.8427,8.0866 5.3806,9.0245 5.0961,10 5,10.9755 5.0961,11.9134 5.3806,12.7779 5.8427,13.5355 6.4645,14.1573 7.2221,14.6194 8.0866,14.9039 9.0245,15 10))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(1 1,2 2,3 3),' 'MULTILINESTRING((0 0,0 10,10 10,10 0),(10 10,10 15,15 15,10 10)))'), 50)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(1 1,2 2,3 3),' 'MULTILINESTRING((0 0,0 10,10 10,10 0),(10 10,10 15,15 15,10 10)))'), 50)) POLYGON((5 -49.5075,10 -50,19.7545 -49.0393,29.1342 -46.194,37.7785 -41.5735,45.3553 -35.3553,51.5735 -27.7785,56.194 -19.1342,59.0393 -9.7545,59.2311 -7.8064,61.194 -4.1342,64.0393 5.2455,65 15,64.0393 24.7545,61.194 34.1342,56.5735 42.7785,50.3553 50.3553,42.7785 56.5735,34.1342 61.194,24.7545 64.0393,15 65,10 65,0.2455 64.0393,-9.1342 61.194,-17.6412 56.6469,-19.1342 56.194,-27.7785 51.5735,-35.3553 45.3553,-41.5735 37.7785,-46.194 29.1342,-49.0393 19.7545,-50 10,-50 0,-49.0393 -9.7545,-46.194 -19.1342,-41.5735 -27.7785,-35.3553 -35.3553,-27.7785 -41.5735,-19.1342 -46.194,-9.7545 -49.0393,0 -50,5 -49.5075)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,0 10,10 10))'), 20)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,0 10,10 10))'), 20)) POLYGON((18.1906 -8.1906,21.1114 -6.6294,24.1421 -4.1421,26.6294 -1.1114,28.4776 2.3463,29.6157 6.0982,30 10,29.6157 13.9018,28.4776 17.6537,26.6294 21.1114,24.1421 24.1421,21.1114 26.6294,17.6537 28.4776,13.9018 29.6157,10 30,0 30,-3.9018 29.6157,-7.6537 28.4776,-11.1114 26.6294,-14.1421 24.1421,-16.6294 21.1114,-18.4776 17.6537,-19.6157 13.9018,-20 10,-20 0,-19.6157 -3.9018,-18.4776 -7.6537,-16.6294 -11.1114,-14.1421 -14.1421,-11.1114 -16.6294,-7.6537 -18.4776,-3.9018 -19.6157,0 -20,3.9018 -19.6157,7.6537 -18.4776,11.1114 -16.6294,14.1421 -14.1421,16.6294 -11.1114,18.1906 -8.1906)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,0 10,10 10),GEOMETRYCOLLECTION())'), 10)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,0 10,10 10),GEOMETRYCOLLECTION())'), 10)) POLYGON((10 0,11.9509 0.1921,13.8268 0.7612,15.5557 1.6853,17.0711 2.9289,18.3147 4.4443,19.2388 6.1732,19.8079 8.0491,20 10,19.8079 11.9509,19.2388 13.8268,18.3147 15.5557,17.0711 17.0711,15.5557 18.3147,13.8268 19.2388,11.9509 19.8079,10 20,0 20,-1.9509 19.8079,-3.8268 19.2388,-5.5557 18.3147,-7.0711 17.0711,-8.3147 15.5557,-9.2388 13.8268,-9.8079 11.9509,-10 10,-10 0,-9.8079 -1.9509,-9.2388 -3.8268,-8.3147 -5.5557,-7.0711 -7.0711,-5.5557 -8.3147,-3.8268 -9.2388,-1.9509 -9.8079,0 -10,1.9509 -9.8079,3.8268 -9.2388,5.5557 -8.3147,7.0711 -7.0711,8.3147 -5.5557,9.2388 -3.8268,9.8079 -1.9509,10 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(10 10),' 'MULTIPOINT(0 0,10 10),' 'LINESTRING(1 1,2 2,3 3),' 'MULTILINESTRING((0 0,0 10,10 10,10 0),(10 10,10 15,15 15,10 10)))'), 0)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(10 10),' 'MULTIPOINT(0 0,10 10),' 'LINESTRING(1 1,2 2,3 3),' GEOMETRYCOLLECTION(POINT(10 10),MULTIPOINT((0 0),(10 10)),LINESTRING(1 1,2 2,3 3),MULTILINESTRING((0 0,0 10,10 10,10 0),(10 10,10 15,15 15,10 10))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0, 0 0)))'), 5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0, 0 0)))'), 5)) POLYGON((-5 0,-4.9039 -0.9755,-4.6194 -1.9134,-4.1573 -2.7779,-3.5355 -3.5355,-2.7779 -4.1573,-1.9134 -4.6194,-0.9755 -4.9039,0 -5,10 -5,10.9755 -4.9039,11.9134 -4.6194,12.7779 -4.1573,13.5355 -3.5355,14.1573 -2.7779,14.6194 -1.9134,14.9039 -0.9755,15 0,15 10,14.9039 10.9755,14.6194 11.9134,14.1573 12.7779,13.5355 13.5355,12.7779 14.1573,11.9134 14.6194,10.9755 14.9039,10 15,0 15,-0.9755 14.9039,-1.9134 14.6194,-2.7779 14.1573,-3.5355 13.5355,-4.1573 12.7779,-4.6194 11.9134,-4.9039 10.9755,-5 10,-5 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0, 0 0)))))'), 5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0, 0 0)))))'), 5)) POLYGON((-5 0,-4.9039 -0.9755,-4.6194 -1.9134,-4.1573 -2.7779,-3.5355 -3.5355,-2.7779 -4.1573,-1.9134 -4.6194,-0.9755 -4.9039,0 -5,10 -5,10.9755 -4.9039,11.9134 -4.6194,12.7779 -4.1573,13.5355 -3.5355,14.1573 -2.7779,14.6194 -1.9134,14.9039 -0.9755,15 0,15 10,14.9039 10.9755,14.6194 11.9134,14.1573 12.7779,13.5355 13.5355,12.7779 14.1573,11.9134 14.6194,10.9755 14.9039,10 15,0 15,-0.9755 14.9039,-1.9134 14.6194,-2.7779 14.1573,-3.5355 13.5355,-4.1573 12.7779,-4.6194 11.9134,-4.9039 10.9755,-5 10,-5 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4, 4 4)),' 'MULTIPOLYGON(((0 0,0 10,10 10,10 0, 0 0)),((10 10,10 15,15 15,15 10,10 10))))'), 10)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4, 4 4)),' 'MULTIPOLYGON(((0 0,0 10,10 10,10 0, 0 0)),((10 10,10 15,15 15,15 10,10 10))) POLYGON((1.3883 20,0 20,-1.9509 19.8079,-3.8268 19.2388,-5.5557 18.3147,-7.0711 17.0711,-8.3147 15.5557,-9.2388 13.8268,-9.8079 11.9509,-10 10,-10 0,-9.8079 -1.9509,-9.2388 -3.8268,-8.3147 -5.5557,-7.0711 -7.0711,-5.5557 -8.3147,-3.8268 -9.2388,-1.9509 -9.8079,0 -10,10 -10,11.9509 -9.8079,13.8268 -9.2388,15.5557 -8.3147,17.0711 -7.0711,18.3147 -5.5557,19.2388 -3.8268,19.8079 -1.9509,20 0,20 1.3883,20.5557 1.6853,22.0711 2.9289,23.3147 4.4443,24.2388 6.1732,24.8079 8.0491,25 10,25 15,24.8079 16.9509,24.2388 18.8268,23.3147 20.5557,22.0711 22.0711,20.5557 23.3147,18.8268 24.2388,16.9509 24.8079,15 25,10 25,8.0491 24.8079,6.1732 24.2388,4.4443 23.3147,2.9289 22.0711,1.6853 20.5557,1.3883 20)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(10 10),' 'MULTIPOINT(0 0,10 10)),' 'GEOMETRYCOLLECTION(LINESTRING(1 1,2 2,3 3),' 'MULTILINESTRING((0 0,0 10,10 10,10 0),(10 10,10 15,15 15,10 10))))'), 10)) as result; result POLYGON SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(10 10),' 'MULTIPOINT(0 0,10 10)),' 'GEOMETRYCOLLECTION(LINESTRING(1 1,2 2,3 3),' 'MULTILINESTRING((0 0,0 10,10 10,10 0),(10 10,10 15,15 15,10 10))),' 'GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4, 4 4)),' 'MULTIPOLYGON(((0 0,0 10,10 10,10 0, 0 0)),' '((10 10,10 15,15 15,15 10,10 10)))))'),1000)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(10 10),' 'MULTIPOINT(0 0,10 10)),' POLYGON((-372.6834 938.8795,-381.1905 934.3324,-382.6834 933.8795,-555.5702 841.4696,-707.1068 717.1068,-831.4696 565.5702,-923.8795 392.6834,-980.7853 205.0903,-1000 10,-1000 0,-980.7853 -195.0903,-923.8795 -382.6834,-831.4696 -555.5702,-707.1068 -707.1068,-555.5702 -831.4696,-382.6834 -923.8795,-195.0903 -980.7853,0 -1000,10 -1000,205.0903 -980.7853,392.6834 -923.8795,565.5702 -831.4696,717.1068 -707.1068,841.4696 -555.5702,933.8795 -382.6834,934.3324 -381.1905,938.8795 -372.6834,995.7853 -185.0903,1015 10,1015 15,995.7853 210.0903,938.8795 397.6834,846.4696 570.5702,722.1068 722.1068,570.5702 846.4696,397.6834 938.8795,210.0903 995.7853,15 1015,10 1015,-185.0903 995.7853,-372.6834 938.8795)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(10 10),' 'MULTIPOINT(0 0,10 10)),' 'GEOMETRYCOLLECTION(LINESTRING(1 1,2 2,3 3),' 'MULTILINESTRING((0 0,0 10,10 10,10 0),(10 10,10 15,15 15,10 10))),' 'GEOMETRYCOLLECTION(GEOMETRYCOLLECTION()))'), 1000)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(10 10),' 'MULTIPOINT(0 0,10 10)),' POLYGON((0 -1000,5 -999.5075,10 -1000,205.0903 -980.7853,392.6834 -923.8795,565.5702 -831.4696,717.1068 -707.1068,841.4696 -555.5702,933.8795 -382.6834,937.8395 -369.6293,938.8795 -367.6834,995.7853 -180.0903,1015 15,995.7853 210.0903,938.8795 397.6834,846.4696 570.5702,722.1068 722.1068,570.5702 846.4696,397.6834 938.8795,210.0903 995.7853,15 1015,10 1015,-185.0903 995.7853,-372.6834 938.8795,-381.1905 934.3324,-382.6834 933.8795,-555.5702 841.4696,-707.1068 717.1068,-831.4696 565.5702,-923.8795 392.6834,-980.7853 205.0903,-1000 10,-1000 0,-980.7853 -195.0903,-923.8795 -382.6834,-831.4696 -555.5702,-707.1068 -707.1068,-555.5702 -831.4696,-382.6834 -923.8795,-195.0903 -980.7853,0 -1000)) SELECT ST_ASTEXT(ST_BUFFER(g, 20)) FROM gis_geometrycollection WHERE fid=115; ST_ASTEXT(ST_BUFFER(g, 20)) POLYGON((44.9914 0.0871,44.9992 0.1795,44.9054 1.0975,44.9049 1.7904,46.0036 3.0049,47.9326 6.1444,49.2528 9.5845,49.9196 13.2084,49.9102 16.8932,49.225 20.5137,47.8872 23.947,45.9422 27.0766,43.4562 29.7963,40.5133 32.0138,37.2136 33.6538,33.6691 34.6606,32.3688 34.7809,32.3651 34.7869,31.9064 35.6851,31.7448 35.8955,31.6294 36.1114,31.2705 36.5488,30.9438 37.0746,30.2839 37.7967,29.678 38.5851,29.3773 38.8556,29.1421 39.1421,28.7907 39.4306,28.4577 39.795,27.6875 40.3754,26.9587 41.0309,26.4941 41.3153,26.1114 41.6294,25.8096 41.7907,25.5146 42.013,24.6633 42.4362,23.8396 42.9405,23.1984 43.1864,22.6537 43.4776,22.4346 43.544,22.2146 43.6534,21.3134 43.9094,20.4248 44.2502,19.6079 44.4015,18.9018 44.6157,18.7875 44.627,18.6696 44.6605,17.7505 44.7455,16.8287 44.9162,15.9054 44.9162,15 45,14.0946 44.9162,13.1713 44.9162,12.2495 44.7455,11.3304 44.6605,11.2125 44.627,11.0982 44.6157,10.3921 44.4015,9.5752 44.2502,8.6866 43.9094,7.7854 43.6534,7.5654 43.544,7.3463 43.4776,6.8016 43.1864,6.1604 42.9405,5.3366 42.4362,4.4854 42.013,4.1904 41.7907,3.8886 41.6294,3.5059 41.3153,3.0413 41.0309,2.3125 40.3754,1.5423 39.795,1.2093 39.4305,0.8579 39.1421,0.6227 38.8556,0.322 38.5851,-0.2839 37.7967,-0.9438 37.0746,-1.2704 36.5488,-1.6294 36.1114,-1.7448 35.8955,-1.9064 35.6851,-2.3651 34.7868,-2.3698 34.7792,-3.6946 34.6558,-3.7751 34.6328,-3.8547 34.625,-4.9877 34.2858,-7.2621 33.635,-7.4118 33.56,-7.5649 33.5141,-8.7631 32.8829,-10.5795 31.9727,-10.7796 31.8205,-10.9914 31.709,-12.0667 30.8415,-13.5328 29.7262,-13.7578 29.4773,-14.0057 29.2773,-14.8802 28.2349,-16.0203 26.9729,-16.2394 26.6147,-16.4949 26.3102,-17.1313 25.1563,-17.9564 23.8073,-18.1355 23.3358,-18.3655 22.919,-18.7509 21.7161,-19.2743 20.3387,-19.3782 19.7586,-19.5474 19.2308,-19.6866 18.0376,-19.9288 16.6862,-19.9231 16.0117,-19.9963 15.384,-19.9081 14.2525,-19.8973 12.9757,-19.7505 12.2296,-19.6954 11.5228,-19.4095 10.4965,-19.1809 9.3349,-18.8667 8.5486,-18.6559 7.792,-18.2098 6.9041,-17.8043 5.8891,-17.3035 5.1008,-16.9169 4.3314,-16.353 3.6043,-15.8148 2.7569,-15.1168 2.0102,-14.8483 1.6639,-14.9987 0.2282,-14.9967 0.2038,-14.9992 0.1795,-14.9914 0.0871,-15 0,-14.8911 -1.1053,-14.8383 -1.734,-14.696 -3.4738,-14.6901 -3.4953,-14.6883 -3.5174,-14.6344 -3.7124,-14.6157 -3.9018,-14.2364 -5.1523,-14.1739 -5.3784,-13.714 -7.056,-13.7052 -7.074,-13.6999 -7.0933,-13.5625 -7.3737,-13.4776 -7.6537,-12.854 -8.8203,-12.8447 -8.8394,-12.0864 -10.3949,-12.0758 -10.4091,-12.068 -10.4251,-11.8152 -10.7639,-11.6294 -11.1114,-10.8184 -12.0996,-9.8696 -13.3752,-9.8582 -13.3857,-9.8489 -13.3982,-9.4561 -13.7596,-9.1421 -14.1421,-8.2052 -14.911,-7.1399 -15.8941,-7.1286 -15.9012,-7.1188 -15.9102,-6.5712 -16.2521,-6.1114 -16.6294,-5.1108 -17.1642,-3.9914 -17.8649,-3.9811 -17.8689,-3.9717 -17.8748,-3.2653 -18.1507,-2.6537 -18.4776,-1.6485 -18.7825,-0.5329 -19.2195,-0.5241 -19.2211,-0.5158 -19.2243,0.3414 -19.3861,1.0982 -19.6157,2.0552 -19.71,3.1165 -19.9111,3.1232 -19.9111,3.1298 -19.9124,4.1179 -19.9131,5 -20,5.8657 -19.9147,6.8309 -19.916,6.8353 -19.9152,6.8397 -19.9152,7.9272 -19.7117,8.9018 -19.6157,9.6441 -19.3905,10.4821 -19.234,10.4842 -19.2332,10.4864 -19.2328,11.631 -18.7878,12.6537 -18.4776,13.2528 -18.1574,13.9443 -17.8885,15 -17.3607,16.0557 -17.8885,16.7472 -18.1574,17.3463 -18.4776,17.689 -18.5815,18.037 -18.7488,18.7915 -18.9521,19.5136 -19.2328,19.5949 -19.248,19.6688 -19.2764,20.4012 -19.4043,21.0982 -19.6157,21.3446 -19.64,21.601 -19.7091,22.3896 -19.771,23.1603 -19.9152,23.3258 -19.9151,23.4815 -19.9423,24.2506 -19.9262,25 -20,25.1357 -19.9866,25.2809 -19.998,26.0768 -19.913,26.8702 -19.9124,27.1144 -19.8663,27.3511 -19.8613,28.1109 -19.6956,28.3513 -19.6699,28.9018 -19.6157,28.9253 -19.6086,28.9511 -19.6058,29.727 -19.3732,30.5158 -19.2243,30.8248 -19.1037,31.1326 -19.0366,31.7693 -18.7609,32.4868 -18.5458,32.5698 -18.503,32.6537 -18.4776,33.2653 -18.1506,33.9717 -17.8748,34.3237 -17.6551,34.6845 -17.4989,35.1863 -17.1538,35.7675 -16.8541,35.9357 -16.7233,36.1114 -16.6294,36.5712 -16.2521,37.1188 -15.9102,37.4856 -15.5727,37.8737 -15.3058,38.2398 -14.9317,38.6814 -14.5883,38.9025 -14.3388,39.1421 -14.1421,39.4561 -13.7596,39.8489 -13.3982,40.1972 -12.9315,40.5807 -12.5396,40.8206 -12.174,41.1293 -11.8256,41.3629 -11.4361,41.6294 -11.1114,41.8151 -10.7639,42.068 -10.4251,42.3612 -9.8264,42.7043 -9.3037,42.8366 -8.979,43.0278 -8.6602,43.2282 -8.1202,43.4776 -7.6537,43.5625 -7.3738,43.6999 -7.0933,43.9001 -6.3691,44.1648 -5.7194,44.2153 -5.4608,44.3123 -5.1997,44.4309 -4.5111,44.6157 -3.9018,44.6343 -3.7125,44.6883 -3.5174,44.7584 -2.6836,44.9075 -1.9209,44.9074 -1.7449,44.9389 -1.5621,44.9272 -0.7392,45 0,44.9914 0.0871)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0)))'), -2)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0)))'), -2)) POLYGON((8 2,8 8,2 8,2 2,8 2)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0)))'), -5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0)))'), -5)) GEOMETRYCOLLECTION() SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((10 10,10 20,20 20,20 10,10 10))))'), -2)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((10 10,10 20,20 20,20 10,10 10))))'), -2)) MULTIPOLYGON(((8 2,8 8,2 8,2 2,8 2)),((18 12,18 18,12 18,12 12,18 12))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((10 10,10 20,20 20,20 10,10 10))))'), -10)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((10 10,10 20,20 20,20 10,10 10))))'), -10)) GEOMETRYCOLLECTION() SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0)), POLYGON((10 10,10 20,20 20,20 10,10 10)))'), -2)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0)), POLYGON((10 10,10 20,20 20,20 10,10 10)))'), -2)) GEOMETRYCOLLECTION(MULTIPOLYGON(((8 2,8 8,2 8,2 2,8 2))),MULTIPOLYGON(((18 12,18 18,12 18,12 12,18 12)))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0)), POLYGON((10 10,10 20,20 20,20 10,10 10)))'), -5)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0)), POLYGON((10 10,10 20,20 20,20 10,10 10)))'), -5)) GEOMETRYCOLLECTION() SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0)), MULTIPOLYGON(((10 10,10 20,20 20,20 10,10 10))))'), -2)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0)), MULTIPOLYGON(((10 10,10 20,20 20,20 10,10 10))))'), -2)) GEOMETRYCOLLECTION(MULTIPOLYGON(((8 2,8 8,2 8,2 2,8 2))),MULTIPOLYGON(((18 12,18 18,12 18,12 12,18 12)))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0)), MULTIPOLYGON(((10 10,10 20,20 20,20 10,10 10))))'), -10)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0)), MULTIPOLYGON(((10 10,10 20,20 20,20 10,10 10))))'), -10)) GEOMETRYCOLLECTION() ##################################################################################### # ST_BUFFER() with 'point_circle' strategy ##################################################################################### SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 2, ST_BUFFER_STRATEGY('point_circle', 1))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 2, ST_BUFFER_STRATEGY('point_circle', 1))) POLYGON((2 0,-1 1.7321,-1 -1.7321,2 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 2, ST_BUFFER_STRATEGY('point_circle', 2))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 2, ST_BUFFER_STRATEGY('point_circle', 2))) POLYGON((2 0,-1 1.7321,-1 -1.7321,2 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(2.34 -2.34)'), 3, ST_BUFFER_STRATEGY('point_circle', 3))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(2.34 -2.34)'), 3, ST_BUFFER_STRATEGY('point_circle', 3))) POLYGON((5.34 -2.34,0.84 0.2581,0.84 -4.9381,5.34 -2.34)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1000 -1000)'), 5, ST_BUFFER_STRATEGY('point_circle', 5))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1000 -1000)'), 5, ST_BUFFER_STRATEGY('point_circle', 5))) POLYGON((1005 -1000,1001.5450849718748 -995.2447174185243,995.9549150281252 -997.0610737385376,995.9549150281252 -1002.9389262614624,1001.5450849718748 -1004.7552825814757,1005 -1000)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 10, ST_BUFFER_STRATEGY('point_circle', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 10, ST_BUFFER_STRATEGY('point_circle', 10))) POLYGON((10 0,8.0902 5.8779,3.0902 9.5106,-3.0902 9.5106,-8.0902 5.8779,-10 0,-8.0902 -5.8779,-3.0902 -9.5106,3.0902 -9.5106,8.0902 -5.8779,10 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(0 0,0 0,0 0,0 0)'), 5, ST_BUFFER_STRATEGY('point_circle', 20))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(0 0,0 0,0 0,0 0)'), 5, ST_BUFFER_STRATEGY('point_circle', 20))) POLYGON((4.7553 -1.5451,5 0,4.7553 1.5451,4.0451 2.9389,2.9389 4.0451,1.5451 4.7553,-0 5,-1.5451 4.7553,-2.9389 4.0451,-4.0451 2.9389,-4.7553 1.5451,-5 -0,-4.7553 -1.5451,-4.0451 -2.9389,-2.9389 -4.0451,-1.5451 -4.7553,0 -5,1.5451 -4.7553,2.9389 -4.0451,4.0451 -2.9389,4.7553 -1.5451)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(10 10,20 20,30 30)'), 5, ST_BUFFER_STRATEGY('point_circle', 4))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(10 10,20 20,30 30)'), 5, ST_BUFFER_STRATEGY('point_circle', 4))) MULTIPOLYGON(((15 10,10 15,5 10,10 5,15 10)),((25 20,20 25,15 20,20 15,25 20)),((35 30,30 35,25 30,30 25,35 30))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(10 15,15 15,15 10)'), 5, ST_BUFFER_STRATEGY('point_circle', 25))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(10 15,15 15,15 10)'), 5, ST_BUFFER_STRATEGY('point_circle', 25))) POLYGON((10.0394 10.0271,10.0394 9.3733,10.3511 8.1594,10.9549 7.0611,11.8129 6.1474,12.8711 5.4759,14.0631 5.0886,15.314 5.0099,16.5451 5.2447,17.6791 5.7784,18.6448 6.5773,19.3815 7.5912,19.8429 8.7566,20 10,19.8429 11.2434,19.3815 12.4088,19.3152 12.5,19.3815 12.5912,19.8429 13.7566,20 15,19.8429 16.2434,19.3815 17.4088,18.6448 18.4227,17.6791 19.2216,16.5451 19.7553,15.314 19.9901,14.0631 19.9114,12.8711 19.5241,12.5157 19.2986,11.5451 19.7553,10.314 19.9901,9.0631 19.9114,7.8711 19.5241,6.8129 18.8526,5.9549 17.9389,5.3511 16.8406,5.0394 15.6267,5.0394 14.3733,5.3511 13.1594,5.9549 12.0611,6.8129 11.1474,7.8711 10.4759,9.0631 10.0886,10.0394 10.0271)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(1 -1,1000 -1000,0.0001 0)'), 100, ST_BUFFER_STRATEGY('point_circle', 50))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(1 -1,1000 -1000,0.0001 0)'), 100, ST_BUFFER_STRATEGY('point_circle', 50))) MULTIPOLYGON(((1100 -1000,1099.2115 -987.4667,1096.8583 -975.131,1092.9776 -963.1875,1087.6307 -951.8246,1080.9017 -941.2215,1072.8969 -931.5453,1063.7424 -922.9487,1053.5827 -915.5672,1042.5779 -909.5173,1030.9017 -904.8943,1018.7381 -901.7713,1006.2791 -900.1973,993.7209 -900.1973,981.2619 -901.7713,969.0983 -904.8943,957.4221 -909.5173,946.4173 -915.5672,936.2576 -922.9487,927.1031 -931.5453,919.0983 -941.2215,912.3693 -951.8246,907.0224 -963.1875,903.1417 -975.131,900.7885 -987.4667,900 -1000,900.7885 -1012.5333,903.1417 -1024.869,907.0224 -1036.8125,912.3693 -1048.1754,919.0983 -1058.7785,927.1031 -1068.4547,936.2576 -1077.0513,946.4173 -1084.4328,957.4221 -1090.4827,969.0983 -1095.1057,981.2619 -1098.2287,993.7209 -1099.8027,1006.2791 -1099.8027,1018.7381 -1098.2287,1030.9017 -1095.1057,1042.5779 -1090.4827,1053.5827 -1084.4328,1063.7424 -1077.0513,1072.8969 -1068.4547,1080.9017 -1058.7785,1087.6307 -1048.1754,1092.9776 -1036.8125,1096.8583 -1024.869,1099.2115 -1012.5333,1100 -1000)),((73.1233 68.1811,72.897 68.4547,63.7425 77.0513,53.5828 84.4328,42.578 90.4827,30.9018 95.1057,18.7382 98.2287,6.2792 99.8027,-6.279 99.8027,-18.738 98.2287,-30.9016 95.1057,-42.5778 90.4827,-53.5826 84.4328,-63.7423 77.0513,-72.8968 68.4547,-80.9016 58.7785,-87.6306 48.1754,-92.9775 36.8125,-96.8582 24.869,-99.2114 12.5333,-99.9999 0,-99.2114 -12.5333,-96.8582 -24.869,-92.9775 -36.8125,-87.6306 -48.1754,-80.9016 -58.7785,-72.8968 -68.4547,-72.1228 -69.1816,-71.8969 -69.4547,-62.7424 -78.0513,-52.5827 -85.4328,-41.5779 -91.4827,-29.9017 -96.1057,-17.7381 -99.2287,-5.2791 -100.8027,7.2791 -100.8027,19.7381 -99.2287,31.9017 -96.1057,43.5779 -91.4827,54.5827 -85.4328,64.7424 -78.0513,73.8969 -69.4547,81.9017 -59.7785,88.6307 -49.1754,93.9776 -37.8125,97.8583 -25.869,100.2115 -13.5333,101 -1,100.2115 11.5333,97.8583 23.869,93.9776 35.8125,88.6307 47.1754,81.9017 57.7785,73.8969 67.4547,73.1233 68.1811))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5))'), 5, ST_BUFFER_STRATEGY('point_circle', 4))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5))'), 5, ST_BUFFER_STRATEGY('point_circle', 4))) POLYGON((10 5,4.999999999999999 10,0 4.999999999999999,5 0,10 5)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOINT(5 5,10 10))'), 5, ST_BUFFER_STRATEGY('point_circle', 4))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOINT(5 5,10 10))'), 5, ST_BUFFER_STRATEGY('point_circle', 4))) POLYGON((4.999999999999999 10,0 4.999999999999999,5 0,10 5,15 10,9.999999999999998 15,4.999999999999999 10)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5),MULTIPOINT(5 5))'), 5, ST_BUFFER_STRATEGY('point_circle', 4))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5),MULTIPOINT(5 5))'), 5, ST_BUFFER_STRATEGY('point_circle', 4))) POLYGON((10 5,4.999999999999999 10,0 4.999999999999999,5 0,10 5)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5),MULTIPOINT(10 10,15 15))'), 5, ST_BUFFER_STRATEGY('point_circle', 20))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5),MULTIPOINT(10 10,15 15))'), 5, ST_BUFFER_STRATEGY('point_circle', 20))) POLYGON((5 10,3.4549 9.7553,2.0611 9.0451,0.9549 7.9389,0.2447 6.5451,0 5,0.2447 3.4549,0.9549 2.0611,2.0611 0.9549,3.4549 0.2447,5 0,6.5451 0.2447,7.9389 0.9549,9.0451 2.0611,9.7553 3.4549,10 5,11.5451 5.2447,12.9389 5.9549,14.0451 7.0611,14.7553 8.4549,15 10,16.5451 10.2447,17.9389 10.9549,19.0451 12.0611,19.7553 13.4549,20 15,19.7553 16.5451,19.0451 17.9389,17.9389 19.0451,16.5451 19.7553,15 20,13.4549 19.7553,12.0611 19.0451,10.9549 17.9389,10.2447 16.5451,10 15,8.4549 14.7553,7.0611 14.0451,5.9549 12.9389,5.2447 11.5451,5 10)) ##################################################################################### # ST_BUFFER() with 'point_square' strategy ##################################################################################### SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 2, ST_BUFFER_STRATEGY('point_square'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 2, ST_BUFFER_STRATEGY('point_square'))) POLYGON((-2 -2,2 -2,2 2,-2 2,-2 -2)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(2.34 -2.34)'), 3, ST_BUFFER_STRATEGY('point_square'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(2.34 -2.34)'), 3, ST_BUFFER_STRATEGY('point_square'))) POLYGON((-0.6600000000000001 -5.34,5.34 -5.34,5.34 0.6600000000000001,-0.6600000000000001 0.6600000000000001,-0.6600000000000001 -5.34)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1000 -1000)'), 5, ST_BUFFER_STRATEGY('point_square'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1000 -1000)'), 5, ST_BUFFER_STRATEGY('point_square'))) POLYGON((995 -1005,1005 -1005,1005 -995,995 -995,995 -1005)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0.000001)'), 10, ST_BUFFER_STRATEGY('point_square'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0.000001)'), 10, ST_BUFFER_STRATEGY('point_square'))) POLYGON((-10 -9.999999,10 -9.999999,10 10.000001,-10 10.000001,-10 -9.999999)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(0 0,0 0,0 0,0 0)'), 5, ST_BUFFER_STRATEGY('point_square'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(0 0,0 0,0 0,0 0)'), 5, ST_BUFFER_STRATEGY('point_square'))) POLYGON((-5 5,-5 -5,5 -5,5 5,-5 5)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(10 10,20 20,30 30)'), 5, ST_BUFFER_STRATEGY('point_square'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(10 10,20 20,30 30)'), 5, ST_BUFFER_STRATEGY('point_square'))) MULTIPOLYGON(((5 5,15 5,15 15,5 15,5 5)),((15 15,25 15,25 25,15 25,15 15)),((25 25,35 25,35 35,25 35,25 25))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(10 15,15 15,15 10)'), 5, ST_BUFFER_STRATEGY('point_square'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(10 15,15 15,15 10)'), 5, ST_BUFFER_STRATEGY('point_square'))) POLYGON((10 20,5 20,5 10,10 10,10 5,20 5,20 10,20 15,20 20,15 20,10 20)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(1 -1,1000 -1000,0.0001 0.000)'), 100, ST_BUFFER_STRATEGY('point_square'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(1 -1,1000 -1000,0.0001 0.000)'), 100, ST_BUFFER_STRATEGY('point_square'))) MULTIPOLYGON(((900 -1100,1100 -1100,1100 -900,900 -900,900 -1100)),((-99 -100,-99 -101,101 -101,101 99,100.00012000480018 99,100.0001 100,-99.9999 100,-99.9999 -100,-99 -100))) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5))'), 5, ST_BUFFER_STRATEGY('point_square'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5))'), 5, ST_BUFFER_STRATEGY('point_square'))) POLYGON((0 0,10 0,10 10,0 10,0 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOINT(5 5,10 10))'), 5, ST_BUFFER_STRATEGY('point_square'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOINT(5 5,10 10))'), 5, ST_BUFFER_STRATEGY('point_square'))) POLYGON((5 10,0 10,0 0,10 0,10 5,15 5,15 15,5 15,5 10)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5),MULTIPOINT(5 5))'), 5, ST_BUFFER_STRATEGY('point_square'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5),MULTIPOINT(5 5))'), 5, ST_BUFFER_STRATEGY('point_square'))) POLYGON((0 0,10 0,10 10,0 10,0 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5),MULTIPOINT(10 10,15 15))'), 5, ST_BUFFER_STRATEGY('point_square'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5),MULTIPOINT(10 10,15 15))'), 5, ST_BUFFER_STRATEGY('point_square'))) POLYGON((5 10,0 10,0 0,10 0,10 5,15 5,15 10,20 10,20 20,10 20,10 15,5 15,5 10)) ##################################################################################### # ST_BUFFER() with 'end_round' strategy ##################################################################################### SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1,1 1)'), 5, ST_BUFFER_STRATEGY('end_round', 1))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1,1 1)'), 5, ST_BUFFER_STRATEGY('end_round', 1))) POLYGON((6 1,5.9039 1.9755,5.6194 2.9134,5.1573 3.7779,4.5355 4.5355,3.7779 5.1573,2.9134 5.6194,1.9755 5.9039,1 6,0.0245 5.9039,-0.9134 5.6194,-1.7779 5.1573,-2.5355 4.5355,-3.1573 3.7779,-3.6194 2.9134,-3.9039 1.9755,-4 1,-3.9039 0.0245,-3.6194 -0.9134,-3.1573 -1.7779,-2.5355 -2.5355,-1.7779 -3.1573,-0.9134 -3.6194,0.0245 -3.9039,1 -4,1.9755 -3.9039,2.9134 -3.6194,3.7779 -3.1573,4.5355 -2.5355,5.1573 -1.7779,5.6194 -0.9134,5.9039 0.0245,6 1)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,-0 0,0 0)'), 5, ST_BUFFER_STRATEGY('end_round', 3))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,-0 0,0 0)'), 5, ST_BUFFER_STRATEGY('end_round', 3))) POLYGON((5 0,4.9039 0.9755,4.6194 1.9134,4.1573 2.7779,3.5355 3.5355,2.7779 4.1573,1.9134 4.6194,0.9755 4.9039,0 5,-0.9755 4.9039,-1.9134 4.6194,-2.7779 4.1573,-3.5355 3.5355,-4.1573 2.7779,-4.6194 1.9134,-4.9039 0.9755,-5 0,-4.9039 -0.9755,-4.6194 -1.9134,-4.1573 -2.7779,-3.5355 -3.5355,-2.7779 -4.1573,-1.9134 -4.6194,-0.9755 -4.9039,0 -5,0.9755 -4.9039,1.9134 -4.6194,2.7779 -4.1573,3.5355 -3.5355,4.1573 -2.7779,4.6194 -1.9134,4.9039 -0.9755,5 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,0 5,5 5,5 0,0 0)'), 10, ST_BUFFER_STRATEGY('end_round', 4))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,0 5,5 5,5 0,0 0)'), 10, ST_BUFFER_STRATEGY('end_round', 4))) POLYGON((0 -10,5 -10,6.9509 -9.8079,8.8268 -9.2388,10.5557 -8.3147,12.0711 -7.0711,13.3147 -5.5557,14.2388 -3.8268,14.8079 -1.9509,15 0,15 5,14.8079 6.9509,14.2388 8.8268,13.3147 10.5557,12.0711 12.0711,10.5557 13.3147,8.8268 14.2388,6.9509 14.8079,5 15,0 15,-1.9509 14.8079,-3.8268 14.2388,-5.5557 13.3147,-7.0711 12.0711,-8.3147 10.5557,-9.2388 8.8268,-9.8079 6.9509,-10 5,-10 0,0 -10)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 -1,1000 -1000,0.0001 0)'), 1000, ST_BUFFER_STRATEGY('end_round', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 -1,1000 -1000,0.0001 0)'), 1000, ST_BUFFER_STRATEGY('end_round', 10))) POLYGON((1707.1068 -292.8932,708.1068 706.1068,707.1069 707.1067,156.4346 987.6883,-453.9904 891.0065,-891.0064 453.9905,-987.6882 -156.4344,-707.1067 -707.1067,-706.1068 -708.1068,292.8932 -1707.1067,444.4298 -1831.4696,617.3166 -1923.8795,804.9097 -1980.7853,1000 -2000,1195.0903 -1980.7853,1382.6834 -1923.8795,1555.5702 -1831.4696,1707.1068 -1707.1068,1831.4696 -1555.5703,1923.8795 -1382.6835,1980.7853 -1195.0904,2000 -1000,1980.7853 -804.9097,1923.8795 -617.3166,1831.4696 -444.4298,1707.1068 -292.8932)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,-0 0),(0 0,0 -0))'), 10, ST_BUFFER_STRATEGY('end_round', 1))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,-0 0),(0 0,0 -0))'), 10, ST_BUFFER_STRATEGY('end_round', 1))) POLYGON((9.8079 -1.9509,10 0,9.8079 1.9509,9.2388 3.8268,8.3147 5.5557,7.0711 7.0711,5.5557 8.3147,3.8268 9.2388,1.9509 9.8079,0 10,-1.9509 9.8079,-3.8268 9.2388,-5.5557 8.3147,-7.0711 7.0711,-8.3147 5.5557,-9.2388 3.8268,-9.8079 1.9509,-10 0,-9.8079 -1.9509,-9.2388 -3.8268,-8.3147 -5.5557,-7.0711 -7.0711,-5.5557 -8.3147,-3.8268 -9.2388,-1.9509 -9.8079,0 -10,1.9509 -9.8079,3.8268 -9.2388,5.5557 -8.3147,7.0711 -7.0711,8.3147 -5.5557,9.2388 -3.8268,9.8079 -1.9509)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,0 5,5 5,5 0,0 0))'), 50, ST_BUFFER_STRATEGY('end_round', 5))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,0 5,5 5,5 0,0 0))'), 50, ST_BUFFER_STRATEGY('end_round', 5))) POLYGON((-18.5932 -36.4912,0 -50,5 -50,14.7545 -49.0393,24.1342 -46.194,32.7785 -41.5735,40.3553 -35.3553,46.5735 -27.7785,51.194 -19.1342,54.0393 -9.7545,55 0,55 5,54.0393 14.7545,51.194 24.1342,46.5735 32.7785,40.3553 40.3553,32.7785 46.5735,24.1342 51.194,14.7545 54.0393,5 55,0 55,-9.7545 54.0393,-19.1342 51.194,-27.7785 46.5735,-35.3553 40.3553,-41.5735 32.7785,-46.194 24.1342,-49.0393 14.7545,-50 5,-50 0,-46.2663 -11.4912,-47.5528 -15.4508,-44.1846 -17.898,-40.4508 -29.3893,-18.5932 -36.4912)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 10,10 0),(10 0,0 0),(0 0,10 10))'), 100, ST_BUFFER_STRATEGY('end_round', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 10,10 0),(10 0,0 0),(0 0,10 10))'), 100, ST_BUFFER_STRATEGY('end_round', 10))) POLYGON((107.0831 5,108.7688 15.6434,105.1057 22.8328,105.1057 30.9017,102.3883 34.6419,99.1007 55.399,55.399 99.1007,25.245 103.8766,15.6434 108.7688,5 107.0831,-5.6434 108.7688,-15.245 103.8766,-45.399 99.1007,-89.1007 55.399,-92.3883 34.6419,-95.1057 30.9017,-95.1057 22.8328,-98.7688 15.6434,-97.0831 5,-98.7688 -5.6434,-95.1057 -12.8328,-95.1057 -30.9017,-90.3629 -37.4295,-89.1007 -45.399,-72.5426 -61.9571,-58.7785 -80.9017,-51.1046 -83.3951,-45.399 -89.1007,-22.2706 -92.7638,-8.9071 -97.1059,-5.6434 -98.7688,-4.3968 -98.5714,0 -100,10 -100,14.3968 -98.5714,15.6434 -98.7688,18.9071 -97.1059,32.2706 -92.7638,55.399 -89.1007,61.1046 -83.3951,68.7785 -80.9017,82.5426 -61.9571,99.1007 -45.399,100.3629 -37.4295,105.1057 -30.9017,105.1057 -12.8328,108.7688 -5.6434,107.0831 5)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((1 -1,1000 -1000,0 0),(2 2,4 -9))'), 1000, ST_BUFFER_STRATEGY('end_round', 50))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((1 -1,1000 -1000,0 0),(2 2,4 -9))'), 1000, ST_BUFFER_STRATEGY('end_round', 50))) POLYGON((292.9 -1707.1,444.4 -1831.5,617.3 -1923.9,804.9 -1980.8,1000 -2000,1195.1 -1980.8,1382.7 -1923.9,1555.6 -1831.5,1707.1 -1707.1,1831.5 -1555.6,1923.9 -1382.7,1980.8 -1195.1,2000 -1000,1980.8 -804.9,1923.9 -617.3,1831.5 -444.4,1707.1 -292.9,736.3 677.9,692.8 725,596.8 805.9,491.3 874.1,378.2 928.5,259.1 968.4,135.9 993,10.7 1002,-114.7 995.2,-238.3 972.7,-358 934.9,-446.4 894.3,-454 891,-455.6 890.1,-472.1 882.5,-542.1 838.9,-562.1 827.1,-566.2 823.9,-578.7 816.1,-630.8 773.8,-661.3 750.1,-667.4 744.1,-676.2 736.9,-711.7 699.7,-750.1 661.3,-757.5 651.8,-763 646.1,-784.3 617.3,-827.1 562.1,-834.9 548.8,-837.6 545.1,-847.7 527.2,-891 454,-898.5 436.7,-899.1 435.6,-901.2 430.4,-940.9 338.7,-975.9 218.1,-995.6 94.1,-999.5 -31.4,-987.7 -156.4,-960.3 -279,-950.8 -305.5,-949.7 -309.8,-942.5 -328.5,-917.8 -397.1,-910.4 -411.5,-904.5 -426.9,-869.2 -492.4,-860.7 -509,-858.4 -512.5,-844.9 -537.5,-772 -639.7,-686.8 -732,-657.5 -756.7,292.9 -1707.1)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10))'), 10, ST_BUFFER_STRATEGY('end_round', 4))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10))'), 10, ST_BUFFER_STRATEGY('end_round', 4))) POLYGON((-7.071067811865475 7.071067811865475,-7.071067811865475 -7.0710678118654755,7.071067811865475 -7.071067811865475,17.071067811865476 2.9289321881345254,17.071067811865476 2.9289321881345254,17.071067811865476 17.071067811865476,2.9289321881345254 17.071067811865476,-7.071067811865475 7.071067811865475)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 0,5 0),(0 0,0 5)))'), 10, ST_BUFFER_STRATEGY('end_round', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 0,5 0),(0 0,0 5)))'), 10, ST_BUFFER_STRATEGY('end_round', 10))) POLYGON((8.7738 8.7738,8.0902 10.8779,3.0902 14.5106,-3.0902 14.5106,-8.0902 10.8779,-10 5,-10 0,-9.5106 -1.5063,-9.5106 -3.0902,-8.5796 -4.3715,-8.0902 -5.8779,-6.8088 -6.8088,-5.8779 -8.0902,-4.3715 -8.5796,-3.0902 -9.5106,-1.5063 -9.5106,0 -10,5 -10,10.8779 -8.0902,14.5106 -3.0902,14.5106 3.0902,10.8779 8.0902,8.7738 8.7738)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'MULTILINESTRING((0 0,10 10)))'), 10, ST_BUFFER_STRATEGY('end_round', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'MULTILINESTRING((0 0,10 10)))'), 10, ST_BUFFER_STRATEGY('end_round', 10))) POLYGON((-7.0711 7.0711,-9.8769 1.5643,-8.9101 -4.5399,-4.5399 -8.9101,1.5643 -9.8769,7.0711 -7.0711,17.0711 2.9289,17.0711 2.9289,19.8769 8.4357,18.9101 14.5399,14.5399 18.9101,8.4357 19.8769,2.9289 17.0711,-7.0711 7.0711)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'LINESTRING(0 0,-5 -5,-10 -10),' 'MULTILINESTRING((0 0,5 5,10 10)),' 'MULTILINESTRING((0 0,10 0),(0 0,-10 0)))'), 10, ST_BUFFER_STRATEGY('end_round', 50))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'LINESTRING(0 0,-5 -5,-10 -10),' 'MULTILINESTRI POLYGON((4.1421 -10,10 -10,11.2533 -9.9211,12.4869 -9.6858,13.6812 -9.2978,14.8175 -8.7631,15.8779 -8.0902,16.8455 -7.2897,17.7051 -6.3742,18.4433 -5.3583,19.0483 -4.2578,19.5106 -3.0902,19.8229 -1.8738,19.9803 -0.6279,19.9803 0.6279,19.8229 1.8738,19.5106 3.0902,19.0483 4.2578,18.6471 4.9875,19.1775 6.0285,19.6029 7.2101,19.8769 8.4357,19.9951 9.6859,19.9556 10.9411,19.7592 12.1814,19.4088 13.3874,18.9101 14.5399,18.2708 15.6208,17.5011 16.6131,16.6131 17.5011,15.6208 18.2708,14.5399 18.9101,13.3874 19.4088,12.1814 19.7592,10.9411 19.9556,9.6859 19.9951,8.4357 19.8769,7.2101 19.6029,6.0285 19.1775,4.9096 18.6074,3.8709 17.9016,2.9289 17.0711,-4.1421 10,-10 10,-11.2533 9.9211,-12.4869 9.6858,-13.6812 9.2978,-14.8175 8.7631,-15.8779 8.0902,-16.8455 7.2897,-17.7051 6.3742,-18.4433 5.3583,-19.0483 4.2578,-19.5106 3.0902,-19.8229 1.8738,-19.9803 0.6279,-19.9803 -0.6279,-19.8229 -1.8738,-19.5106 -3.0902,-19.0483 -4.2578,-18.6471 -4.9875,-19.1775 -6.0285,-19.6029 -7.2101,-19.8769 -8.4357,-19.9951 -9.6859,-19.9556 -10.9411,-19.7592 -12.1814,-19.4088 -13.3874,-18.9101 -14.5399,-18.2708 -15.6208,-17.5011 -16.6131,-16.6131 -17.5011,-15.6208 -18.2708,-14.5399 -18.9101,-13.3874 -19.4088,-12.1814 -19.7592,-10.9411 -19.9556,-9.6859 -19.9951,-8.4357 -19.8769,-7.2101 -19.6029,-6.0285 -19.1775,-4.9096 -18.6074,-3.8709 -17.9016,-2.9289 -17.0711,4.1421 -10)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,0 5,5 5,5 0,0 0)'), 1, ST_BUFFER_STRATEGY('end_round', 5))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,0 5,5 5,5 0,0 0)'), 1, ST_BUFFER_STRATEGY('end_round', 5))) POLYGON((-0.3719 -0.7298,0 -1,5 -1,5.1951 -0.9808,5.3827 -0.9239,5.5556 -0.8315,5.7071 -0.7071,5.8315 -0.5556,5.9239 -0.3827,5.9808 -0.1951,6 0,6 5,5.9808 5.1951,5.9239 5.3827,5.8315 5.5556,5.7071 5.7071,5.5556 5.8315,5.3827 5.9239,5.1951 5.9808,5 6,0 6,-0.1951 5.9808,-0.3827 5.9239,-0.5556 5.8315,-0.7071 5.7071,-0.8315 5.5556,-0.9239 5.3827,-0.9808 5.1951,-1 5,-1 0,-0.9253 -0.2298,-0.9511 -0.309,-0.8837 -0.358,-0.809 -0.5878,-0.3719 -0.7298),(1 1,1 4,4 4,4 1,1 1)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,0 5,5 5,5 0,0 0)'), 2, ST_BUFFER_STRATEGY('end_round', 5))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,0 5,5 5,5 0,0 0)'), 2, ST_BUFFER_STRATEGY('end_round', 5))) POLYGON((-0.7437 -1.4596,0 -2,5 -2,5.3902 -1.9616,5.7654 -1.8478,6.1111 -1.6629,6.4142 -1.4142,6.6629 -1.1111,6.8478 -0.7654,6.9616 -0.3902,7 0,7 5,6.9616 5.3902,6.8478 5.7654,6.6629 6.1111,6.4142 6.4142,6.1111 6.6629,5.7654 6.8478,5.3902 6.9616,5 7,0 7,-0.3902 6.9616,-0.7654 6.8478,-1.1111 6.6629,-1.4142 6.4142,-1.6629 6.1111,-1.8478 5.7654,-1.9616 5.3902,-2 5,-2 0,-1.8507 -0.4596,-1.9021 -0.618,-1.7674 -0.7159,-1.618 -1.1756,-0.7437 -1.4596),(2 2,2 3,3 3,3 2,2 2)) ##################################################################################### # ST_BUFFER() with 'end_flat' strategy ##################################################################################### SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1,1 1)'), 5, ST_BUFFER_STRATEGY('end_flat'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1,1 1)'), 5, ST_BUFFER_STRATEGY('end_flat'))) POLYGON((6 1,5.9039 1.9755,5.6194 2.9134,5.1573 3.7779,4.5355 4.5355,3.7779 5.1573,2.9134 5.6194,1.9755 5.9039,1 6,0.0245 5.9039,-0.9134 5.6194,-1.7779 5.1573,-2.5355 4.5355,-3.1573 3.7779,-3.6194 2.9134,-3.9039 1.9755,-4 1,-3.9039 0.0245,-3.6194 -0.9134,-3.1573 -1.7779,-2.5355 -2.5355,-1.7779 -3.1573,-0.9134 -3.6194,0.0245 -3.9039,1 -4,1.9755 -3.9039,2.9134 -3.6194,3.7779 -3.1573,4.5355 -2.5355,5.1573 -1.7779,5.6194 -0.9134,5.9039 0.0245,6 1)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,-0 0,0 0)'), 5, ST_BUFFER_STRATEGY('end_flat'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,-0 0,0 0)'), 5, ST_BUFFER_STRATEGY('end_flat'))) POLYGON((5 0,4.9039 0.9755,4.6194 1.9134,4.1573 2.7779,3.5355 3.5355,2.7779 4.1573,1.9134 4.6194,0.9755 4.9039,0 5,-0.9755 4.9039,-1.9134 4.6194,-2.7779 4.1573,-3.5355 3.5355,-4.1573 2.7779,-4.6194 1.9134,-4.9039 0.9755,-5 0,-4.9039 -0.9755,-4.6194 -1.9134,-4.1573 -2.7779,-3.5355 -3.5355,-2.7779 -4.1573,-1.9134 -4.6194,-0.9755 -4.9039,0 -5,0.9755 -4.9039,1.9134 -4.6194,2.7779 -4.1573,3.5355 -3.5355,4.1573 -2.7779,4.6194 -1.9134,4.9039 -0.9755,5 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,0 5,5 5,5 0,0 0)'), 10, ST_BUFFER_STRATEGY('end_flat'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,0 5,5 5,5 0,0 0)'), 10, ST_BUFFER_STRATEGY('end_flat'))) POLYGON((-5 0,0 0,0 -5,0 -10,5 -10,6.9509 -9.8079,8.8268 -9.2388,10.5557 -8.3147,12.0711 -7.0711,13.3147 -5.5557,14.2388 -3.8268,14.8079 -1.9509,15 0,15 5,14.8079 6.9509,14.2388 8.8268,13.3147 10.5557,12.0711 12.0711,10.5557 13.3147,8.8268 14.2388,6.9509 14.8079,5 15,0 15,-1.9509 14.8079,-3.8268 14.2388,-5.5557 13.3147,-7.0711 12.0711,-8.3147 10.5557,-9.2388 8.8268,-9.8079 6.9509,-10 5,-10 0,-5 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 -1,1000 -1000,0.0001 0)'), 1000, ST_BUFFER_STRATEGY('end_flat'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 -1,1000 -1000,0.0001 0)'), 1000, ST_BUFFER_STRATEGY('end_flat'))) POLYGON((1707.1068 -292.8932,708.1069 706.1067,707.1069 707.1067,-707.1067 -707.1067,-706.1068 -708.1068,292.8932 -1707.1067,444.4298 -1831.4696,617.3166 -1923.8795,804.9097 -1980.7853,1000 -2000,1195.0903 -1980.7853,1382.6834 -1923.8795,1555.5702 -1831.4696,1707.1068 -1707.1068,1831.4696 -1555.5703,1923.8795 -1382.6835,1980.7853 -1195.0904,2000 -1000,1980.7853 -804.9097,1923.8795 -617.3166,1831.4696 -444.4298,1707.1068 -292.8932)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,-0 0),(0 0,0 -0))'), 10, ST_BUFFER_STRATEGY('end_flat'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,-0 0),(0 0,0 -0))'), 10, ST_BUFFER_STRATEGY('end_flat'))) POLYGON((9.8079 -1.9509,10 0,9.8079 1.9509,9.2388 3.8268,8.3147 5.5557,7.0711 7.0711,5.5557 8.3147,3.8268 9.2388,1.9509 9.8079,0 10,-1.9509 9.8079,-3.8268 9.2388,-5.5557 8.3147,-7.0711 7.0711,-8.3147 5.5557,-9.2388 3.8268,-9.8079 1.9509,-10 0,-9.8079 -1.9509,-9.2388 -3.8268,-8.3147 -5.5557,-7.0711 -7.0711,-5.5557 -8.3147,-3.8268 -9.2388,-1.9509 -9.8079,0 -10,1.9509 -9.8079,3.8268 -9.2388,5.5557 -8.3147,7.0711 -7.0711,8.3147 -5.5557,9.2388 -3.8268,9.8079 -1.9509)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,0 5,5 5,5 0,0 0))'), 50, ST_BUFFER_STRATEGY('end_flat'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,0 5,5 5,5 0,0 0))'), 50, ST_BUFFER_STRATEGY('end_flat'))) POLYGON((-45 0,0 0,0 -45,0 -50,5 -50,14.7545 -49.0393,24.1342 -46.194,32.7785 -41.5735,40.3553 -35.3553,46.5735 -27.7785,51.194 -19.1342,54.0393 -9.7545,55 0,55 5,54.0393 14.7545,51.194 24.1342,46.5735 32.7785,40.3553 40.3553,32.7785 46.5735,24.1342 51.194,14.7545 54.0393,5 55,0 55,-9.7545 54.0393,-19.1342 51.194,-27.7785 46.5735,-35.3553 40.3553,-41.5735 32.7785,-46.194 24.1342,-49.0393 14.7545,-50 5,-50 0,-45 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 10,10 0),(10 0,0 0),(0 0,10 10))'), 100, ST_BUFFER_STRATEGY('end_flat'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 10,10 0),(10 0,0 0),(0 0,10 10))'), 100, ST_BUFFER_STRATEGY('end_flat'))) POLYGON((0.0000006494107793741932 -9.99999935058922,0 -100,10 -100,9.99999935058922 -9.99999935058922,70.71067811865474 -70.71067811865474,80.71067811865474 -60.71067811865474,14.999999675294617 4.999999675294617,80.71067811865474 70.71067811865474,70.71067811865474 80.71067811865474,9.99999935058922 19.99999935058922,10 100,0 100,0.0000006494107793741932 19.99999935058922,-60.71067811865474 80.71067811865474,-70.71067811865474 70.71067811865474,-4.999999675294617 5.000000324705383,-70.71067811865474 -60.71067811865474,-60.71067811865474 -70.71067811865474,0.0000006494107793741932 -9.99999935058922)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((1 -1,1000 -1000,0.0001 0),(2 2,4 -9.002))'), 1000, ST_BUFFER_STRATEGY('end_flat'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((1 -1,1000 -1000,0.0001 0),(2 2,4 -9.002))'), 1000, ST_BUFFER_STRATEGY('end_flat'))) POLYGON((1707.1068 -292.8932,707.1069 707.1067,2.0002 2,-981.8756 -176.854,-979.8756 -187.856,-11.8904 -11.8906,-707.1067 -707.1067,-706.1068 -708.1068,292.8932 -1707.1067,444.4298 -1831.4696,617.3166 -1923.8795,804.9097 -1980.7853,1000 -2000,1195.0903 -1980.7853,1382.6834 -1923.8795,1555.5702 -1831.4696,1707.1068 -1707.1068,1831.4696 -1555.5703,1923.8795 -1382.6835,1980.7853 -1195.0904,2000 -1000,1980.7853 -804.9097,1923.8795 -617.3166,1831.4696 -444.4298,1707.1068 -292.8932)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10))'), 10, ST_BUFFER_STRATEGY('end_flat'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10))'), 10, ST_BUFFER_STRATEGY('end_flat'))) POLYGON((-7.0711 7.0711,7.0711 -7.0711,17.0711 2.9289,17.0711 2.9289,2.9289 17.0711,-7.0711 7.0711)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 0,5 0),(0 0,0 5)))'), 10, ST_BUFFER_STRATEGY('end_flat'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 0,5 0),(0 0,0 5)))'), 10, ST_BUFFER_STRATEGY('end_flat'))) POLYGON((5 5,5 10,0 10,0 5,-10 5,-10 0,0 0,0 -10,5 -10,5 0,10 0,10 5,5 5)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'MULTILINESTRING((0 0,10 10)))'), 10, ST_BUFFER_STRATEGY('end_flat'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'MULTILINESTRING((0 0,10 10)))'), 10, ST_BUFFER_STRATEGY('end_flat'))) POLYGON((-7.0711 7.0711,7.0711 -7.0711,17.0711 2.9289,17.0711 2.9289,2.9289 17.0711,-7.0711 7.0711)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'LINESTRING(0 0,-5 -5,-10 -10),' 'MULTILINESTRING((0 0,5 5,10 10)),' 'MULTILINESTRING((0 0,10 0),(0 0,-10 0)))'), 10, ST_BUFFER_STRATEGY('end_flat'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'LINESTRING(0 0,-5 -5,-10 -10),' 'MULTILINESTRI POLYGON((4.1421 -10,10 -10,10 -4.1421,17.0711 2.9289,2.9289 17.0711,-4.1421 10,-10 10,-10 4.1421,-17.0711 -2.9289,-10 -10,-10 -10,-10 -10,-2.9289 -17.0711,4.1421 -10)) ##################################################################################### # ST_BUFFER() with 'join_round' strategy ##################################################################################### SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1,1 1)'), 5, ST_BUFFER_STRATEGY('join_round', 1))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1,1 1)'), 5, ST_BUFFER_STRATEGY('join_round', 1))) POLYGON((6 1,5.9039 1.9755,5.6194 2.9134,5.1573 3.7779,4.5355 4.5355,3.7779 5.1573,2.9134 5.6194,1.9755 5.9039,1 6,0.0245 5.9039,-0.9134 5.6194,-1.7779 5.1573,-2.5355 4.5355,-3.1573 3.7779,-3.6194 2.9134,-3.9039 1.9755,-4 1,-3.9039 0.0245,-3.6194 -0.9134,-3.1573 -1.7779,-2.5355 -2.5355,-1.7779 -3.1573,-0.9134 -3.6194,0.0245 -3.9039,1 -4,1.9755 -3.9039,2.9134 -3.6194,3.7779 -3.1573,4.5355 -2.5355,5.1573 -1.7779,5.6194 -0.9134,5.9039 0.0245,6 1)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,-0 0,0 0)'), 5, ST_BUFFER_STRATEGY('join_round', 3))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,-0 0,0 0)'), 5, ST_BUFFER_STRATEGY('join_round', 3))) POLYGON((5 0,4.9039 0.9755,4.6194 1.9134,4.1573 2.7779,3.5355 3.5355,2.7779 4.1573,1.9134 4.6194,0.9755 4.9039,0 5,-0.9755 4.9039,-1.9134 4.6194,-2.7779 4.1573,-3.5355 3.5355,-4.1573 2.7779,-4.6194 1.9134,-4.9039 0.9755,-5 0,-4.9039 -0.9755,-4.6194 -1.9134,-4.1573 -2.7779,-3.5355 -3.5355,-2.7779 -4.1573,-1.9134 -4.6194,-0.9755 -4.9039,0 -5,0.9755 -4.9039,1.9134 -4.6194,2.7779 -4.1573,3.5355 -3.5355,4.1573 -2.7779,4.6194 -1.9134,4.9039 -0.9755,5 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(10 10,10 15,15 15,15 10,10 10)'), 10, ST_BUFFER_STRATEGY('join_round', 4))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(10 10,10 15,15 15,15 10,10 10)'), 10, ST_BUFFER_STRATEGY('join_round', 4))) POLYGON((10 0,15 0,25 10,25 15,15 25,10 25,0 15,0 10,0.1921 8.0491,0.7612 6.1732,1.6853 4.4443,2.9289 2.9289,4.4443 1.6853,6.1732 0.7612,8.0491 0.1921,10 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 -1,1000 -1000,0.0001 0)'), 1000, ST_BUFFER_STRATEGY('join_round', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 -1,1000 -1000,0.0001 0)'), 1000, ST_BUFFER_STRATEGY('join_round', 10))) POLYGON((1707.1068 -292.8932,708.1068 706.1068,707.1069 707.1067,555.5704 831.4696,382.6836 923.8795,195.0905 980.7853,0.0002 1000,-195.0902 980.7853,-382.6833 923.8796,-555.5701 831.4696,-707.1066 707.1068,-831.4695 555.5703,-923.8794 382.6835,-980.7852 195.0904,-999.9999 0.0001,-980.7852 -195.0903,-923.8795 -382.6834,-831.4695 -555.5702,-707.1067 -707.1067,-706.1068 -708.1068,292.8932 -1707.1067,843.5655 -1987.6883,1453.9905 -1891.0065,1891.0065 -1453.9905,1987.6883 -843.5656,1707.1068 -292.8932)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,-0 0),(0 0,0 -0))'), 10, ST_BUFFER_STRATEGY('join_round', 1))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,-0 0),(0 0,0 -0))'), 10, ST_BUFFER_STRATEGY('join_round', 1))) POLYGON((9.8079 -1.9509,10 0,9.8079 1.9509,9.2388 3.8268,8.3147 5.5557,7.0711 7.0711,5.5557 8.3147,3.8268 9.2388,1.9509 9.8079,0 10,-1.9509 9.8079,-3.8268 9.2388,-5.5557 8.3147,-7.0711 7.0711,-8.3147 5.5557,-9.2388 3.8268,-9.8079 1.9509,-10 0,-9.8079 -1.9509,-9.2388 -3.8268,-8.3147 -5.5557,-7.0711 -7.0711,-5.5557 -8.3147,-3.8268 -9.2388,-1.9509 -9.8079,0 -10,1.9509 -9.8079,3.8268 -9.2388,5.5557 -8.3147,7.0711 -7.0711,8.3147 -5.5557,9.2388 -3.8268,9.8079 -1.9509)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,0 5,5 5,5 0,0 0))'), 50, ST_BUFFER_STRATEGY('join_round', 5))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,0 5,5 5,5 0,0 0))'), 50, ST_BUFFER_STRATEGY('join_round', 5))) POLYGON((0 -50,5 -50,6.5598 -49.3539,9.7545 -49.0393,19.1342 -46.194,27.7785 -41.5735,30.26 -39.537,40.3553 -35.3553,55 0,55 5,40.3553 40.3553,5 55,0 55,-35.3553 40.3553,-39.537 30.26,-41.5735 27.7785,-46.194 19.1342,-49.0393 9.7545,-49.3539 6.5598,-50 5,-50 0,-49.0393 -9.7545,-46.194 -19.1342,-41.5735 -27.7785,-35.3553 -35.3553,-27.7785 -41.5735,-19.1342 -46.194,-9.7545 -49.0393,0 -50)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 10,10 0),(10 0,0 0),(0 0,10 10))'), 100, ST_BUFFER_STRATEGY('join_round', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 10,10 0),(10 0,0 0),(0 0,10 10))'), 100, ST_BUFFER_STRATEGY('join_round', 10))) POLYGON((5 109.5075,0 110,-19.509 108.0785,-38.2683 102.388,-55.557 93.147,-70.7107 80.7107,-83.147 65.557,-92.388 48.2683,-98.0785 29.509,-100 10,-99.5075 5,-100 0,-98.0785 -19.509,-92.388 -38.2683,-83.147 -55.557,-70.7107 -70.7107,-55.557 -83.147,-38.2683 -92.388,-19.509 -98.0785,0 -100,10 -100,29.509 -98.0785,48.2683 -92.388,65.557 -83.147,80.7107 -70.7107,93.147 -55.557,102.388 -38.2683,108.0785 -19.509,110 0,109.5075 5,110 10,108.0785 29.509,102.388 48.2683,93.147 65.557,80.7107 80.7107,65.557 93.147,48.2683 102.388,29.509 108.0785,10 110,5 109.5075)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((1 -1,1000 -1000,0 0),(2 2,4 -9))'), 1000, ST_BUFFER_STRATEGY('join_round', 50))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((1 -1,1000 -1000,0 0),(2 2,4 -9))'), 1000, ST_BUFFER_STRATEGY('join_round', 50))) POLYGON((292.89 -1707.11,387.09 -1790.16,490.96 -1860.74,602.85 -1917.75,721.01 -1960.29,843.57 -1987.69,968.59 -1999.51,1094.11 -1995.56,1218.14 -1975.92,1338.74 -1940.88,1453.99 -1891.01,1562.08 -1827.08,1661.31 -1750.11,1750.11 -1661.31,1827.08 -1562.08,1891.01 -1453.99,1940.88 -1338.74,1975.92 -1218.14,1995.56 -1094.11,1999.51 -968.59,1987.69 -843.57,1960.29 -721.01,1917.75 -602.85,1860.74 -490.96,1790.16 -387.09,1707.11 -292.89,735.31 678.9,720.7 697.32,571.24 824.17,399.9 919.43,213.27 979.43,18.53 1001.86,-176.85 985.88,-194.48 980.85,-195.09 980.79,-201.44 978.86,-365.36 932.08,-379.37 924.88,-382.68 923.88,-415.68 906.24,-539.75 842.54,-549.85 834.53,-555.57 831.47,-609.84 786.93,-693.32 720.7,-699.7 713.19,-707.11 707.11,-772.93 626.91,-820.17 571.24,-823.45 565.34,-831.47 555.57,-895.94 434.96,-915.43 399.9,-916.56 396.37,-923.88 382.68,-972.63 221.96,-975.43 213.27,-975.52 212.44,-980.79 195.09,-1000 0,-980.79 -195.09,-930.55 -360.69,-926.08 -376.36,-925.39 -377.7,-923.88 -382.68,-897.34 -432.34,-836.54 -550.75,-714.7 -704.33,-682.91 -731.3,292.89 -1707.11)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 5,5 5,0 0))'), 1, ST_BUFFER_STRATEGY('join_round', 1))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 5,5 5,0 0))'), 1, ST_BUFFER_STRATEGY('join_round', 1))) POLYGON((-1 0,0.7071067811865475 -0.7071067811865475,5.707106781186548 4.292893218813452,5 6,0 6,-1 5,-1 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0))'), 5, ST_BUFFER_STRATEGY('join_round', 5))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0))'), 5, ST_BUFFER_STRATEGY('join_round', 5))) POLYGON((-5 0,-3.5355 -3.5355,0 -5,10 -5,13.5355 -3.5355,15 0,15 10,13.5355 13.5355,10 15,0 15,-3.5355 13.5355,-5 10,-5 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((10 10,10 20,20 20,20 10,10 10))'), 10, ST_BUFFER_STRATEGY('join_round', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((10 10,10 20,20 20,20 10,10 10))'), 10, ST_BUFFER_STRATEGY('join_round', 10))) POLYGON((0 10,1.3397 5,5 1.3397,10 0,20 0,25 1.3397,28.6603 5,30 10,30 20,28.6603 25,25 28.6603,20 30,10 30,5 28.6603,1.3397 25,0 20,0 10)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((10 0,0 10,-10 0,0 -10,10 0 ))'), 10, ST_BUFFER_STRATEGY('join_round', 50))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((10 0,0 10,-10 0,0 -10,10 0 ))'), 10, ST_BUFFER_STRATEGY('join_round', 50))) POLYGON((17.0711 -7.0711,17.8718 -6.1672,18.5578 -5.1734,19.119 -4.1041,19.5472 -2.975,19.8362 -1.8026,19.9818 -0.6038,19.9818 0.6038,19.8362 1.8026,19.5472 2.975,19.119 4.1041,18.5578 5.1734,17.8718 6.1672,17.0711 7.0711,7.0711 17.0711,6.1672 17.8718,5.1734 18.5578,4.1041 19.119,2.975 19.5472,1.8026 19.8362,0.6038 19.9818,-0.6038 19.9818,-1.8026 19.8362,-2.975 19.5472,-4.1041 19.119,-5.1734 18.5578,-6.1672 17.8718,-7.0711 17.0711,-17.0711 7.0711,-17.8718 6.1672,-18.5578 5.1734,-19.119 4.1041,-19.5472 2.975,-19.8362 1.8026,-19.9818 0.6038,-19.9818 -0.6038,-19.8362 -1.8026,-19.5472 -2.975,-19.119 -4.1041,-18.5578 -5.1734,-17.8718 -6.1672,-17.0711 -7.0711,-7.0711 -17.0711,-6.1672 -17.8718,-5.1734 -18.5578,-4.1041 -19.119,-2.975 -19.5472,-1.8026 -19.8362,-0.6038 -19.9818,0.6038 -19.9818,1.8026 -19.8362,2.975 -19.5472,4.1041 -19.119,5.1734 -18.5578,6.1672 -17.8718,7.0711 -17.0711,17.0711 -7.0711)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))'), 1, ST_BUFFER_STRATEGY('join_round',60))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))'), 1, ST_BUFFER_STRATEGY('join_round',60))) POLYGON((-1 0,-0.9945 -0.1045,-0.9781 -0.2079,-0.9511 -0.309,-0.9135 -0.4067,-0.866 -0.5,-0.809 -0.5878,-0.7431 -0.6691,-0.6691 -0.7431,-0.5878 -0.809,-0.5 -0.866,-0.4067 -0.9135,-0.309 -0.9511,-0.2079 -0.9781,-0.1045 -0.9945,0 -1,8 -1,8.1045 -0.9945,8.2079 -0.9781,8.309 -0.9511,8.4067 -0.9135,8.5 -0.866,8.5878 -0.809,8.6691 -0.7431,8.7431 -0.6691,8.809 -0.5878,8.866 -0.5,8.9135 -0.4067,8.9511 -0.309,8.9781 -0.2079,8.9945 -0.1045,9 0,9 8,8.9945 8.1045,8.9781 8.2079,8.9511 8.309,8.9135 8.4067,8.866 8.5,8.809 8.5878,8.7431 8.6691,8.6691 8.7431,8.5878 8.809,8.5 8.866,8.4067 8.9135,8.309 8.9511,8.2079 8.9781,8.1045 8.9945,8 9,0 9,-0.1045 8.9945,-0.2079 8.9781,-0.309 8.9511,-0.4067 8.9135,-0.5 8.866,-0.5878 8.809,-0.6691 8.7431,-0.7431 8.6691,-0.809 8.5878,-0.866 8.5,-0.9135 8.4067,-0.9511 8.309,-0.9781 8.2079,-0.9945 8.1045,-1 8,-1 0),(3 3,3 5,5 5,5 3,3 3)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4))'), 100, ST_BUFFER_STRATEGY('join_round', 60))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4))'), 100, ST_BUFFER_STRATEGY('join_round', 60))) POLYGON((-100 0,-99.4522 -10.4528,-97.8148 -20.7912,-95.1057 -30.9017,-91.3545 -40.6737,-86.6025 -50,-80.9017 -58.7785,-74.3145 -66.9131,-66.9131 -74.3145,-58.7785 -80.9017,-50 -86.6025,-40.6737 -91.3545,-30.9017 -95.1057,-20.7912 -97.8148,-10.4528 -99.4522,0 -100,10 -100,20.4528 -99.4522,30.7912 -97.8148,40.9017 -95.1057,50.6737 -91.3545,60 -86.6025,68.7785 -80.9017,76.9131 -74.3145,84.3145 -66.9131,90.9017 -58.7785,96.6025 -50,101.3545 -40.6737,105.1057 -30.9017,107.8148 -20.7912,109.4522 -10.4528,110 0,110 10,109.4522 20.4528,107.8148 30.7912,105.1057 40.9017,101.3545 50.6737,96.6025 60,90.9017 68.7785,84.3145 76.9131,76.9131 84.3145,68.7785 90.9017,60 96.6025,50.6737 101.3545,40.9017 105.1057,30.7912 107.8148,20.4528 109.4522,10 110,0 110,-10.4528 109.4522,-20.7912 107.8148,-30.9017 105.1057,-40.6737 101.3545,-50 96.6025,-58.7785 90.9017,-66.9131 84.3145,-74.3145 76.9131,-80.9017 68.7785,-86.6025 60,-91.3545 50.6737,-95.1057 40.9017,-97.8148 30.7912,-99.4522 20.4528,-100 10,-100 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 5,5 5,0 0)))'), 0.5, ST_BUFFER_STRATEGY('join_round', 1))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 5,5 5,0 0)))'), 0.5, ST_BUFFER_STRATEGY('join_round', 1))) POLYGON((-0.5 0,0.3536 -0.3536,5.3536 4.6464,5 5.5,0 5.5,-0.5 5,-0.5 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 10,10 0,0 0,0 10)),((0 0,10 10,10 0,0 0)))'), 1, ST_BUFFER_STRATEGY('join_round', 5))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 10,10 0,0 0,0 10)),((0 0,10 10,10 0,0 0)))'), 1, ST_BUFFER_STRATEGY('join_round', 5))) POLYGON((5 6.4142,0.7071 10.7071,-0.3827 10.9239,-1 10,-1 0,-0.8971 -0.2483,-0.9239 -0.3827,-0.81 -0.4588,-0.7071 -0.7071,0 -1,10 -1,10.7071 -0.7071,10.81 -0.4588,10.9239 -0.3827,10.8971 -0.2483,11 0,11 10,10.3827 10.9239,9.2929 10.7071,5 6.4142)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,0 0)),((10 10,10 15,15 15,10 10)))'), 20, ST_BUFFER_STRATEGY('join_round', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,0 0)),((10 10,10 15,15 15,10 10)))'), 20, ST_BUFFER_STRATEGY('join_round', 10))) POLYGON((-3.1699 29.1506,-10 27.3205,-17.3205 20,-20 10,-20 0,-16.6294 -11.1114,-7.6537 -18.4776,3.9018 -19.6157,14.1421 -14.1421,24.1421 -4.1421,29.1421 0.8579,34.6157 11.0982,33.4776 22.6537,26.1114 31.6294,15 35,10 35,-0 32.3205,-3.1699 29.1506)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((4 4,4 6,6 6,6 4, 4 4)))'), 4, ST_BUFFER_STRATEGY('join_round', 50))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((4 4,4 6,6 6,6 4, 4 4)))'), 4, ST_BUFFER_STRATEGY('join_round', 50))) POLYGON((-4 0,-3.9708 -0.4821,-3.8838 -0.9573,-3.7401 -1.4184,-3.5418 -1.8589,-3.2919 -2.2723,-2.994 -2.6525,-2.6525 -2.994,-2.2723 -3.2919,-1.8589 -3.5418,-1.4184 -3.7401,-0.9573 -3.8838,-0.4821 -3.9708,0 -4,10 -4,10.4821 -3.9708,10.9573 -3.8838,11.4184 -3.7401,11.8589 -3.5418,12.2723 -3.2919,12.6525 -2.994,12.994 -2.6525,13.2919 -2.2723,13.5418 -1.8589,13.7401 -1.4184,13.8838 -0.9573,13.9708 -0.4821,14 0,14 10,13.9708 10.4821,13.8838 10.9573,13.7401 11.4184,13.5418 11.8589,13.2919 12.2723,12.994 12.6525,12.6525 12.994,12.2723 13.2919,11.8589 13.5418,11.4184 13.7401,10.9573 13.8838,10.4821 13.9708,10 14,0 14,-0.4821 13.9708,-0.9573 13.8838,-1.4184 13.7401,-1.8589 13.5418,-2.2723 13.2919,-2.6525 12.994,-2.994 12.6525,-3.2919 12.2723,-3.5418 11.8589,-3.7401 11.4184,-3.8838 10.9573,-3.9708 10.4821,-4 10,-4 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4)))'), 4, ST_BUFFER_STRATEGY('join_round', 60))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4)))'), 4, ST_BUFFER_STRATEGY('join_round', 60))) POLYGON((-4 0,-3.9781 -0.4181,-3.9126 -0.8316,-3.8042 -1.2361,-3.6542 -1.6269,-3.4641 -2,-3.2361 -2.3511,-2.9726 -2.6765,-2.6765 -2.9726,-2.3511 -3.2361,-2 -3.4641,-1.6269 -3.6542,-1.2361 -3.8042,-0.8316 -3.9126,-0.4181 -3.9781,0 -4,10 -4,10.4181 -3.9781,10.8316 -3.9126,11.2361 -3.8042,11.6269 -3.6542,12 -3.4641,12.3511 -3.2361,12.6765 -2.9726,12.9726 -2.6765,13.2361 -2.3511,13.4641 -2,13.6542 -1.6269,13.8042 -1.2361,13.9126 -0.8316,13.9781 -0.4181,14 0,14 10,13.9781 10.4181,13.9126 10.8316,13.8042 11.2361,13.6542 11.6269,13.4641 12,13.2361 12.3511,12.9726 12.6765,12.6765 12.9726,12.3511 13.2361,12 13.4641,11.6269 13.6542,11.2361 13.8042,10.8316 13.9126,10.4181 13.9781,10 14,0 14,-0.4181 13.9781,-0.8316 13.9126,-1.2361 13.8042,-1.6269 13.6542,-2 13.4641,-2.3511 13.2361,-2.6765 12.9726,-2.9726 12.6765,-3.2361 12.3511,-3.4641 12,-3.6542 11.6269,-3.8042 11.2361,-3.9126 10.8316,-3.9781 10.4181,-4 10,-4 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10))'), 10, ST_BUFFER_STRATEGY('join_round', 4))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10))'), 10, ST_BUFFER_STRATEGY('join_round', 4))) POLYGON((-7.0711 7.0711,-8.3147 5.5557,-9.2388 3.8268,-9.8079 1.9509,-10 0,-9.8079 -1.9509,-9.2388 -3.8268,-8.3147 -5.5557,-7.0711 -7.0711,-5.5557 -8.3147,-3.8268 -9.2388,-1.9509 -9.8079,0 -10,1.9509 -9.8079,3.8268 -9.2388,5.5557 -8.3147,7.0711 -7.0711,17.0711 2.9289,17.0711 2.9289,18.3147 4.4443,19.2388 6.1732,19.8079 8.0491,20 10,19.8079 11.9509,19.2388 13.8268,18.3147 15.5557,17.0711 17.0711,15.5557 18.3147,13.8268 19.2388,11.9509 19.8079,10 20,8.0491 19.8079,6.1732 19.2388,4.4443 18.3147,2.9289 17.0711,-7.0711 7.0711)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 0,5 0),(0 0,0 5)))'), 10, ST_BUFFER_STRATEGY('join_round', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 0,5 0),(0 0,0 5)))'), 10, ST_BUFFER_STRATEGY('join_round', 10))) POLYGON((9.0953 9.0953,8.3147 10.5557,7.0711 12.0711,5.5557 13.3147,3.8268 14.2388,1.9509 14.8079,0 15,-1.9509 14.8079,-3.8268 14.2388,-5.5557 13.3147,-7.0711 12.0711,-8.3147 10.5557,-9.2388 8.8268,-9.8079 6.9509,-10 5,-10 0,-9.8079 -1.9509,-9.2388 -3.8268,-8.3147 -5.5557,-7.0711 -7.0711,-5.5557 -8.3147,-3.8268 -9.2388,-1.9509 -9.8079,0 -10,5 -10,6.9509 -9.8079,8.8268 -9.2388,10.5557 -8.3147,12.0711 -7.0711,13.3147 -5.5557,14.2388 -3.8268,14.8079 -1.9509,15 0,14.8079 1.9509,14.2388 3.8268,13.3147 5.5557,12.0711 7.0711,10.5557 8.3147,9.0953 9.0953)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)))'), 10, ST_BUFFER_STRATEGY('join_round', 4))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)))'), 10, ST_BUFFER_STRATEGY('join_round', 4))) POLYGON((-10 0,0 -10,5 -10,15 0,15 5,5 15,0 15,-10 5,-10 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0,2 2,4 0,0 0)),((3 3,3 5,5 5,5 3,3 3))))'), 10, ST_BUFFER_STRATEGY('join_round', 4))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0,2 2,4 0,0 0)),((3 3,3 5,5 5,5 3,3 3))))'), 10, ST_BUFFER_STRATEGY('join_round', 4))) POLYGON((-2.9289 9.0711,-5.0711 9.0711,-7.0711 7.0711,-9.2388 -3.8268,0 -10,4 -10,13.2388 -3.8268,12.3984 0.3984,15 3,15 5,5 15,3 15,-2.9289 9.0711)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'MULTILINESTRING((0 0,10 10)))'), 10, ST_BUFFER_STRATEGY('join_round', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'MULTILINESTRING((0 0,10 10)))'), 10, ST_BUFFER_STRATEGY('join_round', 10))) POLYGON((-7.0711 7.0711,-8.3147 5.5557,-9.2388 3.8268,-9.8079 1.9509,-10 0,-9.8079 -1.9509,-9.2388 -3.8268,-8.3147 -5.5557,-7.0711 -7.0711,-5.5557 -8.3147,-3.8268 -9.2388,-1.9509 -9.8079,0 -10,1.9509 -9.8079,3.8268 -9.2388,5.5557 -8.3147,7.0711 -7.0711,17.0711 2.9289,17.0711 2.9289,18.3147 4.4443,19.2388 6.1732,19.8079 8.0491,20 10,19.8079 11.9509,19.2388 13.8268,18.3147 15.5557,17.0711 17.0711,15.5557 18.3147,13.8268 19.2388,11.9509 19.8079,10 20,8.0491 19.8079,6.1732 19.2388,4.4443 18.3147,2.9289 17.0711,-7.0711 7.0711)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'LINESTRING(0 0,-5 -5,-10 -10),' 'MULTILINESTRING((0 0,5 5,10 10)),' 'MULTILINESTRING((0 0,10 0),(0 0,-10 0)))'), 10, ST_BUFFER_STRATEGY('join_round', 50))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'LINESTRING(0 0,-5 -5,-10 -10),' 'MULTILINESTRI POLYGON((4.1421 -10,10 -10,11.9509 -9.8079,13.8268 -9.2388,15.5557 -8.3147,17.0711 -7.0711,18.3147 -5.5557,19.2388 -3.8268,19.8079 -1.9509,20 0,19.8079 1.9509,19.2388 3.8268,18.6117 5,19.2388 6.1732,19.8079 8.0491,20 10,19.8079 11.9509,19.2388 13.8268,18.3147 15.5557,17.0711 17.0711,15.5557 18.3147,13.8268 19.2388,11.9509 19.8079,10 20,8.0491 19.8079,6.1732 19.2388,4.4443 18.3147,2.9289 17.0711,-4.1421 10,-10 10,-11.9509 9.8079,-13.8268 9.2388,-15.5557 8.3147,-17.0711 7.0711,-18.3147 5.5557,-19.2388 3.8268,-19.8079 1.9509,-20 0,-19.8079 -1.9509,-19.2388 -3.8268,-18.6117 -5,-19.2388 -6.1732,-19.8079 -8.0491,-20 -10,-19.8079 -11.9509,-19.2388 -13.8268,-18.3147 -15.5557,-17.0711 -17.0711,-15.5557 -18.3147,-13.8268 -19.2388,-11.9509 -19.8079,-10 -20,-8.0491 -19.8079,-6.1732 -19.2388,-4.4443 -18.3147,-2.9289 -17.0711,4.1421 -10)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)),' 'MULTIPOLYGON(((0 0,2 2,4 0,0 0)),((3 3,3 5,5 5,5 3,3 3))))'), 10, ST_BUFFER_STRATEGY('join_round', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)),' 'MULTIPOLYGON(((0 0,2 2,4 0,0 0)),((3 3,3 5,5 5,5 3,3 3))))'), 10, ST_BUFFER_STRATEGY('join_round', 10)) POLYGON((3 15,0 15,-5 13.6603,-8.6603 10,-10 5,-10 0,-9.3923 -2.2678,-9.2388 -3.8268,-8.8465 -4.3048,-8.6603 -5,-6.5174 -7.1428,-5.5557 -8.3147,-5.2541 -8.4062,-5 -8.6603,0 -10,4 -10,5 -10,10 -8.6603,13.6603 -5,15 0,15 3,15 5,13.6603 10,10 13.6603,5 15,3 15)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'POLYGON((0 0,0 5,5 5,5 0,0 0)),' 'MULTILINESTRING((0 0,5 5,10 10)),' 'MULTIPOLYGON(((0 0,1 1,1 0,0 0)),((2 2,3 3,3 2,2 2))))'), 10, ST_BUFFER_STRATEGY('join_round', 50))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'POLYGON((0 0,0 5,5 5,5 0,0 0)),' 'MULTILINESTR POLYGON((2.9289 17.0711,0.8579 15,0 15,-1.2054 14.9271,-2.3932 14.7094,-3.546 14.3502,-4.6472 13.8546,-5.6806 13.2298,-6.6312 12.4851,-7.4851 11.6312,-8.2298 10.6806,-8.8546 9.6472,-9.3502 8.546,-9.7094 7.3932,-9.9271 6.2054,-10 5,-10 0,-9.974 -0.4291,-9.9658 -0.8258,-9.9388 -1.0112,-9.9271 -1.2054,-9.8464 -1.6458,-9.8202 -1.8252,-9.8079 -1.9509,-9.7964 -1.9885,-9.7872 -2.0522,-9.7415 -2.2179,-9.7094 -2.3932,-9.5707 -2.8383,-9.4582 -3.247,-9.3983 -3.3914,-9.3502 -3.546,-9.2698 -3.7246,-9.2388 -3.8268,-9.1464 -3.9997,-8.9839 -4.392,-8.9143 -4.5144,-8.8546 -4.6472,-8.5934 -5.0793,-8.3717 -5.4695,-8.3332 -5.521,-8.3147 -5.5557,-8.2793 -5.5989,-8.2298 -5.6806,-7.9058 -6.0943,-7.6308 -6.463,-7.5549 -6.5421,-7.4851 -6.6312,-7.1891 -6.9272,-7.0711 -7.0711,-6.9597 -7.1625,-6.7728 -7.3572,-6.6998 -7.4165,-6.6312 -7.4851,-6.1809 -7.8379,-5.8108 -8.1385,-5.7442 -8.18,-5.6806 -8.2298,-5.5989 -8.2793,-5.5557 -8.3147,-5.4225 -8.3859,-5.1669 -8.5404,-4.7595 -8.7947,-4.7025 -8.8211,-4.6472 -8.8546,-4.0675 -9.1155,-3.9926 -9.1502,-3.8268 -9.2388,-3.7534 -9.2611,-3.6351 -9.3159,-3.5902 -9.3303,-3.546 -9.3502,-2.8908 -9.5544,-2.4549 -9.694,-2.424 -9.6998,-2.3932 -9.7094,-2.0957 -9.7639,-1.9509 -9.8079,-1.7457 -9.8281,-1.6224 -9.8507,-1.2369 -9.9232,-1.2212 -9.9242,-1.2054 -9.9271,0 -10,1 -10,5 -10,6.2054 -9.9271,7.3932 -9.7094,8.546 -9.3502,9.6472 -8.8546,10.6806 -8.2298,11.6312 -7.4851,12.4851 -6.6312,13.2298 -5.6806,13.8546 -4.6472,14.3502 -3.546,14.7094 -2.3932,14.9271 -1.2054,15 0,15 0.8579,17.0711 2.9289,18.3147 4.4443,19.2388 6.1732,19.8079 8.0491,20 10,19.8079 11.9509,19.2388 13.8268,18.3147 15.5557,17.0711 17.0711,15.5557 18.3147,13.8268 19.2388,11.9509 19.8079,10 20,8.0491 19.8079,6.1732 19.2388,4.4443 18.3147,2.9289 17.0711)) ##################################################################################### # ST_BUFFER() with 'join_mitter' strategy ##################################################################################### SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1,1 1)'), 5, ST_BUFFER_STRATEGY('join_miter', 1))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1,1 1)'), 5, ST_BUFFER_STRATEGY('join_miter', 1))) POLYGON((6 1,5.9039 1.9755,5.6194 2.9134,5.1573 3.7779,4.5355 4.5355,3.7779 5.1573,2.9134 5.6194,1.9755 5.9039,1 6,0.0245 5.9039,-0.9134 5.6194,-1.7779 5.1573,-2.5355 4.5355,-3.1573 3.7779,-3.6194 2.9134,-3.9039 1.9755,-4 1,-3.9039 0.0245,-3.6194 -0.9134,-3.1573 -1.7779,-2.5355 -2.5355,-1.7779 -3.1573,-0.9134 -3.6194,0.0245 -3.9039,1 -4,1.9755 -3.9039,2.9134 -3.6194,3.7779 -3.1573,4.5355 -2.5355,5.1573 -1.7779,5.6194 -0.9134,5.9039 0.0245,6 1)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,-0 0,0 0)'), 5, ST_BUFFER_STRATEGY('join_miter', 3))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,-0 0,0 0)'), 5, ST_BUFFER_STRATEGY('join_miter', 3))) POLYGON((5 0,4.9039 0.9755,4.6194 1.9134,4.1573 2.7779,3.5355 3.5355,2.7779 4.1573,1.9134 4.6194,0.9755 4.9039,0 5,-0.9755 4.9039,-1.9134 4.6194,-2.7779 4.1573,-3.5355 3.5355,-4.1573 2.7779,-4.6194 1.9134,-4.9039 0.9755,-5 0,-4.9039 -0.9755,-4.6194 -1.9134,-4.1573 -2.7779,-3.5355 -3.5355,-2.7779 -4.1573,-1.9134 -4.6194,-0.9755 -4.9039,0 -5,0.9755 -4.9039,1.9134 -4.6194,2.7779 -4.1573,3.5355 -3.5355,4.1573 -2.7779,4.6194 -1.9134,4.9039 -0.9755,5 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,0 5,5 5,5 0,0 0)'), 10, ST_BUFFER_STRATEGY('join_miter', 4))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,0 5,5 5,5 0,0 0)'), 10, ST_BUFFER_STRATEGY('join_miter', 4))) POLYGON((0 -10,5 -10,15 -10,15 0,15 5,15 15,5 15,0 15,-10 15,-10 5,-10 0,-9.8079 -1.9509,-9.2388 -3.8268,-8.3147 -5.5557,-7.0711 -7.0711,-5.5557 -8.3147,-3.8268 -9.2388,-1.9509 -9.8079,0 -10)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 -1,1000 -1000,0.0001 0)'), 1000, ST_BUFFER_STRATEGY('join_miter', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 -1,1000 -1000,0.0001 0)'), 1000, ST_BUFFER_STRATEGY('join_miter', 10))) POLYGON((1707.1068 -292.8932,708.1068 706.1068,707.1069 707.1067,555.5704 831.4696,382.6836 923.8795,195.0905 980.7853,0.0002 1000,-195.0902 980.7853,-382.6833 923.8796,-555.5701 831.4696,-707.1066 707.1068,-831.4695 555.5703,-923.8794 382.6835,-980.7852 195.0904,-999.9999 0.0001,-980.7852 -195.0903,-923.8795 -382.6834,-831.4695 -555.5702,-707.1067 -707.1067,-706.1068 -708.1068,292.8932 -1707.1067,8071.0676 -8071.068,1707.1068 -292.8932)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,-0 0),(0 0,0 -0))'), 10, ST_BUFFER_STRATEGY('join_miter', 1))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,-0 0),(0 0,0 -0))'), 10, ST_BUFFER_STRATEGY('join_miter', 1))) POLYGON((9.8079 -1.9509,10 0,9.8079 1.9509,9.2388 3.8268,8.3147 5.5557,7.0711 7.0711,5.5557 8.3147,3.8268 9.2388,1.9509 9.8079,0 10,-1.9509 9.8079,-3.8268 9.2388,-5.5557 8.3147,-7.0711 7.0711,-8.3147 5.5557,-9.2388 3.8268,-9.8079 1.9509,-10 0,-9.8079 -1.9509,-9.2388 -3.8268,-8.3147 -5.5557,-7.0711 -7.0711,-5.5557 -8.3147,-3.8268 -9.2388,-1.9509 -9.8079,0 -10,1.9509 -9.8079,3.8268 -9.2388,5.5557 -8.3147,7.0711 -7.0711,8.3147 -5.5557,9.2388 -3.8268,9.8079 -1.9509)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,0 5,5 5,5 0,0 0))'), 50, ST_BUFFER_STRATEGY('join_miter', 5))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,0 5,5 5,5 0,0 0))'), 50, ST_BUFFER_STRATEGY('join_miter', 5))) POLYGON((0 -50,5 -50,55 -50,55 0,55 5,55 55,5 55,0 55,-50 55,-50 5,-50 0,-49.0393 -9.7545,-46.194 -19.1342,-41.5735 -27.7785,-35.3553 -35.3553,-27.7785 -41.5735,-19.1342 -46.194,-9.7545 -49.0393,0 -50)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 10,10 0),(10 0,0 0),(0 0,10 10))'), 100, ST_BUFFER_STRATEGY('join_miter', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 10,10 0),(10 0,0 0),(0 0,10 10))'), 100, ST_BUFFER_STRATEGY('join_miter', 10))) POLYGON((5 109.5075,0 110,-19.509 108.0785,-38.2683 102.388,-55.557 93.147,-70.7107 80.7107,-83.147 65.557,-92.388 48.2683,-98.0785 29.509,-100 10,-99.5075 5,-100 0,-98.0785 -19.509,-92.388 -38.2683,-83.147 -55.557,-70.7107 -70.7107,-55.557 -83.147,-38.2683 -92.388,-19.509 -98.0785,0 -100,10 -100,29.509 -98.0785,48.2683 -92.388,65.557 -83.147,80.7107 -70.7107,93.147 -55.557,102.388 -38.2683,108.0785 -19.509,110 0,109.5075 5,110 10,108.0785 29.509,102.388 48.2683,93.147 65.557,80.7107 80.7107,65.557 93.147,48.2683 102.388,29.509 108.0785,10 110,5 109.5075)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((1 -1,1000 -1000,0 0),(2 2,4 -9))'), 1000, ST_BUFFER_STRATEGY('join_miter', 50))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((1 -1,1000 -1000,0 0),(2 2,4 -9))'), 1000, ST_BUFFER_STRATEGY('join_miter', 50))) POLYGON((292.9 -1707.1,36355.3 -36355.3,1707.1 -292.9,735.3 678.9,720.7 697.3,571.2 824.2,399.9 919.4,213.3 979.4,18.5 1001.9,-176.9 985.9,-194.5 980.8,-195.1 980.8,-201.3 978.9,-365.4 932.1,-379.4 924.9,-382.7 923.9,-415.6 906.3,-539.8 842.5,-549.9 834.5,-555.6 831.5,-609.9 786.9,-693.3 720.7,-699.7 713.2,-707.1 707.1,-773 626.8,-820.2 571.2,-823.5 565.3,-831.5 555.6,-896 434.8,-915.4 399.9,-916.6 396.4,-923.9 382.7,-972.7 221.7,-975.4 213.3,-975.5 212.5,-980.8 195.1,-1000 0,-980.8 -195.1,-930.6 -360.6,-926.1 -376.4,-925.4 -377.7,-923.9 -382.7,-897.4 -432.2,-836.5 -550.8,-714.7 -704.3,-683 -731.2,292.9 -1707.1)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 5,5 5,0 0))'), 1, ST_BUFFER_STRATEGY('join_miter', 1))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 5,5 5,0 0))'), 1, ST_BUFFER_STRATEGY('join_miter', 1))) POLYGON((-1 0,-0.3826834323650898 -0.9238795325112867,0.7071067811865475 -0.7071067811865475,5.707106781186548 4.292893218813452,5.923879532511287 5.38268343236509,5 6,0 6,-0.7071067811865475 5.707106781186548,-1 5,-1 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0))'), 5, ST_BUFFER_STRATEGY('join_miter', 5))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0))'), 5, ST_BUFFER_STRATEGY('join_miter', 5))) POLYGON((-5 0,-5 -5,0 -5,10 -5,15 -5,15 0,15 10,15 15,10 15,0 15,-5 15,-5 10,-5 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((10 10,10 20,20 20,20 10,10 10))'), 10, ST_BUFFER_STRATEGY('join_miter', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((10 10,10 20,20 20,20 10,10 10))'), 10, ST_BUFFER_STRATEGY('join_miter', 10))) POLYGON((0 10,0 0,10 0,20 0,30 0,30 10,30 20,30 30,20 30,10 30,0 30,0 20,0 10)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((10 0,0 10,-10 0,0 -10,10 0 ))'), 10, ST_BUFFER_STRATEGY('join_miter', 50))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((10 0,0 10,-10 0,0 -10,10 0 ))'), 10, ST_BUFFER_STRATEGY('join_miter', 50))) POLYGON((17.071067811865476 -7.071067811865475,24.14213562373095 0,17.071067811865476 7.071067811865475,7.071067811865475 17.071067811865476,0 24.14213562373095,-7.071067811865475 17.071067811865476,-17.071067811865476 7.071067811865475,-24.14213562373095 0,-17.071067811865476 -7.071067811865475,-7.071067811865475 -17.071067811865476,0 -24.14213562373095,7.071067811865475 -17.071067811865476,17.071067811865476 -7.071067811865475)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))'), 1, ST_BUFFER_STRATEGY('join_miter',60))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))'), 1, ST_BUFFER_STRATEGY('join_miter',60))) POLYGON((-1 0,-1 -1,0 -1,8 -1,9 -1,9 0,9 8,9 9,8 9,0 9,-1 9,-1 8,-1 0),(3 3,3 5,5 5,5 3,3 3)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4))'), 100, ST_BUFFER_STRATEGY('join_miter', 60))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4))'), 100, ST_BUFFER_STRATEGY('join_miter', 60))) POLYGON((-100 0,-100 -100,0 -100,10 -100,110 -100,110 0,110 10,110 110,10 110,0 110,-100 110,-100 10,-100 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 5,5 5,0 0)))'), 0.5, ST_BUFFER_STRATEGY('join_miter', 1))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 5,5 5,0 0)))'), 0.5, ST_BUFFER_STRATEGY('join_miter', 1))) POLYGON((-0.5 0,-0.1913417161825449 -0.46193976625564337,0.35355339059327373 -0.35355339059327373,5.353553390593274 4.646446609406726,5.461939766255643 5.191341716182545,5 5.5,0 5.5,-0.35355339059327373 5.353553390593274,-0.5 5,-0.5 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 10,10 0,0 0,0 10)),((0 0,10 10,10 0,0 0)))'), 1, ST_BUFFER_STRATEGY('join_miter', 5))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 10,10 0,0 0,0 10)),((0 0,10 10,10 0,0 0)))'), 1, ST_BUFFER_STRATEGY('join_miter', 5))) POLYGON((5.000000781186548 6.4142127811865475,0.7071067811865475 10.707106781186548,-1 12.414213562373098,-1 10,-1.0000005720708107 0.4142129903022842,-2.414213562373095 -1,-1 -1,0 -1,10 -1,11 -1,12.414213562373098 -1,11.000000572070812 0.41421299030228437,11 10,11 12.414213562373096,9.292893218813452 10.707106781186548,5.000000781186548 6.4142127811865475)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,0 0)),((10 10,10 15,15 15,10 10)))'), 20, ST_BUFFER_STRATEGY('join_miter', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,0 0)),((10 10,10 15,15 15,10 10)))'), 20, ST_BUFFER_STRATEGY('join_miter', 10))) POLYGON((14.1421 -14.1421,24.1421 -4.1421,29.1421 0.8579,58.2843 30,63.2843 35,15 35,10 35,-10 35,-10 30,-20 30,-20 10,-20 0,-20 -48.2843,-10 -38.2843,14.1421 -14.1421)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((4 4,4 6,6 6,6 4, 4 4)))'), 4, ST_BUFFER_STRATEGY('join_miter', 50))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((4 4,4 6,6 6,6 4, 4 4)))'), 4, ST_BUFFER_STRATEGY('join_miter', 50))) POLYGON((-4 0,-4 -4,0 -4,10 -4,14 -4,14 0,14 10,14 14,10 14,0 14,-4 14,-4 10,-4 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4)))'), 4, ST_BUFFER_STRATEGY('join_miter', 60))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4)))'), 4, ST_BUFFER_STRATEGY('join_miter', 60))) POLYGON((-4 0,-4 -4,0 -4,10 -4,14 -4,14 0,14 10,14 14,10 14,0 14,-4 14,-4 10,-4 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10))'), 10, ST_BUFFER_STRATEGY('join_miter', 4))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10))'), 10, ST_BUFFER_STRATEGY('join_miter', 4))) POLYGON((-7.0711 7.0711,-8.3147 5.5557,-9.2388 3.8268,-9.8079 1.9509,-10 0,-9.8079 -1.9509,-9.2388 -3.8268,-8.3147 -5.5557,-7.0711 -7.0711,-5.5557 -8.3147,-3.8268 -9.2388,-1.9509 -9.8079,0 -10,1.9509 -9.8079,3.8268 -9.2388,5.5557 -8.3147,7.0711 -7.0711,17.0711 2.9289,17.0711 2.9289,18.3147 4.4443,19.2388 6.1732,19.8079 8.0491,20 10,19.8079 11.9509,19.2388 13.8268,18.3147 15.5557,17.0711 17.0711,15.5557 18.3147,13.8268 19.2388,11.9509 19.8079,10 20,8.0491 19.8079,6.1732 19.2388,4.4443 18.3147,2.9289 17.0711,-7.0711 7.0711)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 0,5 0),(0 0,0 5)))'), 10, ST_BUFFER_STRATEGY('join_miter', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 0,5 0),(0 0,0 5)))'), 10, ST_BUFFER_STRATEGY('join_miter', 10))) POLYGON((9.0953 9.0953,8.3147 10.5557,7.0711 12.0711,5.5557 13.3147,3.8268 14.2388,1.9509 14.8079,0 15,-1.9509 14.8079,-3.8268 14.2388,-5.5557 13.3147,-7.0711 12.0711,-8.3147 10.5557,-9.2388 8.8268,-9.8079 6.9509,-10 5,-10 0,-9.8079 -1.9509,-9.2388 -3.8268,-8.3147 -5.5557,-7.0711 -7.0711,-5.5557 -8.3147,-3.8268 -9.2388,-1.9509 -9.8079,0 -10,5 -10,6.9509 -9.8079,8.8268 -9.2388,10.5557 -8.3147,12.0711 -7.0711,13.3147 -5.5557,14.2388 -3.8268,14.8079 -1.9509,15 0,14.8079 1.9509,14.2388 3.8268,13.3147 5.5557,12.0711 7.0711,10.5557 8.3147,9.0953 9.0953)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)))'), 10, ST_BUFFER_STRATEGY('join_miter', 4))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)))'), 10, ST_BUFFER_STRATEGY('join_miter', 4))) POLYGON((-10 0,-10 -10,0 -10,5 -10,15 -10,15 0,15 5,15 15,5 15,0 15,-10 15,-10 5,-10 0)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0,2 2,4 0,0 0)),((3 3,3 5,5 5,5 3,3 3))))'), 10, ST_BUFFER_STRATEGY('join_miter', 4))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0,2 2,4 0,0 0)),((3 3,3 5,5 5,5 3,3 3))))'), 10, ST_BUFFER_STRATEGY('join_miter', 4))) POLYGON((0.8579 15,-7 15,-7 7.1421,-7.0711 7.0711,-24.1421 -10,0 -10,4 -10,28.1421 -10,15 3.1421,15 5,15 15,5 15,3.1421 15,2 16.1421,0.8579 15)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'MULTILINESTRING((0 0,10 10)))'), 10, ST_BUFFER_STRATEGY('join_miter', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'MULTILINESTRING((0 0,10 10)))'), 10, ST_BUFFER_STRATEGY('join_miter', 10))) POLYGON((-7.0711 7.0711,-8.3147 5.5557,-9.2388 3.8268,-9.8079 1.9509,-10 0,-9.8079 -1.9509,-9.2388 -3.8268,-8.3147 -5.5557,-7.0711 -7.0711,-5.5557 -8.3147,-3.8268 -9.2388,-1.9509 -9.8079,0 -10,1.9509 -9.8079,3.8268 -9.2388,5.5557 -8.3147,7.0711 -7.0711,17.0711 2.9289,17.0711 2.9289,18.3147 4.4443,19.2388 6.1732,19.8079 8.0491,20 10,19.8079 11.9509,19.2388 13.8268,18.3147 15.5557,17.0711 17.0711,15.5557 18.3147,13.8268 19.2388,11.9509 19.8079,10 20,8.0491 19.8079,6.1732 19.2388,4.4443 18.3147,2.9289 17.0711,-7.0711 7.0711)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'LINESTRING(0 0,-5 -5,-10 -10),' 'MULTILINESTRING((0 0,5 5,10 10)),' 'MULTILINESTRING((0 0,10 0),(0 0,-10 0)))'), 10, ST_BUFFER_STRATEGY('join_miter', 50))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'LINESTRING(0 0,-5 -5,-10 -10),' 'MULTILINESTRI POLYGON((4.1421 -10,10 -10,11.9509 -9.8079,13.8268 -9.2388,15.5557 -8.3147,17.0711 -7.0711,18.3147 -5.5557,19.2388 -3.8268,19.8079 -1.9509,20 0,19.8079 1.9509,19.2388 3.8268,18.6117 5,19.2388 6.1732,19.8079 8.0491,20 10,19.8079 11.9509,19.2388 13.8268,18.3147 15.5557,17.0711 17.0711,15.5557 18.3147,13.8268 19.2388,11.9509 19.8079,10 20,8.0491 19.8079,6.1732 19.2388,4.4443 18.3147,2.9289 17.0711,-4.1421 10,-10 10,-11.9509 9.8079,-13.8268 9.2388,-15.5557 8.3147,-17.0711 7.0711,-18.3147 5.5557,-19.2388 3.8268,-19.8079 1.9509,-20 0,-19.8079 -1.9509,-19.2388 -3.8268,-18.6117 -5,-19.2388 -6.1732,-19.8079 -8.0491,-20 -10,-19.8079 -11.9509,-19.2388 -13.8268,-18.3147 -15.5557,-17.0711 -17.0711,-15.5557 -18.3147,-13.8268 -19.2388,-11.9509 -19.8079,-10 -20,-8.0491 -19.8079,-6.1732 -19.2388,-4.4443 -18.3147,-2.9289 -17.0711,4.1421 -10)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)),' 'MULTIPOLYGON(((0 0,2 2,4 0,0 0)),((3 3,3 5,5 5,5 3,3 3))))'), 10, ST_BUFFER_STRATEGY('join_miter', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)),' 'MULTIPOLYGON(((0 0,2 2,4 0,0 0)),((3 3,3 5,5 5,5 3,3 3))))'), 10, ST_BUFFER_STRATEGY('join_miter', 10)) POLYGON((-10 4.142134872583158,-24.142135623730944 -9.999999999999998,-10 -10,0 -10,4 -10,5 -10,15 -10,28.142135623730937 -9.999999999999998,15 3.14214370333468,15 5,15 15,5 15,3.1421312325051605 15,1.9999999999999973 16.14213562373095,0.8578698010516401 15.000005424782593,-7 15,-10 15,-10 5,-10 4.142134872583158)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'POLYGON((0 0,0 5,5 5,5 0,0 0)),' 'MULTILINESTRING((0 0,5 5,10 10)),' 'MULTIPOLYGON(((0 0,1 1,1 0,0 0)),((2 2,3 3,3 2,2 2))))'), 10, ST_BUFFER_STRATEGY('join_miter', 50))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,5 5,10 10),' 'POLYGON((0 0,0 5,5 5,5 0,0 0)),' 'MULTILINESTR POLYGON((2.9289 17.0711,0.8579 15,0 15,-10 15,-10 5,-10 4.1421,-24.1421 -10,-10 -10,0 -10,1 -10,5 -10,11 -10,15 -10,15 0,15 0.8579,17.0711 2.9289,18.3147 4.4443,19.2388 6.1732,19.8079 8.0491,20 10,19.8079 11.9509,19.2388 13.8268,18.3147 15.5557,17.0711 17.0711,15.5557 18.3147,13.8268 19.2388,13 19.4896,13 27.1421,2.9289 17.0711)) ##################################################################################### # ST_BUFFER() with more than one strategy values ##################################################################################### SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('join_round', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('join_round', 10))) POLYGON((1.4645 8.5355,8.5355 1.4645,13.5355 6.4645,13.5355 6.4645,6.4645 13.5355,1.4645 8.5355)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('join_miter', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('join_miter', 10))) POLYGON((1.4645 8.5355,8.5355 1.4645,13.5355 6.4645,13.5355 6.4645,6.4645 13.5355,1.4645 8.5355)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('end_round', 10), ST_BUFFER_STRATEGY('join_round', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('end_round', 10), ST_BUFFER_STRATEGY('join_round', 10))) POLYGON((1.4645 8.5355,0.0616 5.7822,0.545 2.73,2.73 0.545,5.7822 0.0616,8.5355 1.4645,13.5355 6.4645,13.5355 6.4645,14.9384 9.2178,14.455 12.27,12.27 14.455,9.2178 14.9384,6.4645 13.5355,1.4645 8.5355)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('end_round', 10), ST_BUFFER_STRATEGY('join_miter', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('end_round', 10), ST_BUFFER_STRATEGY('join_miter', 10))) POLYGON((1.4645 8.5355,0.0616 5.7822,0.545 2.73,2.73 0.545,5.7822 0.0616,8.5355 1.4645,13.5355 6.4645,13.5355 6.4645,14.9384 9.2178,14.455 12.27,12.27 14.455,9.2178 14.9384,6.4645 13.5355,1.4645 8.5355)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('join_round', 10), ST_BUFFER_STRATEGY('end_flat'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('join_round', 10), ST_BUFFER_STRATEGY('end_flat'))) POLYGON((1.4645 8.5355,8.5355 1.4645,13.5355 6.4645,13.5355 6.4645,6.4645 13.5355,1.4645 8.5355)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('join_round', 10), ST_BUFFER_STRATEGY('end_round', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('join_round', 10), ST_BUFFER_STRATEGY('end_round', 10))) POLYGON((1.4645 8.5355,0.0616 5.7822,0.545 2.73,2.73 0.545,5.7822 0.0616,8.5355 1.4645,13.5355 6.4645,13.5355 6.4645,14.9384 9.2178,14.455 12.27,12.27 14.455,9.2178 14.9384,6.4645 13.5355,1.4645 8.5355)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('join_miter', 10), ST_BUFFER_STRATEGY('end_flat'))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('join_miter', 10), ST_BUFFER_STRATEGY('end_flat'))) POLYGON((1.4645 8.5355,8.5355 1.4645,13.5355 6.4645,13.5355 6.4645,6.4645 13.5355,1.4645 8.5355)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('join_miter', 10), ST_BUFFER_STRATEGY('end_round', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('join_miter', 10), ST_BUFFER_STRATEGY('end_round', 10))) POLYGON((1.4645 8.5355,0.0616 5.7822,0.545 2.73,2.73 0.545,5.7822 0.0616,8.5355 1.4645,13.5355 6.4645,13.5355 6.4645,14.9384 9.2178,14.455 12.27,12.27 14.455,9.2178 14.9384,6.4645 13.5355,1.4645 8.5355)) ##################################################################################### # Additional test cases ##################################################################################### # Strategy names with both upper and lower case letters should work SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1, 3 9, 4 6)'), 1, ST_BUFFER_STRATEGY('End_Round', 18), ST_BUFFER_STRATEGY('JOIN_MITER', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1, 3 9, 4 6)'), 1, ST_BUFFER_STRATEGY('End_Round', 18), ST_BUFFER_STRATEGY('JOIN_MITER', 10))) POLYGON((3.1542 5.4937,3.2167 5.3784,3.4765 5.148,3.7995 5.0203,4.1467 5.0108,4.4762 5.1206,4.7482 5.3365,4.93 5.6324,4.9996 5.9727,4.9487 6.3162,3.9487 9.3162,2.8627 12.5741,2.0299 9.2425,0.0299 1.2425,0.0054 0.8961,0.1009 0.5622,0.3049 0.2811,0.5927 0.0867,0.9296 0.0025,1.275 0.0386,1.5873 0.1906,1.8287 0.4403,1.9701 0.7575,3.1542 5.4937)) SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1, 3 9, 4 6)'), 1, ST_BUFFER_STRATEGY('END_flat'), ST_BUFFER_STRATEGY('Join_Round', 30))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1, 3 9, 4 6)'), 1, ST_BUFFER_STRATEGY('END_flat'), ST_BUFFER_STRATEGY('Join_Round', 30))) POLYGON((3.2154 5.7385,4.9487 6.3162,3.9487 9.3162,3.8679 9.4967,3.7532 9.6578,3.609 9.7931,3.4411 9.8975,3.2558 9.9667,3.0606 9.9982,2.863 9.9906,2.6708 9.9443,2.4914 9.861,2.3319 9.7441,2.1986 9.5981,2.0965 9.4287,2.0299 9.2425,0.0299 1.2425,1.9701 0.7575,3.2154 5.7385)) # The ST_BUFFER_STRATEGY() can be used in arbitrary contexts SET @buf_strat = ST_BUFFER_STRATEGY('point_circle', 10); CREATE TABLE t0(geom GEOMETRY); INSERT INTO t0 VALUES (ST_GEOMFROMTEXT('POINT(0 0)')), (ST_GEOMFROMTEXT('point(1 1)')); SELECT ST_ASTEXT(ST_BUFFER(geom, 1, @buf_strat)) FROM t0; ST_ASTEXT(ST_BUFFER(geom, 1, @buf_strat)) POLYGON((1 0,0.809 0.5878,0.309 0.9511,-0.309 0.9511,-0.809 0.5878,-1 -0,-0.809 -0.5878,-0.309 -0.9511,0.309 -0.9511,0.809 -0.5878,1 0)) POLYGON((2 1,1.809 1.5878,1.309 1.9511,0.691 1.9511,0.191 1.5878,0 1,0.191 0.4122,0.691 0.0489,1.309 0.0489,1.809 0.4122,2 1)) DROP TABLE t0; CREATE TABLE t1(geom GEOMETRY, strategy binary(12)); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT('POINT(0 0)'), ST_BUFFER_STRATEGY('point_circle', 10)), (ST_GEOMFROMTEXT('POINT(1 1)'), ST_BUFFER_STRATEGY('point_square')); SELECT ST_ASTEXT(ST_BUFFER(geom, 1, strategy)) FROM t1; ST_ASTEXT(ST_BUFFER(geom, 1, strategy)) POLYGON((1 0,0.809 0.5878,0.309 0.9511,-0.309 0.9511,-0.809 0.5878,-1 -0,-0.809 -0.5878,-0.309 -0.9511,0.309 -0.9511,0.809 -0.5878,1 0)) POLYGON((0 0,2 0,2 2,0 2,0 0)) DROP TABLE t1; SELECT HEX(ST_BUFFER_STRATEGY('join_miter', 10)); HEX(ST_BUFFER_STRATEGY('join_miter', 10)) 040000000000000000002440 SELECT ST_BUFFER_STRATEGY('join_miter', 10) + 5; ST_BUFFER_STRATEGY('join_miter', 10) + 5 5 SELECT 3 - ST_BUFFER_STRATEGY('join_miter', 10); 3 - ST_BUFFER_STRATEGY('join_miter', 10) 3 SELECT ST_BUFFER_STRATEGY('join_miter', 10) + 3; ST_BUFFER_STRATEGY('join_miter', 10) + 3 3 SELECT ST_BUFFER_STRATEGY('join_miter', 10) / 3; ST_BUFFER_STRATEGY('join_miter', 10) / 3 0.0000 SELECT ST_BUFFER_STRATEGY('join_miter', 10) * 3; ST_BUFFER_STRATEGY('join_miter', 10) * 3 0 SET names gb18030; SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1, 3 9, 4 6)'), 1, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('join_miter', 10))); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1, 3 9, 4 6)'), 1, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('join_miter', 10))) POLYGON((3.2154 5.7385,4.9487 6.3162,3.9487 9.3162,2.8627 12.5741,2.0299 9.2425,0.0299 1.2425,1.9701 0.7575,3.2154 5.7385)) SET names default; ##################################################################################### # Invalid function calls ##################################################################################### SELECT ST_ASTEXT(ST_BUFFER(NULL, 1)); ST_ASTEXT(ST_BUFFER(NULL, 1)) NULL SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), NULL)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), NULL)) NULL SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, NULL)); ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, NULL)) NULL SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT()'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING()'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON(())'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT()'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING(())'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON((()))'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(a 0)'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(! 0)'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT('!' 0)'), 1)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '!' 0)'), 1))' at line 1 SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(12,34 0)'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(a 0,10 10)'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,! 10)'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING('!' 0,10 10)'), 1)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '!' 0,10 10)'), 1))' at line 1 SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(12,34 0,10 10)'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((a 0,10 10,10 0,0 0))'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,! 10,10 0,0 0))'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON(('!' 0,10 10,10 0,0 0))'), 1)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '!' 0,10 10,10 0,0 0))'), 1))' at line 1 SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((12,34 0,10 10,10 0,0 0))'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0))'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,5 5))'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,5 5,10 10))'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 5,10 10),(0 0))'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,5 5)),((10 10)))'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,5 5)),((1 1,1 1,1 1,1 1)))'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,5 5,10 10)),((10 10))'), 1)); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), -1)); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), -100)); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(0 0)'), -10)); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(0 0,1 1,2 2,3 3)'), -20)); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,1 1,2 2,3 3)'), -20)); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,1 1,2 0,3 1,4 0)'), -1)); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,1 1),(2 2,3 3))'), -5)); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,10 10),(10 0,0 10))'), -2)); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(0 0))'), -2)); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,10 10))'), -2)); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(0 0), MULTIPOINT(0 0,2 2,4 4))'), -2)); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,2 2), MULTILINESTRING((4 4,5 5),(6 6,7 7)))'), -2)); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(' 'POINT(0 0),' 'LINESTRING(0 0,2 2,4 4,6 6,8 8,10 10),' 'MULTIPOINT(0 0,10 10,20 20,30 30,40 40),' 'MULTILINESTRING((0 0,10 0),(0 0,0 10),(0 0,-10 0),(0 0,0 -10)))'), -2)); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)'), 1, ST_BUFFER_STRATEGY('point_circle', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 10,10 0),(10 0,0 0))'), 100, ST_BUFFER_STRATEGY('point_circle', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0))'), 1, ST_BUFFER_STRATEGY('point_circle', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,1 1,2 0,0 0)),((3 3,4 4,5 3,3 3)))'), 1, ST_BUFFER_STRATEGY('point_circle', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)'), 1, ST_BUFFER_STRATEGY('point_square'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTILINESTRING((0 0,10 0),(0 0,-10 0))'), 1, ST_BUFFER_STRATEGY('point_square'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((5 5,5 10,10 10,10 5,5 5))'), 5, ST_BUFFER_STRATEGY('point_square'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,1 1,2 0,0 0)),((3 3,4 4,5 3,3 3)))'), 1, ST_BUFFER_STRATEGY('point_square'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('end_round', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(0 0,10 0,-10 0)'), 1, ST_BUFFER_STRATEGY('end_round', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0))'), 1, ST_BUFFER_STRATEGY('end_round', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,1 1,2 0,0 0)),((3 3,4 4,5 3,3 3)))'), 1, ST_BUFFER_STRATEGY('end_round', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('end_flat'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(0 0,10 0,-10 0)'), 1, ST_BUFFER_STRATEGY('end_flat'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 10,10 10,10 0,0 0))'), 1, ST_BUFFER_STRATEGY('end_flat'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,1 1,2 0,0 0)),((3 3,4 4,5 3,3 3)))'), 1, ST_BUFFER_STRATEGY('end_flat'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('join_round', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(0 0,10 0,-10 0)'), 1, ST_BUFFER_STRATEGY('join_round', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('join_miter', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('MULTIPOINT(0 0,10 0,-10 0)'), 1, ST_BUFFER_STRATEGY('join_miter', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1 1)'), 1, ST_BUFFER_STRATEGY('point_square'), ST_BUFFER_STRATEGY('end_round', 30))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1 1)'), 1, ST_BUFFER_STRATEGY('point_square'), ST_BUFFER_STRATEGY('end_flat'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1 1)'), 1, ST_BUFFER_STRATEGY('point_square'), ST_BUFFER_STRATEGY('join_round', 30))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1 1)'), 1, ST_BUFFER_STRATEGY('point_square'), ST_BUFFER_STRATEGY('join_miter', 30))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1 1)'), 1, ST_BUFFER_STRATEGY('end_round', 10), ST_BUFFER_STRATEGY('join_round', 30))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1 1)'), 1, ST_BUFFER_STRATEGY('end_round', 10), ST_BUFFER_STRATEGY('join_miter', 30))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1 1)'), 1, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('join_round', 30))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1 1)'), 1, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('join_miter', 30))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1 1)'), 1, ST_BUFFER_STRATEGY('point_square'), ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('join_miter', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1 1)'), 1, ST_BUFFER_STRATEGY('point_square'), ST_BUFFER_STRATEGY('end_round', 20), ST_BUFFER_STRATEGY('join_miter', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))'), 1, ST_BUFFER_STRATEGY('end_round', 30), ST_BUFFER_STRATEGY('join_round',60))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))'), 1, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('join_round',60))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))'), 1, ST_BUFFER_STRATEGY('point_circle', 30), ST_BUFFER_STRATEGY('join_round',60))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))'), 1, ST_BUFFER_STRATEGY('point_square'), ST_BUFFER_STRATEGY('join_round',60))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))'), 1, ST_BUFFER_STRATEGY('end_round', 30), ST_BUFFER_STRATEGY('point_circle',60))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))'), 1, ST_BUFFER_STRATEGY('end_round', 30), ST_BUFFER_STRATEGY('point_square'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))'), 1, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('point_circle',60))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))'), 1, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('point_square'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))'), 1, ST_BUFFER_STRATEGY('join_round', 20), ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('point_circle',60))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))'), 1, ST_BUFFER_STRATEGY('join_round', 20), ST_BUFFER_STRATEGY('end_round', 30), ST_BUFFER_STRATEGY('point_square'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1, 3 9, 4 6)'), 1, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('point_circle', 20))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1, 3 9, 4 6)'), 1, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('point_square'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1, 3 9, 4 6)'), 1, ST_BUFFER_STRATEGY('join_miter',10), ST_BUFFER_STRATEGY('point_circle', 20))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1, 3 9, 4 6)'), 1, ST_BUFFER_STRATEGY('join_miter',10), ST_BUFFER_STRATEGY('point_square'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1, 3 9, 4 6)'), 1, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('join_miter',10), ST_BUFFER_STRATEGY('point_circle', 20))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1, 3 9, 4 6)'), 1, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('join_miter',10), ST_BUFFER_STRATEGY('point_square'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(1 1)'), 1, ST_BUFFER_STRATEGY('point_square', 20))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(1 1,2 2)'), 1, ST_BUFFER_STRATEGY('end_flat', 20))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('point_circle'))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,1 1)'), 1, ST_BUFFER_STRATEGY('end_round'))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))'), 1, ST_BUFFER_STRATEGY('join_round'))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))'), 1, ST_BUFFER_STRATEGY('join_miter'))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, 1)); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_GEOMFROMTEXT('POINT(1 1)'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('point_square'), ST_GEOMFROMTEXT('POINT(1 1)'))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('point_round'))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('point_flat'))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('end_circle'))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('end_miter'))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('join_square'))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('join_flat'))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('joint_round'))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('join_round2', 16))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('join_rou', 32))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('point_circle', 0))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('point_circle', -1))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 1, ST_BUFFER_STRATEGY('point_circle', -1000))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,5 5,10 10)'), 1, ST_BUFFER_STRATEGY('end_round', 0))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,5 5,10 10)'), 1, ST_BUFFER_STRATEGY('end_round', -1))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,5 5,10 10)'), 1, ST_BUFFER_STRATEGY('end_round', -1000))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,5 5,10 10)'), 1, ST_BUFFER_STRATEGY('join_round', 0))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,5 5,10 10)'), 1, ST_BUFFER_STRATEGY('join_round', -1))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,5 5,10 10)'), 1, ST_BUFFER_STRATEGY('join_round', -1000))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,5 5,10 10)'), 1, ST_BUFFER_STRATEGY('join_miter', 0))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,5 5,10 10)'), 1, ST_BUFFER_STRATEGY('join_miter', -1))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(0 0,5 5,10 10)'), 1, ST_BUFFER_STRATEGY('join_miter', -1000))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 5, ST_BUFFER_STRATEGY('point_square'), ST_BUFFER_STRATEGY('point_circle', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POINT(0 0)'), 5, ST_BUFFER_STRATEGY('point_cicle', 10), ST_BUFFER_STRATEGY('point_square'))); ERROR HY000: Incorrect arguments to st_buffer_strategy SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('end_round', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('LINESTRING(5 5,10 10)'), 5, ST_BUFFER_STRATEGY('join_miter', 10), ST_BUFFER_STRATEGY('join_round', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('POLYGON((5 5,5 10,10 10,10 5,5 5))'), 5, ST_BUFFER_STRATEGY('join_miter', 10), ST_BUFFER_STRATEGY('join_round', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(0 0,1 1))'), 5, ST_BUFFER_STRATEGY('end_flat'), ST_BUFFER_STRATEGY('end_round', 10))); ERROR HY000: Incorrect arguments to st_buffer SELECT ST_BUFFER_STRATEGY('end_round', 10, 100); ERROR 42000: Incorrect parameter count in the call to native function 'ST_BUFFER_STRATEGY' SELECT ST_BUFFER_STRATEGY(); ERROR 42000: Incorrect parameter count in the call to native function 'ST_BUFFER_STRATEGY' SELECT ST_BUFFER(); ERROR 42000: Incorrect parameter count in the call to native function 'ST_BUFFER' SELECT ST_BUFFER(ST_GEOMFROMTEXT('point(0 0)')); ERROR 42000: Incorrect parameter count in the call to native function 'ST_BUFFER' SELECT ST_ASTEXT(ST_BUFFER(0x000000000200000000000000000000000000000000, 1)); ERROR HY000: Geometry byte string must be little endian. SELECT ST_ASTEXT(ST_BUFFER(0x010100000001000000010100000000000000000000, 1)); ERROR HY000: Geometry byte string must be little endian. SELECT ST_ASTEXT(ST_BUFFER(0x010100000002000000000000000000000000000000, 1)); ERROR HY000: Geometry byte string must be little endian. SELECT ST_ASTEXT(ST_BUFFER(0x000000000600000001000000000200000002000000, 1)); ERROR HY000: Geometry byte string must be little endian. SELECT ST_ASTEXT(ST_BUFFER(0x000000000200000001000000050000000000000000, 1)); ERROR HY000: Geometry byte string must be little endian. SELECT ST_ASTEXT(ST_BUFFER(0x010300000002000000010300000002000000050000, 1)); ERROR HY000: Geometry byte string must be little endian. SELECT ST_ASTEXT(ST_BUFFER(0x010400000002000000010100000000000000000000, 1)); ERROR HY000: Geometry byte string must be little endian. set session max_points_in_geometry=1024*1024; do st_buffer(point(-5,0),8772,st_buffer_strategy('point_circle',8*1024)); # Clean up DROP TABLE gis_geometrycollection; # # Bug #21841051 PREPARE STATEMENT RETURNS DIFFERENT NUMBER OF ROWS WHEN # EXECUTED SECOND TIME # CREATE TABLE t1 (id INT, a VARCHAR(20)); INSERT INTO t1 VALUES (2, 'point_square'); CREATE TABLE t2 (id INT); INSERT INTO t2 VALUES (1), (3); PREPARE stmt FROM 'SELECT COUNT(*) FROM (SELECT ST_Buffer_Strategy(a) AS a1 FROM t1 RIGHT OUTER JOIN t2 ON (t1.id > t2.id) GROUP BY a1) AS a2'; EXECUTE stmt; COUNT(*) 2 EXECUTE stmt; COUNT(*) 2 DEALLOCATE PREPARE stmt; DROP TABLE t1, t2;