<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Chandler,<br><br>Did you check projection system of the both Geometries? Just to make sure, use ST_TRANSFORM as inner function.<br><br>regards <br><br>Muhammad Imran<br><br>--- On <b>Fri, 8/3/12, CHANDLER DOUGLAS COLEMAN <i><CHANDLER.D.COLEMAN@stu.mmu.ac.uk></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: CHANDLER DOUGLAS COLEMAN <CHANDLER.D.COLEMAN@stu.mmu.ac.uk><br>Subject: [postgis-users] area and distance<br>To: "postgis-users@postgis.refractions.net" <postgis-users@postgis.refractions.net><br>Date: Friday, August 3, 2012, 3:01 AM<br><br><div id="yiv946520484">

 
<style type="text/css">#yiv946520484 P {margin-top:0;margin-bottom:0;}</style>

<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt;">Hello,<br>
I am a newbie to PostGIS.  I am hoping some one can explain to me why the following simple query doesn't return any info:<br>
<br>
SELECT f.fact_name<br>
FROM factory AS f, inner_area AS i<br>
WHERE i.name = 'Dewsbury'<br>
AND ST_WITHIN (f.geom,i.geom);<br>
<br>
I have geom in as a column and I have 'Dewsbury' as a polygon record in inner_area and there are 5 records in factory that fall within this polygon.  But the resulting table shows that none were selected.<br>
<br>
My assumption here is that the SQL statement is correct, but that something is wrong with the tables:  could it be how I imported the two tables from shapefiles.<br>
<br>
Thanks,<br>
Chandler<br>
</div>
</div>

</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>postgis-users mailing list<br><a ymailto="mailto:postgis-users@postgis.refractions.net" href="/mc/compose?to=postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br></div></blockquote></td></tr></table>