Skip to content

Commit 395605f

Browse files
committed
fix acrolinx
1 parent ce2e089 commit 395605f

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

articles/stream-analytics/stream-analytics-geospatial-functions.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,23 @@ ms.date: 09/04/2018
1313

1414
# Introduction to Stream Analytics geospatial functions
1515

16-
Geospatial functions in Azure Stream Analytics enable real-time analytics on streaming geospatial data. With just a few lines of code, you can develop a production grade solution for scenarios such as ride-sharing, fleet management, asset tracking, geo-fencing, and phone tracking across cell sites. The ability to join multiple streams of data with geospatial data can be used to answer complex questions on streaming data. Stream Analytics has adopted the GeoJSON standard for geospatial data.
16+
Geospatial functions in Azure Stream Analytics enable real-time analytics on streaming geospatial data. With just a few lines of code, you can develop a production grade solution for complex scenarios.
1717

18-
Stream Analytics Query Language has seven built-in geospatial functions: `CreateLineString`, `CreatePoint`, `CreatePolygon`, `ST_DISTANCE`, `ST_OVERLAPS`, `ST_INTERSECTS`, and `ST_WITHIN`.
18+
Examples of scenarios that can benefit from geospatial functions include:
19+
20+
* Ride-sharing
21+
* Fleet management
22+
* Asset tracking
23+
* Geo-fencing
24+
* Phone tracking across cell sites
25+
26+
Stream Analytics Query Language has seven built-in geospatial functions: **CreateLineString**, **CreatePoint**, **CreatePolygon**, **ST_DISTANCE**, **ST_OVERLAPS**, **ST_INTERSECTS**, and **ST_WITHIN**.
1927

2028
## CreateLineString
2129

2230
The `CreateLineString` function accepts points and returns a GeoJSON LineString, which can be plotted as a line on a map. You must have at least two points to create a LineString. The LineString points will be connected in order.
2331

24-
The following query uses `CreateLineString` to create a LinString using three points, one of which is created from streaming input data, while the other two are created manually.
32+
The following query uses `CreateLineString` to create a LineString using three points. The first point is created from streaming input data, while the other two are created manually.
2533

2634
```SQL
2735
SELECT
@@ -48,7 +56,7 @@ To learn more, visit the [CreateLineString](https://msdn.microsoft.com/en-us/azu
4856

4957
The `CreatePoint` function accepts a latitude and longitude and returns a GeoJSON point, which can be plotted on a map. Your latitudes and longitudes must be a **float** datatype.
5058

51-
The following example query uses `CreatePoint` to create a point using latitudes and longitudes from streaming input data:
59+
The following example query uses `CreatePoint` to create a point using latitudes and longitudes from streaming input data.
5260

5361
```SQL
5462
SELECT
@@ -73,9 +81,9 @@ To learn more, visit the [CreatePoint](https://msdn.microsoft.com/en-us/azure/st
7381

7482
## CreatePolygon
7583

76-
The `CreatePolygon` function accepts points and returns a GeoJSON polygon record. The order of points must follow right-hand ring orientation. If you imagine yourself walking from one point to another in the order they were declared, the inside of the polygon would be to your left the entire time.
84+
The `CreatePolygon` function accepts points and returns a GeoJSON polygon record. The order of points must follow right-hand ring orientation, or counter-clockwise. Imagine walking from one point to another in the order they were declared. The center of the polygon would be to your left the entire time.
7785

78-
The following example query uses `CreatePolygon` to create a polygon from three points, two of which are created manually, while the final point is created from input data:
86+
The following example query uses `CreatePolygon` to create a polygon from three points. The first two points are created manually, and the last point is created from input data.
7987

8088
```SQL
8189
SELECT
@@ -102,7 +110,7 @@ To learn more, visit the [CreatePolygon](https://msdn.microsoft.com/en-us/azure/
102110
## ST_DISTANCE
103111
The `ST_DISTANCE` function returns the distance between two points in meters.
104112

105-
The following query uses `ST_DISTANCE` to generate an event when a gas station is less than 10 km from the car:
113+
The following query uses `ST_DISTANCE` to generate an event when a gas station is less than 10 km from the car.
106114

107115
```SQL
108116
SELECT Cars.Location, Station.Location
@@ -113,17 +121,17 @@ JOIN Station s ON ST_DISTANCE(c.Location, s.Location) < 10 * 1000
113121
To learn more, visit the [ST_DISTANCE](https://msdn.microsoft.com/en-us/azure/stream-analytics/reference/st-distance) reference.
114122

115123
## ST_OVERLAPS
116-
The `ST_OVERLAPS` function compares two polygons. If the polygons overlap, the function returns a 1. If the polygons do not overlap, the function returns a 0.
124+
The `ST_OVERLAPS` function compares two polygons. If the polygons overlap, the function returns a 1. The function returns 0 if the polygons don't overlap.
117125

118-
The following query uses `ST_OVERLAPS` to generate an event when a building is within a possible flooding zone:
126+
The following query uses `ST_OVERLAPS` to generate an event when a building is within a possible flooding zone.
119127

120128
```SQL
121129
SELECT Building.Polygon, Building.Polygon
122130
FROM Building b
123131
JOIN Flooding f ON ST_OVERLAPS(b.Polygon, b.Polygon)
124132
```
125133

126-
The following example query generates an event when a storm is heading towards a car:
134+
The following example query generates an event when a storm is heading towards a car.
127135

128136
```SQL
129137
SELECT Cars.Location, Storm.Course
@@ -134,9 +142,9 @@ JOIN Storm s ON ST_OVERLAPS(c.Location, s.Course)
134142
To learn more, visit the [ST_OVERLAPS](https://msdn.microsoft.com/en-us/azure/stream-analytics/reference/st-overlaps) reference.
135143

136144
## ST_INTERSECTS
137-
The `ST_INTERSECTS` function compares two LineString. If the LineString intersect, then the function returns 1. If the LineString do not intersect, the function returns 0.
145+
The `ST_INTERSECTS` function compares two LineString. If the LineString intersect, then the function returns 1. The function returns 0 if the LineString don't intersect.
138146

139-
The following example query uses `ST_INTERSECTS` to determine whether or not a paved road intersects a dirt road:
147+
The following example query uses `ST_INTERSECTS` to determine if a paved road intersects a dirt road.
140148

141149
```SQL
142150
SELECT
@@ -160,9 +168,9 @@ FROM input
160168
To learn more, visit the [ST_INTERSECTS](https://msdn.microsoft.com/en-us/azure/stream-analytics/reference/st-intersects) reference.
161169

162170
## ST_WITHIN
163-
The `ST_WITHIN` function determines whether a point or polygon is contained within a polygon. If the polygon contains the point or polygon, the function will return 1. If the point or polygon is not located within the declared polygon, then the function will return 0.
171+
The `ST_WITHIN` function determines whether a point or polygon is within a polygon. If the polygon contains the point or polygon, the function will return 1. The function will return 0 if the point or polygon isn't located within the declared polygon.
164172

165-
The following example query uses `ST_WITHIN` to determine whether the delivery destination point is within the given warehouse polygon:
173+
The following example query uses `ST_WITHIN` to determine whether the delivery destination point is within the given warehouse polygon.
166174

167175
```SQL
168176
SELECT

0 commit comments

Comments
 (0)