Questions tagged «st-geometry»

1
在PostGIS中按几何分组可以吗?
按几何分组可以吗? 我们根据多边形的几何形状进行很多计数,这涉及首先将数据相交以对学生实例进行计数。根据学校边界,街区组等: SELECT n.nbhd_id , count(*) AS count_burglaries FROM denver.crime AS c JOIN denver.neighborhoods AS n ON ST_Intersects(c.geom, n.geom) WHERE c.offense_ty LIKE 'BURG%' GROUP BY n.nbhd_id 第二步是包装一个子查询,以便将多边形表中的几何图形重新连接到计数查询中: SELECT count.* , n.nbhd_name , n.geom FROM ( SELECT n.nbhd_id , count(*) AS count_burglaries FROM denver.crime AS c JOIN denver.neighborhoods AS n ON …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.