[postgis-users] Points with in multiple Polygons

chris brisendine ki4gyw at gmail.com
Tue May 6 00:43:53 PDT 2008


I am trying to create a sql query of a a point file aginst the area of
a polygon table with multiple polygons (Points in Polygon), Example I
want to have a listing of phonenumbers from my Homes (Point File
Table) if they are in any of the tornadowarnings (Polygon Table) there
are multiple records in the tornadowarning database also. I tryed
working with the example but have had no luck, any help would be
appreciated. Here is what i was trying to do with the sql I know there
are errors in it.

SELECT homes.phonenumber, homes.the_geom
 FROM homes
 WHERE
   within( homes.the_geom,
     (SELECT the_geom
      FROM tornadowarnings
      )
   )
  AND
    the_geom &&
      (SELECT homes.the_geom
       FROM tornadowarnings
       )



More information about the postgis-users mailing list