我有一个空间分布的实体集合E存储和空间索引在PostGis数据库中。
每个实体都有一些索引的非空间属性,如TYPE、VALUE等。
对于以下类型的查询是否有计算效率高的查询模板:
"find the centroid of the circular region with radius X which includes the most E such that (some condition based on attribue values)"
如
"find the centroid of the circular region with radius 1Km which contains the most E with TYPE == 'PIZZA-RESTAURANT'"
谢谢!
要利用空间索引,可以使用ST_DWithin。你的搜索空间是什么?质心可以在空间的任何地方吗?