@@ -301,6 +301,90 @@ public static NTSG STSetPoint(this NTSG geometry, int index, NTSG point)
301
301
throw new InvalidOperationException ( ) ;
302
302
}
303
303
304
+ /// <summary>
305
+ /// Snaps all points of input <paramref name="geometry"/> to the grid defined by its origin and cell size.
306
+ /// </summary>
307
+ /// <remarks>
308
+ /// See https://postgis.net/docs/manual-3.0/ST_SnapToGrid.html
309
+ /// </remarks>
310
+ /// <param name="geometry">Input geometry.</param>
311
+ /// <param name="originX">X coordinate of grid origin.</param>
312
+ /// <param name="originY">Y coordinate of grid origin.</param>
313
+ /// <param name="sizeX">Grid cell size by X axis.</param>
314
+ /// <param name="sizeY">Grid cell size by Y axis.</param>
315
+ /// <returns>Geometry with all points snapped to grid.</returns>
316
+ [ Sql . Function ( "ST_SnapToGrid" , ServerSideOnly = true ) ]
317
+ public static NTSG STSnapToGrid ( this NTSG geometry , double originX , double originY , double sizeX , double sizeY )
318
+ {
319
+ throw new InvalidOperationException ( ) ;
320
+ }
321
+
322
+ /// <summary>
323
+ /// Snaps all points of input <paramref name="geometry"/> to the grid defined by its cell size.
324
+ /// </summary>
325
+ /// <remarks>
326
+ /// See https://postgis.net/docs/manual-3.0/ST_SnapToGrid.html
327
+ /// </remarks>
328
+ /// <param name="geometry">Input geometry.</param>
329
+ /// <param name="sizeX">Grid cell size by X axis.</param>
330
+ /// <param name="sizeY">Grid cell size by Y axis.</param>
331
+ /// <returns>Geometry with all points snapped to grid.</returns>
332
+ [ Sql . Function ( "ST_SnapToGrid" , ServerSideOnly = true ) ]
333
+ public static NTSG STSnapToGrid ( this NTSG geometry , double sizeX , double sizeY )
334
+ {
335
+ throw new InvalidOperationException ( ) ;
336
+ }
337
+
338
+ /// <summary>
339
+ /// Snaps all points of input <paramref name="geometry"/> to the grid defined by its cell size.
340
+ /// </summary>
341
+ /// <remarks>
342
+ /// See https://postgis.net/docs/manual-3.0/ST_SnapToGrid.html
343
+ /// </remarks>
344
+ /// <param name="geometry">Input geometry.</param>
345
+ /// <param name="size">Grid cell size.</param>
346
+ /// <returns>Geometry with all points snapped to grid.</returns>
347
+ [ Sql . Function ( "ST_SnapToGrid" , ServerSideOnly = true ) ]
348
+ public static NTSG STSnapToGrid ( this NTSG geometry , double size )
349
+ {
350
+ throw new InvalidOperationException ( ) ;
351
+ }
352
+
353
+ /// <summary>
354
+ /// Snaps all points of input <paramref name="geometry"/> to the grid defined by its origin point and cell sizes.
355
+ /// </summary>
356
+ /// <remarks>
357
+ /// See https://postgis.net/docs/manual-3.0/ST_SnapToGrid.html
358
+ /// </remarks>
359
+ /// <param name="geometry">Input geometry.</param>
360
+ /// <param name="origin">Grid origin (Point).</param>
361
+ /// <param name="sizeX">Grid cell size by X axis.</param>
362
+ /// <param name="sizeY">Grid cell size by Y axis.</param>
363
+ /// <param name="sizeZ">Grid cell size by Z axis.</param>
364
+ /// <param name="sizeM">Grid cell size by M axis.</param>
365
+ /// <returns>Geometry with all points snapped to grid.</returns>
366
+ [ Sql . Function ( "ST_SnapToGrid" , ServerSideOnly = true ) ]
367
+ public static NTSG STSnapToGrid ( this NTSG geometry , NTSG origin , double sizeX , double sizeY , double sizeZ , double sizeM )
368
+ {
369
+ throw new InvalidOperationException ( ) ;
370
+ }
371
+
372
+ /// <summary>
373
+ /// Snaps the vertices and segments of input <paramref name="geometry"/> to <paramref name="reference"/> geometry vertices.
374
+ /// </summary>
375
+ /// <remarks>
376
+ /// See https://postgis.net/docs/manual-3.0/ST_Snap.html
377
+ /// </remarks>
378
+ /// <param name="geometry">Input geometry.</param>
379
+ /// <param name="reference">Reference geometry.</param>
380
+ /// <param name="tolerance">Snap distance tolerance.</param>
381
+ /// <returns>Geometry with the vertices snapped.</returns>
382
+ [ Sql . Function ( "ST_Snap" , ServerSideOnly = true ) ]
383
+ public static NTSG STSnap ( this NTSG geometry , NTSG reference , double tolerance )
384
+ {
385
+ throw new InvalidOperationException ( ) ;
386
+ }
387
+
304
388
/// <summary>
305
389
/// Returns a version of input <paramref name="geometry"/> with given ordinates swapped.
306
390
/// </summary>
@@ -309,7 +393,7 @@ public static NTSG STSetPoint(this NTSG geometry, int index, NTSG point)
309
393
/// </remarks>
310
394
/// <param name="geometry">Input geometry.</param>
311
395
/// <param name="ordinates">Two-characters string naming the ordinates to swap. Valid names are: x,y,z and m.</param>
312
- /// <returns>Geometry with point removed </returns>
396
+ /// <returns>Geometry with given ordinates swapped. </returns>
313
397
[ Sql . Function ( "ST_SwapOrdinates" , ServerSideOnly = true ) ]
314
398
public static NTSG STSwapOrdinates ( this NTSG geometry , string ordinates )
315
399
{
@@ -324,7 +408,7 @@ public static NTSG STSwapOrdinates(this NTSG geometry, string ordinates)
324
408
/// </remarks>
325
409
/// <param name="geometry">Input geometry.</param>
326
410
/// <param name="ordinates">Two-characters string naming the ordinates to swap. Valid names are: x,y,z and m.</param>
327
- /// <returns>Geometry with point removed </returns>
411
+ /// <returns>Geometry with given ordinates swapped. </returns>
328
412
[ Sql . Function ( "ST_SwapOrdinates" , ServerSideOnly = true ) ]
329
413
public static NTSG STSwapOrdinates ( string geometry , string ordinates )
330
414
{
0 commit comments