= Examples Inside Polygon = '''Reinhold Stahlmann [http://postgis.refractions.net/pipermail/postgis-users/2004-January/003867.html asks]:''' "How can I built an (OGC-conforming) SQL query with PostGIS to select all Points of a given Point-Dataset who have their Geometry within a specific Polygon-Geometry chosen by a label-Field of the Polygon? For example: All PostGIS-Users.name (Point-Geometry) within 'Sweden' (Polygon-Geometry)" '''Chris Hodgson [http://postgis.refractions.net/pipermail/postgis-users/2004-January/003868.html answers]:''' {{{ SELECT user.name, user.the_geom FROM user WHERE within( user.the_geom, (SELECT the_geom FROM Country WHERE Country.name = 'Sweden') ) AND the_geom && (SELECT user.the_geom FROM Country WHERE Country.name = 'Sweden') }}} '''Paul Ramsey tries a different approach:''' {{{ SELECT user.name, user.the_geom FROM user, (SELECT the_geom FROM Country WHERE Country.name = 'Sweden') as country WHERE within( user.the_geom, country.the_geom ) AND the_geom && country.the_geom }}}