I'm trying to write a command to see whether a given point lies within a multipolygon boundary (in this case, a watershed). I have a table of watershed boundaries and another table with the point I'm going to use to see which watershed the point lies in.

Would st_intersects be the correct command to run? (if so, how would I do that?). If not, what would be the best command to use?

I'm new to postgis/postgresql so any help would be greatly appreciated.

Here are what the tables look like:

Table A has point data:

enter image description here

Table H has polygons: enter image description here

1 Answer 1


This should do what you're asking:

SELECT a.name, h.name
 FROM a5 a, HUC8 h
 WHERE ST_Intersects(a.the_geom, h.the_geom);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.