You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 35aa523
Browse filesBrowse the repository at this point in the historyBrowse files
### F. Calling BufferWithCurves() with a parameter value > 0
115
119
The following example returns a `CurvePolygon` instance:
116
120
117
-
`DECLARE @g geometry= 'LINESTRING(3 4, 8 11)';`
118
-
119
-
`SELECT @g.BufferWithCurves(2).ToString();`
121
+
```
122
+
DECLARE @g geometry= 'LINESTRING(3 4, 8 11)';
123
+
SELECT @g.BufferWithCurves(2).ToString();
124
+
```
120
125
121
126
### G. Passing a valid string parameter
122
127
The following example returns the same `CurvePolygon` instance as mentioned earlier, but a string parameter is passed to the method:
123
128
124
-
`DECLARE @g geometry= 'LINESTRING(3 4, 8 11)';`
125
-
126
-
`SELECT @g.BufferWithCurves('2').ToString();`
129
+
```
130
+
DECLARE @g geometry= 'LINESTRING(3 4, 8 11)';
131
+
SELECT @g.BufferWithCurves('2').ToString();
132
+
```
127
133
128
134
### H. Passing an invalid string parameter
129
135
The following example will throw an error:
130
136
131
-
`DECLARE @g geometry = 'LINESTRING(3 4, 8 11)'`
132
-
133
-
`SELECT @g.BufferWithCurves('a').ToString();`
137
+
```
138
+
DECLARE @g geometry = 'LINESTRING(3 4, 8 11)'
139
+
SELECT @g.BufferWithCurves('a').ToString();
140
+
```
134
141
135
142
Note that the previous two examples passed a string literal to the `BufferWithCurves()` method. The first example works because the string literal can be converted to a numeric value. However, the second example throws an `ArgumentException`.
136
143
137
144
### I. Calling BufferWithCurves() on MultiPoint instance
138
145
The following example returns two `GeometryCollection` instances and one `CurvePolygon` instance:
The first two **SELECT** statements return a `GeometryCollection` instance because the parameter *distance* is less than or equal to 1/2 the distance between the two points (1 1) and (1 4). The third **SELECT** statement returns a `CurvePolygon` instance because the buffered instances of the two points (1 1) and (1 4) overlap.
### E. Using the method on a GeometryCollection instance
107
108
The following example calls `CurveToLineWithTolerance()` on a `GeometryCollection` that contains a two-dimensional `CurvePolygon` instance and a one-dimensional `CircularString` instance. `CurveToLineWithTolerance()` converts both circular arc segment types to line segment types and returns them in a `GeometryCollection` type.
Copy file name to clipboardExpand all lines: docs/t-sql/spatial-geometry/mindbcompatibilitylevel-geometry-data-type.md
+14-18Lines changed: 14 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,28 +44,24 @@ Returns the minimum database compatibility level that recognizes the **geometry*
44
44
### A. Testing CircularString type for compatibility with compatibility level 110
45
45
The following example tests a `CircularString` instance for compatibility with an earlier version of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]:
0 commit comments