GeoPolygonQuery
GeoPolygonQuery filters rows by a polygonal geographic area. Tablestore returns rows where the value of the specified GeoPoint column falls within the defined polygon. Use this query type to filter data based on complex geographic boundaries, such as delivery zones, administrative districts, or service coverage areas.
Data structure
message GeoPolygonQuery {
optional string field_name = 1;
repeated string points = 2;
}
|
Parameter |
Type |
Required |
Description |
|
field_name |
string |
Yes |
The name of the attribute column to query. The column type must be GeoPoint. |
|
points |
string |
Yes |
The coordinate pairs of the vertices that define the polygon. Each value must be in |
Important: The coordinate format islatitude,longitude— latitude comes first. This is the opposite of GeoJSON, which useslongitude,latitudeorder. Swapping the order is one of the most common sources of incorrect geo-polygon query results.