Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to write a query in Postgis which will return all rows where a dynamically changing longitude/latitude point resides within the geometric polygon of that row (in the geom column). This is the query I'm trying to use:

SELECT * FROM "geospatial-data" 
WHERE ST_Contains(
        ST_GeomFromText('POINT(-90.56210 38.60369)', 4326), 4269

I'm basing this query off of an older post here:

I'm not getting any errors but I can't understand what I'm doing wrong. How should I write/modify the query in order to query for a point-in-polygon?

share|improve this question
that one return true when given point is in given geospatial-data geometry. so it work like intended – simplexio Jun 17 '13 at 11:59
Really? I thought it will select everything where the "WHERE" condition is true. It shouldn't be returning true, instead, it should be returning the rows of data where the condition equals true. Or am I missing something? – Glen Selle Jun 17 '13 at 13:54
Well, it does return those rows (=true is not needed really). So if you're not getting data you want the problem is with data. – Jakub Kania Jun 19 '13 at 12:39
you also might want to provide a link to your polygon data – chris henrick Apr 20 '15 at 1:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.