@@ -85,35 +85,6 @@ public void TestSTConvexHull()
85
85
}
86
86
}
87
87
88
- [ Test ]
89
- public void TestSTCurveToLine ( )
90
- {
91
- using ( var db = new PostGisTestDataConnection ( TestDatabaseConnectionString ) )
92
- {
93
- const string wkt1 = "CIRCULARSTRING(0 0,100 -100,200 0)" ;
94
- db . TestGeometries
95
- . Value ( g => g . Id , 1 )
96
- . Value ( p => p . Geometry , ( ) => GeometryInput . STGeomFromText ( wkt1 ) )
97
- . Insert ( ) ;
98
-
99
- var result1 = db . TestGeometries
100
- . Where ( g => g . Id == 1 )
101
- . Select ( g => g . Geometry . STCurveToLine ( 20 , 1 , 1 ) )
102
- . Single ( ) as NTSGS . LineString ;
103
-
104
- Assert . AreEqual ( 0 , result1 . Coordinates [ 0 ] . X ) ;
105
- Assert . AreEqual ( 0 , result1 . Coordinates [ 0 ] . Y ) ;
106
- Assert . AreEqual ( 50 , result1 . Coordinates [ 1 ] . X , 1.0E-9 ) ;
107
- Assert . AreEqual ( - 86.6025403784438 , result1 . Coordinates [ 1 ] . Y , 1.0E-9 ) ;
108
- Assert . AreEqual ( 150 , result1 . Coordinates [ 2 ] . X , 1.0E-9 ) ;
109
- Assert . AreEqual ( - 86.6025403784439 , result1 . Coordinates [ 2 ] . Y , 1.0E-9 ) ;
110
- Assert . AreEqual ( 200 , result1 . Coordinates [ 3 ] . X , 1.0E-9 ) ;
111
- Assert . AreEqual ( 0 , result1 . Coordinates [ 3 ] . Y , 1.0E-9 ) ;
112
-
113
- Assert . IsNull ( db . Select ( ( ) => GeometryProcessing . STCurveToLine ( null , 20 , 1 , 1 ) ) ) ;
114
- }
115
- }
116
-
117
88
[ Test ]
118
89
public void TestSTDelaunayTriangles ( )
119
90
{
@@ -146,20 +117,6 @@ public void TestSTDifference()
146
117
}
147
118
}
148
119
149
- [ Test ]
150
- public void TestSTFlipCoordinates ( )
151
- {
152
- using ( var db = new PostGisTestDataConnection ( TestDatabaseConnectionString ) )
153
- {
154
- var geom1 = db . Select ( ( ) => GeometryInput . STGeomFromText ( "POINT(1 2)" ) ) ;
155
-
156
- var result1 = db . Select ( ( ) => GeometryProcessing . STFlipCoordinates ( geom1 ) . STAsText ( ) ) ;
157
- Assert . AreEqual ( "POINT(2 1)" , result1 ) ;
158
-
159
- Assert . IsNull ( db . Select ( ( ) => GeometryProcessing . STFlipCoordinates ( null ) ) ) ;
160
- }
161
- }
162
-
163
120
[ Test ]
164
121
public void TestSTGeneratePoints ( )
165
122
{
@@ -206,28 +163,6 @@ public void TestSTGeometricMedian()
206
163
}
207
164
}
208
165
209
- [ Test ]
210
- public void TestSTLineToCurve ( )
211
- {
212
- using ( var db = new PostGisTestDataConnection ( TestDatabaseConnectionString ) )
213
- {
214
- const string wkt = "POINT(1 3)" ;
215
- db . TestGeometries
216
- . Value ( g => g . Id , 1 )
217
- . Value ( p => p . Geometry , ( ) =>
218
- GeometryInput . STGeomFromText ( wkt ) . STBuffer ( 3.0 ) )
219
- . Insert ( ) ;
220
-
221
- // NTS error: 'Geometry type not recognized. GeometryCode: 10'
222
- var curvePolygon = db . TestGeometries
223
- . Where ( g => g . Id == 1 )
224
- . Select ( g => g . Geometry . STLineToCurve ( ) . STAsText ( ) )
225
- . Single ( ) ;
226
-
227
- Assert . AreEqual ( "CURVEPOLYGON(CIRCULARSTRING(4 3,-2 2.99999999999999,4 3))" , curvePolygon ) ;
228
- }
229
- }
230
-
231
166
[ Test ]
232
167
public void TestSTMakeValid ( )
233
168
{
@@ -358,8 +293,8 @@ public void TestSTOffsetCurve()
358
293
{
359
294
const string wkt = @"LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16,
360
295
44 16,24 16,20 16,18 16,17 17,
361
- 16 18,16 20,16 40,16 60,16 80,16 100,
362
- 16 120,16 140,16 160,16 180,16 195)";
296
+ 16 18,16 20,16 40,16 60,16 80,16 100,
297
+ 16 120,16 140,16 160,16 180,16 195)";
363
298
db . TestGeometries
364
299
. Value ( g => g . Id , 1 )
365
300
. Value ( p => p . Geometry , ( ) => GeometryInput . STGeomFromText ( wkt ) )
@@ -411,26 +346,6 @@ public void TestSTPointOnSurface()
411
346
}
412
347
}
413
348
414
- [ Test ]
415
- public void TestSTRemoveRepeatedPoints ( )
416
- {
417
- using ( var db = new PostGisTestDataConnection ( TestDatabaseConnectionString ) )
418
- {
419
- const string wkt = "LINESTRING(0 5, 0 0, 0 0, 0 10)" ;
420
- db . TestGeometries
421
- . Value ( g => g . Id , 1 )
422
- . Value ( p => p . Geometry , ( ) => GeometryInput . STGeomFromText ( wkt ) )
423
- . Insert ( ) ;
424
-
425
- var result = db . TestGeometries
426
- . Where ( g => g . Id == 1 )
427
- . Select ( g => g . Geometry . STRemoveRepeatedPoints ( 1 ) . AsText ( ) )
428
- . Single ( ) ;
429
-
430
- Assert . AreEqual ( "LINESTRING (0 5, 0 0, 0 10)" , result ) ;
431
- }
432
- }
433
-
434
349
[ Test ]
435
350
public void TestSTSharedPaths ( )
436
351
{
@@ -456,40 +371,6 @@ public void TestSTSharedPaths()
456
371
}
457
372
}
458
373
459
- [ Test ]
460
- public void TestSTShiftLongitude ( )
461
- {
462
- using ( var db = new PostGisTestDataConnection ( TestDatabaseConnectionString ) )
463
- {
464
- const string Ewkt1 = "SRID=4326;POINT(-118.58 38.38 10)" ;
465
- const string Ewkt2 = "SRID=4326;POINT(241.42 38.38 10)" ;
466
- db . TestGeometries
467
- . Value ( g => g . Id , 1 )
468
- . Value ( p => p . Geometry , ( ) => GeometryInput . STGeomFromEWKT ( Ewkt1 ) )
469
- . Insert ( ) ;
470
- db . TestGeometries
471
- . Value ( g => g . Id , 2 )
472
- . Value ( p => p . Geometry , ( ) => GeometryInput . STGeomFromEWKT ( Ewkt2 ) )
473
- . Insert ( ) ;
474
-
475
- var result1 = db . TestGeometries
476
- . Where ( g => g . Id == 1 )
477
- . Select ( g => g . Geometry . STShiftLongitude ( ) )
478
- . Single ( ) as NTSGS . Point ;
479
-
480
- var result2 = db . TestGeometries
481
- . Where ( g => g . Id == 2 )
482
- . Select ( g => g . Geometry . STShiftLongitude ( ) )
483
- . Single ( ) as NTSGS . Point ;
484
-
485
- Assert . AreEqual ( 241.42 , result1 . X , 1.0E-2 ) ;
486
- Assert . AreEqual ( 38.38 , result1 . Y , 1.0E-2 ) ;
487
-
488
- Assert . AreEqual ( - 118.58 , result2 . X , 1.0E-2 ) ;
489
- Assert . AreEqual ( 38.38 , result2 . Y , 1.0E-2 ) ;
490
- }
491
- }
492
-
493
374
[ Test ]
494
375
public void TestSTSimplify ( )
495
376
{
0 commit comments