All Products
Search
Document Center

Tablestore:GeoDistanceQuery

Last Updated:May 09, 2024

GeoDistanceQuery specifies the configurations of a geo-distance query. You can specify a circular geographical area that consists of a central point and radius as a query condition. Tablestore returns the rows in which the value of the specified column falls within the geographical circular area.

Data structure

message GeoDistanceQuery {
    optional string field_name = 1;
    optional string center_point = 2;
    optional double distance = 3;
}

Parameter

Type

Required

Description

field_name

string

Yes

The name of the attribute column. The column type must be GeoPoint.

center_point

string

Yes

The coordinate pair of the central point. The coordinate pair consists of latitude and longitude values.

The value must be in the latitude,longitude format. Valid values of latitude: [-90,+90]. Valid values of longitude: [-180,+180]. For example, you can specify 35.8,-45.91.

distance

double

Yes

The radius of the circular geographic area. Unit: meter.