Skip to content

Commit fe63376

Browse files
authored
Merge pull request MicrosoftDocs#8621 from pmasl/patch-427
Update multilinestring.md
2 parents 4473a37 + 010bcbd commit fe63376

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

‎docs/relational-databases/spatial/multilinestring.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,49 +41,49 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversio
4141
### Accepted instances
4242
For a **MultiLineString** instance to be accepted it must either be empty or comprised of only **LineString** intances that are accepted. For more information on accepted **LineString** instances, see [LineString](../../relational-databases/spatial/linestring.md). The following are examples of accepted **MultiLineString** instances.
4343

44-
```
44+
```sql
4545
DECLARE @g1 geometry = 'MULTILINESTRING EMPTY';
4646
DECLARE @g2 geometry = 'MULTILINESTRING((1 1, 3 5), (-5 3, -8 -2))';
4747
DECLARE @g3 geometry = 'MULTILINESTRING((1 1, 5 5), (1 3, 3 1))';
4848
DECLARE @g4 geometry = 'MULTILINESTRING((1 1, 3 3, 5 5),(3 3, 5 5, 7 7))';
4949
```
5050

51-
The following example throws a `System.FormatException` because the second **LineString** instance is not valid.
51+
The following example throws a `System.FormatException` because the second **LineString** instance is not valid.
5252

53-
```
53+
```sql
5454
DECLARE @g geometry = 'MULTILINESTRING((1 1, 3 5),(-5 3))';
5555
```
5656

5757
### Valid instances
58-
For a **MultiLineString** instance to be valid it must meet the following criteria:
58+
For a **MultiLineString** instance to be valid it must meet the following criteria:
5959

6060
1. All instances comprising the **MultiLineString** instance must be valid **LineString** instances.
6161

6262
2. No two **LineString** instances comprising the **MultiLineString** instance may overlap over an interval. The **LineString** instances can only intersect or touch themselves or other **LineString** instances at a finite number of points.
6363

64-
The following example shows three valid **MultiLineString** instances and one **MultiLineString** instance that is not valid.
64+
The following example shows three valid **MultiLineString** instances and one **MultiLineString** instance that is not valid.
6565

66-
```
66+
```sql
6767
DECLARE @g1 geometry = 'MULTILINESTRING EMPTY';
6868
DECLARE @g2 geometry = 'MULTILINESTRING((1 1, 3 5), (-5 3, -8 -2))';
6969
DECLARE @g3 geometry = 'MULTILINESTRING((1 1, 5 5), (1 3, 3 1))';
7070
DECLARE @g4 geometry = 'MULTILINESTRING((1 1, 3 3, 5 5),(3 3, 5 5, 7 7))';
7171
SELECT @g1.STIsValid(), @g2.STIsValid(), @g3.STIsValid(), @g4.STIsValid();
7272
```
7373

74-
`@g4` is not valid because the second **LineString** instance overlaps the first **LineString** instance at an interval. They touch at an infinite number of points.
74+
`@g4` is not valid because the second **LineString** instance overlaps the first **LineString** instance at an interval. They touch at an infinite number of points.
7575

7676
## Examples
77-
The following example creates a simple `geometry``MultiLineString` instance containing two `LineString` elements with the SRID 0.
77+
The following example creates a simple `geometry``MultiLineString` instance containing two `LineString` elements with the SRID 0.
7878

79-
```
79+
```sql
8080
DECLARE @g geometry;
8181
SET @g = geometry::Parse('MULTILINESTRING((0 2, 1 1), (1 0, 1 1))');
8282
```
8383

84-
To instantiate this instance with a different SRID, use `STGeomFromText()` or `STMLineStringFromText()`. You can also use `Parse()` and then modify the SRID, as shown in the following example.
84+
To instantiate this instance with a different SRID, use `STGeomFromText()` or `STMLineStringFromText()`. You can also use `Parse()` and then modify the SRID, as shown in the following example.
8585

86-
```
86+
```sql
8787
DECLARE @g geometry;
8888
SET @g = geometry::Parse('MULTILINESTRING((0 2, 1 1), (1 0, 1 1))');
8989
SET @g.STSrid = 13;

0 commit comments

Comments
 (0)