Skip to content

Instantly share code, notes, and snippets.

@mhkeller
Created October 17, 2012 18:37
Show Gist options
  • Select an option

  • Save mhkeller/3907278 to your computer and use it in GitHub Desktop.

Select an option

Save mhkeller/3907278 to your computer and use it in GitHub Desktop.
Count points intersecting with polygons in PostGIS
UPDATE poly_table SET count_col = (SELECT count(*) FROM points_table WHERE ST_Intersects(points_table.the_geom, poly_table.the_geom))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment