1

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

0

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, privacy policy and cookie policy

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