Dear Guido,

Thanks for replying.
Your suggested mod actually worsens the performance by another ~15-20ms

Best regards,
-- 
Pedro Doria Meunier <[EMAIL PROTECTED]>

> Pedro,
> 
> Try this instead:
> 
> SELECT road_network, toponymy FROM maps AS m WHERE m.b_box &&
> geomfromtext('POINT($lon $lat)',4326) and
> st_within(geomfromtext('POINT($lon $lat)',4326), m.b_box)
> 
> of course, if you already know that the point is in Portugal,
> you could do:
> 
> SELECT road_network, toponymy FROM maps AS m WHERE 
> m.country = 'PT' and 
> m.b_box && geomfromtext('POINT($lon $lat)',4326)
> 
> (assuming that the maps table has the 'country' column with
> country names).
> 
> GL

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to