29 Register(config => config.Named(
"from_wkb")
31 .WhenExecute(context =>
Simple(context, args => SpatialSystemFunctions.FromWkb(args[0])))
32 .ReturnsType(SpatialType.Geometry()));
34 Register(config => config.Named(
"from_wkt")
36 .WhenExecute(context =>
Simple(context, args => SpatialSystemFunctions.FromWkt(context.Request, args[0])))
37 .ReturnsType(SpatialType.Geometry()));
39 Register(config => config.Named(
"to_wkt")
40 .WithParameter(p => p.Named(
"g").OfType(SpatialType.Geometry()))
41 .WhenExecute(context =>
Simple(context, args => SpatialSystemFunctions.ToWkt(args[0])))
44 Register(config => config.Named(
"to_wkb")
45 .WithParameter(p => p.Named(
"g").OfType(SpatialType.Geometry()))
46 .WhenExecute(context =>
Simple(context, args => SpatialSystemFunctions.ToWkb(args[0])))
49 Register(config => config.Named(
"envelope")
50 .WithParameter(p => p.Named(
"g").OfType(SpatialType.Geometry()))
51 .WhenExecute(context =>
Simple(context, args => SpatialSystemFunctions.Envelope(args[0])))
52 .ReturnsType(SpatialType.Geometry()));
54 Register(config => config.Named(
"distance")
55 .WithParameter(p => p.Named(
"g1").OfType(SpatialType.Geometry()))
56 .WithParameter(p => p.Named(
"g2").OfType(SpatialType.Geometry()))
57 .WhenExecute(context =>
Simple(context, args => SpatialSystemFunctions.Distance(args[0], args[1])))
60 Register(config => config.Named(
"contains")
61 .WithSpatialParameter(
"g1")
62 .WithSpatialParameter(
"g2")
63 .WhenExecute(context =>
Simple(context, args => SpatialSystemFunctions.Contains(args[0], args[1])))
66 Register(config => config.Named(
"area")
67 .WithSpatialParameter(
"g")
68 .WhenExecute(context =>
Simple(context, args => SpatialSystemFunctions.Area(args[0])))
69 .ReturnsSpatialType());
71 Register(config => config.Named(
"boundary")
72 .WithSpatialParameter(
"g")
73 .WhenExecute(context =>
Simple(context, args => SpatialSystemFunctions.Boundary(args[0])))
74 .ReturnsSpatialType());
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
static InvokeResult Simple(InvokeContext context, Func< DataObject[], DataObject > func)
static BinaryType Binary(int maxSize)
void Register(FunctionInfo functionInfo, Func< InvokeContext, InvokeResult > body, Func< InvokeContext, SqlType > returnType)
static StringType String()