1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Additional test cases for geopoly.

FossilOrigin-Name: 19b5eb45e090c4b7169a52d881495ee2eafc59f80e3db2288fc1814ba76134ac
This commit is contained in:
drh
2018-08-29 21:01:22 +00:00
parent 17f19eadb8
commit 9c1d7c6d4c
3 changed files with 22 additions and 8 deletions

View File

@ -558,7 +558,7 @@ BEGIN;
UPDATE geo1
SET clr=CASE WHEN rowid IN (SELECT geo1.rowid FROM geo1, querypoly
WHERE geopoly_overlap(_shape,poly))
THEN 'red' ELSE 'blue' END;
THEN 'red' ELSE '#76ccff' END;
UPDATE geo1
SET _shape=geopoly_xform(_shape,1,0,0,1,300,0)
WHERE geopoly_overlap(_shape,(SELECT poly FROM querypoly));
@ -569,6 +569,20 @@ SELECT geopoly_svg(_shape,
FROM geo1;
SELECT geopoly_svg(poly,'style="fill:none;stroke:black;stroke-width:2"')
FROM querypoly;
--ROLLBACK;
.print '</svg>'
.print '<h1>Overlap With Translated Query Polygon</h1>'
UPDATE querypoly SET poly=geopoly_xform(poly,1,0,0,1,300,0);
.print '<svg width="1000" height="800" style="border:1px solid black">'
SELECT geopoly_svg(_shape,
printf('style="fill:none;stroke:%s;stroke-width:1"',geo1.clr)
)
FROM geo1
WHERE geopoly_overlap(_shape,(SELECT poly FROM querypoly));
SELECT geopoly_svg(poly,'style="fill:none;stroke:black;stroke-width:2"')
FROM querypoly;
ROLLBACK;
.print '</svg>'