mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-24 09:02:37 +00:00
6f28848e3a
git-svn-id: http://svn.osgeo.org/postgis/trunk@7082 b70326c6-7e19-0410-871a-916f4a2858ee
39 lines
1.2 KiB
SQL
39 lines
1.2 KiB
SQL
-----------------------------------------------------------------------
|
|
-- $Id$
|
|
--
|
|
-- Copyright (c) 2009 Sandro Santilli <strk@keybit.net>
|
|
--
|
|
-- This is free software; you can redistribute and/or modify it under
|
|
-- the terms of the GNU General Public Licence. See the COPYING file.
|
|
-----------------------------------------------------------------------
|
|
|
|
-------------------------------------------------------------------
|
|
-- st_contain
|
|
-----------------------------------------------------------------------
|
|
|
|
SELECT 'st_contain(query(1,1), X)' as op,
|
|
count(a.y),
|
|
min(a.x) as xmin,
|
|
max(a.x) as xmax,
|
|
min(a.y) as ymin,
|
|
max(a.y) as ymax,
|
|
st_extent(a.tile)
|
|
FROM rt_gist_grid_test a, rt_gist_query_test b
|
|
WHERE b.x = 1 and b.y = 1
|
|
AND st_contain(b.tile, a.tile);
|
|
|
|
-----------------------------------------------------------------------
|
|
-- Test ~ operator (contains)
|
|
-----------------------------------------------------------------------
|
|
|
|
SELECT 'query(1,1) ~ X' as op,
|
|
count(a.y),
|
|
min(a.x) as xmin,
|
|
max(a.x) as xmax,
|
|
min(a.y) as ymin,
|
|
max(a.y) as ymax,
|
|
st_extent(a.tile)
|
|
FROM rt_gist_grid_test a, rt_gist_query_test b
|
|
WHERE b.x = 1 and b.y = 1
|
|
AND b.tile ~ a.tile;
|