DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Static Public Member Functions | Properties | List of all members
Deveel.Data.Spatial.SpatialSystemFunctions Class Reference

Static Public Member Functions

static SqlGeometry FromWkb (SqlBinary source)
 
static DataObject FromWkb (DataObject source)
 
static DataObject ToWkb (DataObject geometry)
 
static SqlBinary ToWkb (SqlGeometry geometry)
 
static DataObject FromWkt (IRequest context, DataObject source)
 
static SqlGeometry FromWkt (SqlString source)
 
static SqlString ToWkt (SqlGeometry geometry)
 
static DataObject ToWkt (DataObject geometry)
 
static DataObject Envelope (DataObject geometry)
 
static SqlGeometry Envelope (SqlGeometry geometry)
 
static DataObject Distance (DataObject geometry, DataObject other)
 
static SqlNumber Distance (SqlGeometry geometry, SqlGeometry other)
 
static SqlBoolean Contains (SqlGeometry geometry, SqlGeometry other)
 
static DataObject Contains (DataObject geometry, DataObject other)
 
static DataObject Area (DataObject geometry)
 
static SqlNumber Area (SqlGeometry geometry)
 
static DataObject Boundary (DataObject geometry)
 

Properties

static IRoutineResolver Resolver [get]
 

Detailed Description

Definition at line 8 of file SpatialSystemFunctions.cs.

Member Function Documentation

static DataObject Deveel.Data.Spatial.SpatialSystemFunctions.Area ( DataObject  geometry)
inlinestatic

Definition at line 115 of file SpatialSystemFunctions.cs.

115  {
116  var input = (SqlGeometry) geometry.Value;
117  var result = Area(input);
118  return DataObject.Number(result);
119  }
static DataObject Number(SqlNumber value)
Definition: DataObject.cs:552
static DataObject Area(DataObject geometry)
static SqlNumber Deveel.Data.Spatial.SpatialSystemFunctions.Area ( SqlGeometry  geometry)
inlinestatic

Definition at line 121 of file SpatialSystemFunctions.cs.

121  {
122  if (geometry == null || geometry.IsNull)
123  return SqlNumber.Null;
124 
125  return geometry.Area;
126  }
static readonly SqlNumber Null
Definition: SqlNumber.cs:31
static DataObject Deveel.Data.Spatial.SpatialSystemFunctions.Boundary ( DataObject  geometry)
inlinestatic

Definition at line 128 of file SpatialSystemFunctions.cs.

128  {
129  var input = (SqlGeometry) geometry.Value;
130  var result = input.Boundary;
131  return new DataObject(SpatialType.Geometry(), result);
132  }
static SqlBoolean Deveel.Data.Spatial.SpatialSystemFunctions.Contains ( SqlGeometry  geometry,
SqlGeometry  other 
)
inlinestatic

Definition at line 101 of file SpatialSystemFunctions.cs.

101  {
102  if (geometry == null || geometry.IsNull)
103  return SqlBoolean.Null;
104 
105  return geometry.Contains(other);
106  }
static DataObject Deveel.Data.Spatial.SpatialSystemFunctions.Contains ( DataObject  geometry,
DataObject  other 
)
inlinestatic

Definition at line 108 of file SpatialSystemFunctions.cs.

108  {
109  var g1 = (SqlGeometry) geometry.Value;
110  var g2 = (SqlGeometry) other.Value;
111  var result = Contains(g1, g2);
112  return DataObject.Boolean(result);
113  }
static SqlBoolean Contains(SqlGeometry geometry, SqlGeometry other)
static DataObject Deveel.Data.Spatial.SpatialSystemFunctions.Distance ( DataObject  geometry,
DataObject  other 
)
inlinestatic

Definition at line 87 of file SpatialSystemFunctions.cs.

87  {
88  var input = (SqlGeometry)geometry.Value;
89  var otherGeometry = (SqlGeometry) other.Value;
90  var result = Distance(input, otherGeometry);
91  return DataObject.Number(result);
92  }
static DataObject Distance(DataObject geometry, DataObject other)
static SqlNumber Deveel.Data.Spatial.SpatialSystemFunctions.Distance ( SqlGeometry  geometry,
SqlGeometry  other 
)
inlinestatic

Definition at line 94 of file SpatialSystemFunctions.cs.

94  {
95  if (geometry == null || geometry.IsNull)
96  return SqlNumber.Null;
97 
98  return geometry.Distance(other);
99  }
static readonly SqlNumber Null
Definition: SqlNumber.cs:31
static DataObject Deveel.Data.Spatial.SpatialSystemFunctions.Envelope ( DataObject  geometry)
inlinestatic

Definition at line 74 of file SpatialSystemFunctions.cs.

74  {
75  var input = (SqlGeometry) geometry.Value;
76  var envelope = Envelope(input);
77  return new DataObject(SpatialType.Geometry(), envelope);
78  }
static DataObject Envelope(DataObject geometry)
static SqlGeometry Deveel.Data.Spatial.SpatialSystemFunctions.Envelope ( SqlGeometry  geometry)
inlinestatic

Definition at line 80 of file SpatialSystemFunctions.cs.

80  {
81  if (geometry.IsNull)
82  return SqlGeometry.Null;
83 
84  return geometry.Envelope;
85  }
static SqlGeometry Deveel.Data.Spatial.SpatialSystemFunctions.FromWkb ( SqlBinary  source)
inlinestatic

Definition at line 13 of file SpatialSystemFunctions.cs.

13  {
14  if (source.IsNull)
15  return SqlGeometry.Null;
16 
17  SqlGeometry geometry;
18  if (!SqlGeometry.TryParse(source.ToByteArray(), out geometry))
19  return SqlGeometry.Null;
20 
21  return geometry;
22  }
byte[] ToByteArray()
Returns an array of bytes representing the contents of the binary.
Definition: SqlBinary.cs:102
static DataObject Deveel.Data.Spatial.SpatialSystemFunctions.FromWkb ( DataObject  source)
inlinestatic

Definition at line 24 of file SpatialSystemFunctions.cs.

24  {
25  var input = (SqlBinary) source.Value;
26  var result = FromWkb(input);
27  return new DataObject(SpatialType.Geometry(), result);
28  }
static SqlGeometry FromWkb(SqlBinary source)
Implements a BINARY object that handles a limited number of bytes, not exceding MaxLength.
Definition: SqlBinary.cs:27
static DataObject Deveel.Data.Spatial.SpatialSystemFunctions.FromWkt ( IRequest  context,
DataObject  source 
)
inlinestatic

Definition at line 45 of file SpatialSystemFunctions.cs.

45  {
46  var input = (SqlString) source.Value;
47  var result = FromWkt(input);
48  return new DataObject(SpatialType.Geometry(), result);
49  }
static DataObject FromWkt(IRequest context, DataObject source)
Deveel.Data.Sql.Objects.SqlString SqlString
Definition: DataObject.cs:27
static SqlGeometry Deveel.Data.Spatial.SpatialSystemFunctions.FromWkt ( SqlString  source)
inlinestatic

Definition at line 51 of file SpatialSystemFunctions.cs.

51  {
52  SqlGeometry geometry;
53  if (!SqlGeometry.TryParse(source.ToString(), out geometry))
54  return SqlGeometry.Null;
55 
56  return geometry;
57  }
string ToString(Encoding encoding)
Definition: SqlString.cs:182
static DataObject Deveel.Data.Spatial.SpatialSystemFunctions.ToWkb ( DataObject  geometry)
inlinestatic

Definition at line 30 of file SpatialSystemFunctions.cs.

30  {
31  if (geometry.IsNull)
32  return DataObject.Null(PrimitiveTypes.String());
33 
34  var g = (SqlGeometry)geometry.Value;
35  return DataObject.Binary(ToWkb(g));
36  }
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
static DataObject ToWkb(DataObject geometry)
static SqlBinary Deveel.Data.Spatial.SpatialSystemFunctions.ToWkb ( SqlGeometry  geometry)
inlinestatic

Definition at line 38 of file SpatialSystemFunctions.cs.

38  {
39  if (geometry == null || geometry.IsNull)
40  return SqlBinary.Null;
41 
42  return geometry.ToWellKnownBytes();
43  }
Implements a BINARY object that handles a limited number of bytes, not exceding MaxLength.
Definition: SqlBinary.cs:27
static readonly SqlBinary Null
Definition: SqlBinary.cs:29
static SqlString Deveel.Data.Spatial.SpatialSystemFunctions.ToWkt ( SqlGeometry  geometry)
inlinestatic

Definition at line 59 of file SpatialSystemFunctions.cs.

59  {
60  if (geometry == null || geometry.IsNull)
61  return SqlString.Null;
62 
63  return geometry.ToWellKnownText();
64  }
static DataObject Deveel.Data.Spatial.SpatialSystemFunctions.ToWkt ( DataObject  geometry)
inlinestatic

Definition at line 66 of file SpatialSystemFunctions.cs.

66  {
67  if (geometry.IsNull)
68  return DataObject.Null(PrimitiveTypes.String());
69 
70  var g = (SqlGeometry) geometry.Value;
71  return DataObject.String(ToWkt(g));
72  }
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
static SqlString ToWkt(SqlGeometry geometry)

Property Documentation

IRoutineResolver Deveel.Data.Spatial.SpatialSystemFunctions.Resolver
staticget

Definition at line 9 of file SpatialSystemFunctions.cs.


The documentation for this class was generated from the following file: