/ Check-in [19b5eb45]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Additional test cases for geopoly.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 19b5eb45e090c4b7169a52d881495ee2eafc59f80e3db2288fc1814ba76134ac
User & Date: drh 2018-08-29 21:01:22
Context
2018-08-30
01:52
Improved JSON parser caching. check-in: 58078c0d user: drh tags: trunk
2018-08-29
21:01
Additional test cases for geopoly. check-in: 19b5eb45 user: drh tags: trunk
20:52
Fixes to the UPDATE logic in Geopoly. check-in: 7c3cee0a user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/rtree/visual01.txt.

   554    554   .print '</svg>'
   555    555   
   556    556   .print '<h1>Color-Change And Move Overlapping Elements</h1>'
   557    557   BEGIN;
   558    558   UPDATE geo1
   559    559      SET clr=CASE WHEN rowid IN (SELECT geo1.rowid FROM geo1, querypoly
   560    560                                   WHERE geopoly_overlap(_shape,poly))
   561         -           THEN 'red' ELSE 'blue' END;
          561  +           THEN 'red' ELSE '#76ccff' END;
   562    562   UPDATE geo1
   563    563      SET _shape=geopoly_xform(_shape,1,0,0,1,300,0)
   564    564    WHERE geopoly_overlap(_shape,(SELECT poly FROM querypoly));
   565    565   .print '<svg width="1000" height="800" style="border:1px solid black">'
   566    566   SELECT geopoly_svg(_shape,
   567    567            printf('style="fill:none;stroke:%s;stroke-width:1"',geo1.clr)
   568    568          )
   569    569     FROM geo1;
   570    570   SELECT geopoly_svg(poly,'style="fill:none;stroke:black;stroke-width:2"')
   571    571     FROM querypoly;
          572  +--ROLLBACK;
          573  +.print '</svg>'
          574  +
          575  +
          576  +.print '<h1>Overlap With Translated Query Polygon</h1>'
          577  +UPDATE querypoly SET poly=geopoly_xform(poly,1,0,0,1,300,0);
          578  +.print '<svg width="1000" height="800" style="border:1px solid black">'
          579  +SELECT geopoly_svg(_shape,
          580  +         printf('style="fill:none;stroke:%s;stroke-width:1"',geo1.clr)
          581  +       )
          582  +  FROM geo1
          583  + WHERE geopoly_overlap(_shape,(SELECT poly FROM querypoly));
          584  +SELECT geopoly_svg(poly,'style="fill:none;stroke:black;stroke-width:2"')
          585  +  FROM querypoly;
   572    586   ROLLBACK;
   573    587   .print '</svg>'
   574    588   
   575    589   .print '</html>'