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

Possible Duplicate:
How to perform a spatial join of point and polygon layers in PostGIS?

I don't know how to solve my actual problem.

I have polygons and points (some points are located in the polygons) and I want to add the polygon attributes to the points when they are inside the polygons.

Does anybody has an idea how to do this?

Best regards, Jann

share|improve this question

marked as duplicate by R.K., Simon, djq, Aaron, whuber Dec 3 '12 at 15:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
What you want to do is called a spatial join. It's already covered in this question. How to perform a spatial join of point and polygon layers in PostGIS? – R.K. Dec 3 '12 at 12:23
up vote 4 down vote accepted

You can use the st_within statement. So something like:

select * from point p1, polygon p2 where st_within (p1.geom, p2.geom)

More information on the postgis website.

share|improve this answer

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