Changes between Version 14 and Version 15 of DevWikiEmptyGeometry


Ignore:
Timestamp:
10/06/09 12:33:42 (15 years ago)
Author:
chodgson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DevWikiEmptyGeometry

    v14 v15  
    44
    55 * ST_Union(geometry, empty) == geometry
    6 
    7 {{{
    8 SQL Server 2008 geometry
    9    SELECT Geometry::STGeomFromText('POINT(1 2)',4326).STUnion(Geometry::STGeomFromText('POLYGON EMPTY',4326))
    10      => POINT (1 2)
    11    
    12 SQL Server 2008 geography
    13   SELECT (Geography::STGeomFromText('POINT(1 2)',4326).STUnion(Geography::STGeomFromText('POLYGON EMPTY',4326))).STAsText()
    14     => POINT(1 2)
    15 }}}
    16 
    17    
    186 * ST_Union(empty, empty) == empty
    19 {{{
    20  SQL Server 2008 Geometry
    21    SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STUnion(Geometry::STGeomFromText('POLYGON EMPTY',4326))).STAsText()
    22      => GEOMETRYCOLLECTION EMPTY
    23  SQL Server 2008 Geography
    24     SELECT (Geography::STGeomFromText('POLYGON EMPTY',4326).STUnion(Geography::STGeomFromText('POLYGON EMPTY',4326))).STAsText()
    25       => GEOMETRYCOLLECTION EMPTY
    26    
    27 }}}
    287 * 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 
    368 * 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 EMPTY
    41 }}}
    42 
    439 * ST_Distance(geometry, empty) == NULL
    4410 * ST_DWithin(geometry, empty, tolerance) == FALSE
    4511 * ST_Contains(geometry, empty) == FALSE
    46 
    47 {{{
    48 SQL Server 2008 Geometry
    49 SELECT (Geometry::STGeomFromText('POINT(1 3)',4326).STContains(Geometry::STGeomFromText('POLYGON EMPTY',4326)))
    50   => 0
    51 }}}
    52 
    5312 * ??? ST_Contains(empty, empty) == FALSE
    54 
    55 {{{
    56 SQL Server 2008 Geometry
    57  SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STContains(Geometry::STGeomFromText('POLYGON EMPTY',4326)))
    58   => 0
    59 
    60 }}}
    61 
    62    
    6313 * ST_Intersects(geometry, empty) == FALSE
    64 
    65 {{{
    66 SQL Server 2008 Geometry
    67   SELECT (Geometry::STGeomFromText('POINT(1 3)',4326).STIntersects(Geometry::STGeomFromText('POLYGON EMPTY',4326)))
    68   => 0
    69 }}}
    70 
    7114 * ??? ST_Intersects(empty, empty) == FALSE
    72 {{{
    73 SQL Server 2008 Geometry
    74   SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STIntersects(Geometry::STGeomFromText('POLYGON EMPTY',4326)))
    75     => 0
    76 }}}
    77 
    7815 * ??? ST_Disjoint(empty, empty) == FALSE
    79 
    80 {{{
    81 SQL Server 2008 Geometry
    82  SELECT (Geometry::STGeomFromText('POLYGON EMPTY',4326).STDisjoint(Geometry::STGeomFromText('POLYGON EMPTY',4326)))
    83   => 1
    84 }}}
    85 
    8616 * ??? ST_Disjoint(geometry, empty) == FALSE
    87 {{{
    88 SQL Server 2008 Geometry
    89  SELECT (Geometry::STGeomFromText('POINT(1 3)',4326).STDisjoint(Geometry::STGeomFromText('POLYGON EMPTY',4326)))
    90   => 1
    91 }}}
    9217 * ST_IsSimple(empty) == TRUE
    93 
    94 {{{
    95 SQL Server 2008 Geometry
    96    SELECT Geometry::STGeomFromText('POLYGON EMPTY',4326).STIsSimple()
    97      => 1
    98 }}}
    99 
    10018 * ST_IsValid(empty) == TRUE
    101 
    102 {{{
    103 SQL Server 2008 Geometry
    104   SELECT Geometry::STGeomFromText('POLYGON EMPTY',4326).STIsValid()
    105    => 1
    106 }}}
    107 
    10819
    10920''Note:''
     
    12132 * ST_Disjoint( empty, empty ) == FALSE
    12233 * 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  => NULL
    128 }}}
    129 
    13034 * ST_DWithin( empty, empty, tolerance) == true
    13135
     
    13539 * intersection( empty, empty) == empty
    13640
     41!! SQL Server 2008
     42
     43For reference and comparison, courtesy of Robe:
     44
    13745{{{
    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
    14188}}}
    14289