Hi all

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:

select areaname, country
FROM pas_nat_iv_pnt
where ST_Intersects(pas_nat_iv_pnt.the_geom ,
ST_GeomFromText('POLYGON((-7726647.392661 408830.119563 ,
-6918290.736304  408830.119563 , -6918290.736304  828801.112346 ,
-7726647.392661  828801.112346 , -7726647.392661 408830.119563 ))' , 32662)
)

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:

select areaname, country
FROM pas_nat_iv_pnt
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))

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.

TIA

Mark
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to