1

So I am trying to identify which items from the requests table fall into some particular district from the district table using postgis. Basically, I am writing an UPDATE query that will take the district number from the district table and put that into the district field of the requests table. Here is the query that I have been using so far, but it does not return any rows.

Note that the requests table usesPOINT geometry while the district table is a MULTIPOLYGON.

 update requests
 set req_district = districts.district
 from districts
 where st_intersects(requests.geom, districts.geom);

Note sure why such a simple query would not work. Am I missing something?

  • I suppose it does the same when you simply do a select? Can you rewrite your query to include some actual geometries? Or gives us access to (part of) the data? – tilt Feb 13 '16 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.