<div>Hi all</div>
<div> </div>
<div>I am trying to create a query that returns the features intersected by a user defined area. I can do this with the following query which works fine and returns what I want:</div>
<div> </div>
<div>select areaname, country<br>FROM pas_nat_iv_pnt<br>where ST_Intersects(pas_nat_iv_pnt.the_geom , ST_GeomFromText('POLYGON((-7726647.392661 408830.119563 ,</div>
<div>-6918290.736304 408830.119563 , -6918290.736304 828801.112346 , </div>
<div>-7726647.392661 828801.112346 , -7726647.392661 408830.119563 ))' , 32662) )</div>
<div> </div>
<div>However, what I need to do is to have a user enter latitude and longitude values and then transform these into Plate Carree coordinates, I have tried the following query:</div>
<div> </div>
<div>select areaname, country<br>FROM pas_nat_iv_pnt<br>where ST_Intersects(pas_nat_iv_pnt.the_geom , transform(ST_GeomFromText('POLYGON((-7726647.392661 408830.119563 , -6918290.736304 408830.119563 , -6918290.736304 828801.112346 , -7726647.392661 828801.112346 , -7726647.392661 408830.119563 ))' , 32662),4326))</div>
<div> </div>
<div>The query runs but returns no rows.. I would be most grateful if anyone could enlighten me on what is wrong and what I need to change.</div>
<div> </div>
<div>TIA</div>
<div> </div>
<div>Mark</div>