[postgis-users] Bounding Box Query
iheanyi Okeh
simflex at hotmail.com
Mon Mar 29 09:51:53 PST 2004
Hi David,
I understand what this query below is doing.
SELECT str_num || ' ' || name as full_address,
distance(the_geom,'POINT(2227284.1963667543
1435389.6730164126)'::geometry) as dist
FROM address
ORDER BY dist limit 1
I managed to write.
What I don't understand is how the values of the bounding box below is
derived.
WHERE the_Geom && expand('POINT(2227284.196366754
1435389.6730164126)'::geometry, <max distance>) )
Notice the arguments 'POINT(2227284.196366754
1435389.6730164126)'::geometry are the same as the x,y coordinate pair in
the select statement.
It helps to know what you are doing rather than just copying codes and
pasting.
So I can just understand how the arguments in the where clause are
generated, it will help with future queries and functions.
I looked at several instances where this:
WHERE the_Geom && expand('POINT(2227284.196366754
1435389.6730164126)'::geometry, <max distance>) ) is used but I can't seem
to find an explanation of where those arguments in the &&
expand('POINT(....)' came from.
_________________________________________________________________
Find a broadband plan that fits. Great local deals on high-speed Internet
access.
https://broadband.msn.com/?pgmarket=en-us/go/onm00200360ave/direct/01/
More information about the postgis-users
mailing list