空间数据库查询(距离特定地址最近的商店)

时间:2014-06-02 05:54:58

标签: sql database location spatial closest

Database name: landmarks

landmark(landmarkId(PK),landmarkName,type,GPSCoordinates,locationId)

Comments(commentId(PK),comment,landmarkId)

Location(locationId(PK),streetName,streetNumber,buildingNumber,suburbId)

Suburb(suburbId(PK),suburbName,cityId)

City(cityId(PK),cityName,stateId)

State(stateId(PK),stateName,countryId)

Country(countryId(PK),countryName)

我正在尝试进行查询以获得其类型=咖啡店最接近的地标到特定地址。 例如: 最近的咖啡店到54 George Street,Los angle,California,usa。

我是空间数据库的新手,这个例子的最佳优化SQL查询是什么。

0 个答案:

没有答案