@@ -14,6 +14,8 @@ namespace LinqToDBPostGisNetTopologySuite
14
14
/// </remarks>
15
15
public static class GeometryInput
16
16
{
17
+ // TODO: Complete 8.8.1. Well-Known Text (WKT)
18
+
17
19
/// <summary>
18
20
/// Constructs geometry from the Extended Well-Known Text (EWKT) representation.
19
21
/// </summary>
@@ -56,5 +58,202 @@ public static NTSG STGeomFromText(string wkt, int srid)
56
58
{
57
59
throw new InvalidOperationException ( ) ;
58
60
}
61
+
62
+ // TODO: Implement 8.8.2. Well-Known Binary (WKB)
63
+
64
+ #region 8.8.3. Other Formats
65
+
66
+ // TODO: ST_Box2dFromGeoHash return type NTS mapping?
67
+
68
+ /// <summary>
69
+ /// Constructs Polygon geometry from given GeoHash string.
70
+ /// </summary>
71
+ /// <remarks>
72
+ /// See https://postgis.net/docs/manual-3.0/ST_GeomFromGeoHash.html
73
+ /// </remarks>
74
+ /// <param name="geoHash">GeoHash string</param>
75
+ /// <returns>Polygon representing the GeoHash bounds</returns>
76
+ [ Sql . Function ( "ST_GeomFromGeoHash" , ServerSideOnly = true ) ]
77
+ public static NTSG STGeomFromGeoHash ( string geoHash )
78
+ {
79
+ throw new InvalidOperationException ( ) ;
80
+ }
81
+
82
+ /// <summary>
83
+ /// Constructs Polygon geometry from given GeoHash string.
84
+ /// </summary>
85
+ /// <remarks>
86
+ /// See https://postgis.net/docs/manual-3.0/ST_GeomFromGeoHash.html
87
+ /// </remarks>
88
+ /// <param name="geoHash">GeoHash string</param>
89
+ /// <param name="precision">Number of characters to use from GeoHash</param>
90
+ /// <returns>Polygon representing the GeoHash bounds</returns>
91
+ [ Sql . Function ( "ST_GeomFromGeoHash" , ServerSideOnly = true ) ]
92
+ public static NTSG STGeomFromGeoHash ( string geoHash , int precision )
93
+ {
94
+ throw new InvalidOperationException ( ) ;
95
+ }
96
+
97
+ /// <summary>
98
+ /// Constructs geometry from OGC GML representation.
99
+ /// </summary>
100
+ /// <remarks>
101
+ /// See https://postgis.net/docs/manual-3.0/ST_GeomFromGML.html
102
+ /// </remarks>
103
+ /// <param name="gml">GML string</param>
104
+ /// <returns>Geometry</returns>
105
+ [ Sql . Function ( "ST_GeomFromGML" , ServerSideOnly = true ) ]
106
+ public static NTSG STGeomFromGML ( string gml )
107
+ {
108
+ throw new InvalidOperationException ( ) ;
109
+ }
110
+
111
+ /// <summary>
112
+ /// Constructs geometry from OGC GML representation with given SRID.
113
+ /// </summary>
114
+ /// <remarks>
115
+ /// See https://postgis.net/docs/manual-3.0/ST_GeomFromGML.html
116
+ /// </remarks>
117
+ /// <param name="gml">GML string</param>
118
+ /// <param name="srid">Spatial Reference System Identifier for geometry</param>
119
+ /// <returns>Geometry</returns>
120
+ [ Sql . Function ( "ST_GeomFromGML" , ServerSideOnly = true ) ]
121
+ public static NTSG STGeomFromGML ( string gml , int srid )
122
+ {
123
+ throw new InvalidOperationException ( ) ;
124
+ }
125
+
126
+ /// <summary>
127
+ /// Constructs geometry from GeoJSON representation.
128
+ /// </summary>
129
+ /// <remarks>
130
+ /// See https://postgis.net/docs/manual-3.0/ST_GeomFromGeoJSON.html
131
+ /// </remarks>
132
+ /// <param name="geoJson">GeoJSON string</param>
133
+ /// <returns>Geometry</returns>
134
+ [ Sql . Function ( "ST_GeomFromGeoJSON" , ServerSideOnly = true ) ]
135
+ public static NTSG STGeomFromGeoJSON ( string geoJson )
136
+ {
137
+ throw new InvalidOperationException ( ) ;
138
+ }
139
+
140
+ // TODO: ? json / jsonb ?
141
+
142
+ /// <summary>
143
+ /// Constructs geometry from OGC KML representation.
144
+ /// </summary>
145
+ /// <remarks>
146
+ /// See https://postgis.net/docs/manual-3.0/ST_GeomFromKML.html
147
+ /// </remarks>
148
+ /// <param name="kml">KML string</param>
149
+ /// <returns>Geometry</returns>
150
+ [ Sql . Function ( "ST_GeomFromKML" , ServerSideOnly = true ) ]
151
+ public static NTSG STGeomFromKML ( string kml )
152
+ {
153
+ throw new InvalidOperationException ( ) ;
154
+ }
155
+
156
+ /// <summary>
157
+ /// Constructs geometry from Tiny Well-Known Binary (TWKB) representation.
158
+ /// </summary>
159
+ /// <remarks>
160
+ /// See https://postgis.net/docs/manual-3.0/ST_GeomFromTWKB.html
161
+ /// </remarks>
162
+ /// <param name="twkb">Tiny Well-Known Binary (TWKB)</param>
163
+ /// <returns>Geometry</returns>
164
+ [ Sql . Function ( "ST_GeomFromTWKB" , ServerSideOnly = true ) ]
165
+ public static NTSG STGeomFromTWKB ( byte [ ] twkb )
166
+ {
167
+ throw new InvalidOperationException ( ) ;
168
+ }
169
+
170
+ /// <summary>
171
+ /// Constructs geometry from OGC GML representation (Alias for STGeomFromGML).
172
+ /// </summary>
173
+ /// <remarks>
174
+ /// See https://postgis.net/docs/manual-3.0/ST_GMLToSQL.html
175
+ /// </remarks>
176
+ /// <param name="gml">GML string</param>
177
+ /// <returns>Geometry</returns>
178
+ [ Sql . Function ( "ST_GMLToSQL" , ServerSideOnly = true ) ]
179
+ public static NTSG STGMLToSQL ( string gml )
180
+ {
181
+ throw new InvalidOperationException ( ) ;
182
+ }
183
+
184
+ /// <summary>
185
+ /// Constructs geometry from OGC GML representation with given SRID (Alias for STGeomFromGML).
186
+ /// </summary>
187
+ /// <remarks>
188
+ /// See https://postgis.net/docs/manual-3.0/ST_GMLToSQL.html
189
+ /// </remarks>
190
+ /// <param name="gml">GML string</param>
191
+ /// <param name="srid">Spatial Reference System Identifier for geometry</param>
192
+ /// <returns>Geometry</returns>
193
+ [ Sql . Function ( "ST_GMLToSQL" , ServerSideOnly = true ) ]
194
+ public static NTSG STGMLToSQL ( string gml , int srid )
195
+ {
196
+ throw new InvalidOperationException ( ) ;
197
+ }
198
+
199
+ /// <summary>
200
+ /// Constructs LineString geometry from given Encoded Polyline string.
201
+ /// </summary>
202
+ /// <remarks>
203
+ /// See https://postgis.net/docs/manual-3.0/ST_LineFromEncodedPolyline.html
204
+ /// </remarks>
205
+ /// <param name=" polyline">Encoded Polyline string</param>
206
+ /// <returns>LineString geometry</returns>
207
+ [ Sql . Function ( "ST_LineFromEncodedPolyline" , ServerSideOnly = true ) ]
208
+ public static NTSG STLineFromEncodedPolyline ( string polyline )
209
+ {
210
+ throw new InvalidOperationException ( ) ;
211
+ }
212
+
213
+ /// <summary>
214
+ /// Constructs LineString geometry from given Encoded Polyline string.
215
+ /// </summary>
216
+ /// <remarks>
217
+ /// See https://postgis.net/docs/manual-3.0/ST_LineFromEncodedPolyline.html
218
+ /// </remarks>
219
+ /// <param name=" polyline">Encoded Polyline string</param>
220
+ /// <param name="precision">Number of characters to use from Encoded Polyline string</param>
221
+ /// <returns>LineString geometry</returns>
222
+ [ Sql . Function ( "ST_LineFromEncodedPolyline" , ServerSideOnly = true ) ]
223
+ public static NTSG STLineFromEncodedPolyline ( string polyline , int precision )
224
+ {
225
+ throw new InvalidOperationException ( ) ;
226
+ }
227
+
228
+ /// <summary>
229
+ /// Constructs Point geometry from given GeoHash string.
230
+ /// </summary>
231
+ /// <remarks>
232
+ /// See https://postgis.net/docs/manual-3.0/ST_PointFromGeoHash.html
233
+ /// </remarks>
234
+ /// <param name="geoHash">GeoHash string</param>
235
+ /// <returns>Geometry (center point of GeoHash)</returns>
236
+ [ Sql . Function ( "ST_PointFromGeoHash" , ServerSideOnly = true ) ]
237
+ public static NTSG STPointFromGeoHash ( string geoHash )
238
+ {
239
+ throw new InvalidOperationException ( ) ;
240
+ }
241
+
242
+ /// <summary>
243
+ /// Constructs Point geometry from given GeoHash string.
244
+ /// </summary>
245
+ /// <remarks>
246
+ /// See https://postgis.net/docs/manual-3.0/ST_PointFromGeoHash.html
247
+ /// </remarks>
248
+ /// <param name="geoHash">GeoHash string</param>
249
+ /// <param name="precision">Number of characters to use from GeoHash</param>
250
+ /// <returns>Geometry (center point of GeoHash)</returns>
251
+ [ Sql . Function ( "ST_PointFromGeoHash" , ServerSideOnly = true ) ]
252
+ public static NTSG STPointFromGeoHash ( string geoHash , int precision )
253
+ {
254
+ throw new InvalidOperationException ( ) ;
255
+ }
256
+
257
+ #endregion
59
258
}
60
259
}
0 commit comments