Changes between Version 14 and Version 15 of DevWikiEmptyGeometry
- Timestamp:
- 10/06/09 12:33:42 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DevWikiEmptyGeometry
v14 v15 4 4 5 5 * ST_Union(geometry, empty) == geometry 6 7 {{{8 SQL Server 2008 geometry9 SELECT Geometry::STGeomFromText('POINT(1 2)',4326).STUnion(Geometry::STGeomFromText('POLYGON EMPTY',4326))10 => POINT (1 2)11 12 SQL Server 2008 geography13 SELECT (Geography::STGeomFromText('POINT(1 2)',4326).STUnion(Geography::STGeomFromText('POLYGON EMPTY',4326))).STAsText()14 => POINT(1 2)15 }}}16 17 18 6 * ST_Union(empty, empty) == empty 19 {{{20 SQL Server 2008 Geometry21 SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STUnion(Geometry::STGeomFromText('POLYGON EMPTY',4326))).STAsText()22 => GEOMETRYCOLLECTION EMPTY23 SQL Server 2008 Geography24 SELECT (Geography::STGeomFromText('POLYGON EMPTY',4326).STUnion(Geography::STGeomFromText('POLYGON EMPTY',4326))).STAsText()25 => GEOMETRYCOLLECTION EMPTY26 27 }}}28 7 * ST_Difference(geometry, empty) == geometry 29 30 {{{31 SQL Server 2008 Geometry:32 SELECT (Geometry::STGeomFromText('POINT(1 3)',4326).STDifference(Geometry::STGeomFromText('POLYGON EMPTY',4326))).STAsText()33 => POINT (1 3)34 }}}35 36 8 * ST_Difference(empty, geometry) == empty 37 {{{38 SQL Server 2008 Geometry:39 SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STDifference(Geometry::STGeomFromText('POLYGON EMPTY',4326))).STAsText()40 => GEOMETRY COLLECTION EMPTY41 }}}42 43 9 * ST_Distance(geometry, empty) == NULL 44 10 * ST_DWithin(geometry, empty, tolerance) == FALSE 45 11 * ST_Contains(geometry, empty) == FALSE 46 47 {{{48 SQL Server 2008 Geometry49 SELECT (Geometry::STGeomFromText('POINT(1 3)',4326).STContains(Geometry::STGeomFromText('POLYGON EMPTY',4326)))50 => 051 }}}52 53 12 * ??? ST_Contains(empty, empty) == FALSE 54 55 {{{56 SQL Server 2008 Geometry57 SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STContains(Geometry::STGeomFromText('POLYGON EMPTY',4326)))58 => 059 60 }}}61 62 63 13 * ST_Intersects(geometry, empty) == FALSE 64 65 {{{66 SQL Server 2008 Geometry67 SELECT (Geometry::STGeomFromText('POINT(1 3)',4326).STIntersects(Geometry::STGeomFromText('POLYGON EMPTY',4326)))68 => 069 }}}70 71 14 * ??? ST_Intersects(empty, empty) == FALSE 72 {{{73 SQL Server 2008 Geometry74 SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STIntersects(Geometry::STGeomFromText('POLYGON EMPTY',4326)))75 => 076 }}}77 78 15 * ??? ST_Disjoint(empty, empty) == FALSE 79 80 {{{81 SQL Server 2008 Geometry82 SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STDisjoint(Geometry::STGeomFromText('POLYGON EMPTY',4326)))83 => 184 }}}85 86 16 * ??? ST_Disjoint(geometry, empty) == FALSE 87 {{{88 SQL Server 2008 Geometry89 SELECT (Geometry::STGeomFromText('POINT(1 3)',4326).STDisjoint(Geometry::STGeomFromText('POLYGON EMPTY',4326)))90 => 191 }}}92 17 * ST_IsSimple(empty) == TRUE 93 94 {{{95 SQL Server 2008 Geometry96 SELECT Geometry::STGeomFromText('POLYGON EMPTY',4326).STIsSimple()97 => 198 }}}99 100 18 * ST_IsValid(empty) == TRUE 101 102 {{{103 SQL Server 2008 Geometry104 SELECT Geometry::STGeomFromText('POLYGON EMPTY',4326).STIsValid()105 => 1106 }}}107 108 19 109 20 ''Note:'' … … 121 32 * ST_Disjoint( empty, empty ) == FALSE 122 33 * ST_Distance( empty, empty) == 0 123 124 {{{125 SQL Server 2008 Geometry:126 SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STDistance(Geometry::STGeomFromText('POLYGON EMPTY',4326)))127 => NULL128 }}}129 130 34 * ST_DWithin( empty, empty, tolerance) == true 131 35 … … 135 39 * intersection( empty, empty) == empty 136 40 41 !! SQL Server 2008 42 43 For reference and comparison, courtesy of Robe: 44 137 45 {{{ 138 SQL Server 2008 Geometry: 139 SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STIntersection(Geometry::STGeomFromText('POLYGON EMPTY',4326))).STAsText() 140 => GEOMETRY COLLECTION EMPTY 46 SELECT Geometry::STGeomFromText('POINT(1 2)',4326).STUnion(Geometry::STGeomFromText('POLYGON EMPTY',4326)) 47 => POINT (1 2) 48 49 SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STUnion(Geometry::STGeomFromText('POLYGON EMPTY',4326))).STAsText() 50 => GEOMETRYCOLLECTION EMPTY 51 52 SELECT (Geometry::STGeomFromText('POINT(1 3)',4326).STDifference(Geometry::STGeomFromText('POLYGON EMPTY',4326))).STAsText() 53 => POINT (1 3) 54 55 SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STDifference(Geometry::STGeomFromText('POLYGON EMPTY',4326))).STAsText() 56 => GEOMETRY COLLECTION EMPTY 57 58 SELECT (Geometry::STGeomFromText('POINT(1 3)',4326).STContains(Geometry::STGeomFromText('POLYGON EMPTY',4326))) 59 => 0 60 61 SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STContains(Geometry::STGeomFromText('POLYGON EMPTY',4326))) 62 => 0 63 64 SELECT (Geometry::STGeomFromText('POINT(1 3)',4326).STIntersects(Geometry::STGeomFromText('POLYGON EMPTY',4326))) 65 => 0 66 67 SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STIntersects(Geometry::STGeomFromText('POLYGON EMPTY',4326))) 68 => 0 69 70 SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STDisjoint(Geometry::STGeomFromText('POLYGON EMPTY',4326))) 71 => 1 72 73 SELECT (Geometry::STGeomFromText('POINT(1 3)',4326).STDisjoint(Geometry::STGeomFromText('POLYGON EMPTY',4326))) 74 => 1 75 76 SELECT Geometry::STGeomFromText('POLYGON EMPTY',4326).STIsSimple() 77 => 1 78 79 SELECT Geometry::STGeomFromText('POLYGON EMPTY',4326).STIsValid() 80 => 1 81 82 SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STDistance(Geometry::STGeomFromText('POLYGON EMPTY',4326))) 83 => NULL 84 85 SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STIntersection(Geometry::STGeomFromText('POLYGON EMPTY',4326))).STAsText() 86 => GEOMETRY COLLECTION EMPTY 87 141 88 }}} 142 89