/ Check-in [4bc28eed]
Login

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

Overview
Comment:Minor changes to the visual01.txt test script.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | rtree-geopoly
Files: files | file ages | folders
SHA3-256: 4bc28eed32154be0e62fe69acd30f828c2e6f59c6579618ecad8ecf632a90517
User & Date: drh 2018-08-27 17:05:59
Context
2018-08-27
17:13
Add support for the Geopoly extension to the R-Tree extension. This also involves adding the SQLITE_INDEX_CONSTRAINT_FUNCTION capability to the xFindFunction method of the sqlite3_module object, and to the sqlite3_index_info.aConstraint.op field in the xBestIndex implementation of virtual tables. check-in: 666133e3 user: drh tags: trunk
17:05
Minor changes to the visual01.txt test script. Closed-Leaf check-in: 4bc28eed user: drh tags: rtree-geopoly
15:55
Split the three-argument version of geopoly_within() off into a separate function named geopoly_contains_point(). check-in: 5a0e1541 user: drh tags: rtree-geopoly
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/rtree/visual01.txt.

   373    373            printf('style="fill:%s;fill-opacity:0.5;"',clr)
   374    374          )
   375    375     FROM querypoly;
   376    376   .print '</svg>'
   377    377   
   378    378   .print '<h1>Overlap Query</h1>'
   379    379   .print '<pre>'
          380  +.print 'SELECT *'
          381  +.print '  FROM geo1, querypoly'
          382  +.print ' WHERE geopoly_overlap(_shape, poly);'
          383  +.print 
   380    384   EXPLAIN QUERY PLAN
   381    385   SELECT geopoly_svg(_shape,
   382    386            printf('style="fill:none;stroke:%s;stroke-width:1"',geo1.clr)
   383    387          )
   384    388     FROM geo1, querypoly
   385    389    WHERE geopoly_overlap(_shape, poly);
   386    390   .print '</pre>'
................................................................................
   393    397   SELECT geopoly_svg(poly, 
   394    398            printf('style="fill:%s;fill-opacity:0.5;"',clr)
   395    399          )
   396    400     FROM querypoly;
   397    401   .print '</svg>'
   398    402   
   399    403   .print '<h1>Bounding-Box Overlap Query</h1>'
   400         -.print '<pre>'
   401         -EXPLAIN QUERY PLAN
   402         -SELECT geopoly_svg(_shape,
   403         -         printf('style="fill:none;stroke:%s;stroke-width:1"',geo1.clr)
   404         -       )
   405         -  FROM geo1, querypoly
   406         - WHERE geopoly_overlap(geopoly_bbox(_shape), geopoly_bbox(poly));
   407         -.print '</pre>'
   408    404   .print '<svg width="1000" height="800" style="border:1px solid black">'
   409    405   SELECT geopoly_svg(_shape,
   410    406            printf('style="fill:none;stroke:%s;stroke-width:1"',geo1.clr)
   411    407          ),
   412    408          geopoly_svg(geopoly_bbox(_shape),
   413    409            'style="fill:none;stroke:black;stroke-width:1"'
   414    410          )
................................................................................
   422    418            'style="fill:none;stroke:black;stroke-width:3"'
   423    419          )
   424    420     FROM querypoly;
   425    421   .print '</svg>'
   426    422   
   427    423   .print '<h1>Within Query</h1>'
   428    424   .print '<pre>'
          425  +.print 'SELECT *'
          426  +.print '  FROM geo1, querypoly'
          427  +.print ' WHERE geopoly_within(_shape, poly);'
          428  +.print 
   429    429   EXPLAIN QUERY PLAN
   430    430   SELECT geopoly_svg(_shape,
   431    431            printf('style="fill:none;stroke:%s;stroke-width:1"',geo1.clr)
   432    432          )
   433    433     FROM geo1, querypoly
   434    434    WHERE geopoly_within(_shape, poly);
   435    435   .print '</pre>'
................................................................................
   442    442   SELECT geopoly_svg(poly, 
   443    443            printf('style="fill:%s;fill-opacity:0.5;"',clr)
   444    444          )
   445    445     FROM querypoly;
   446    446   .print '</svg>'
   447    447   
   448    448   .print '<h1>Bounding-Box WITHIN Query</h1>'
   449         -.print '<pre>'
   450         -EXPLAIN QUERY PLAN
   451         -SELECT geopoly_svg(_shape,
   452         -         printf('style="fill:none;stroke:%s;stroke-width:1"',geo1.clr)
   453         -       )
   454         -  FROM geo1, querypoly
   455         - WHERE geopoly_within(geopoly_bbox(_shape), geopoly_bbox(poly));
   456         -.print '</pre>'
   457    449   .print '<svg width="1000" height="800" style="border:1px solid black">'
   458    450   SELECT geopoly_svg(_shape,
   459    451            printf('style="fill:none;stroke:%s;stroke-width:1"',geo1.clr)
   460    452          ),
   461    453          geopoly_svg(geopoly_bbox(_shape),
   462    454            'style="fill:none;stroke:black;stroke-width:1"'
   463    455          )
................................................................................
   471    463            'style="fill:none;stroke:black;stroke-width:3"'
   472    464          )
   473    465     FROM querypoly;
   474    466   .print '</svg>'
   475    467   
   476    468   .print '<h1>Not Overlap Query</h1>'
   477    469   .print '<pre>'
          470  +.print 'SELECT *'
          471  +.print '  FROM geo1, querypoly'
          472  +.print ' WHERE NOT geopoly_overlap(_shape, poly);'
          473  +.print 
   478    474   EXPLAIN QUERY PLAN
   479    475   SELECT geopoly_svg(_shape,
   480    476            printf('style="fill:none;stroke:%s;stroke-width:1"',geo1.clr)
   481    477          )
   482    478     FROM geo1, querypoly
   483    479    WHERE NOT geopoly_overlap(_shape, poly);
   484    480   .print '</pre>'
................................................................................
   492    488            printf('style="fill:%s;fill-opacity:0.5;"',clr)
   493    489          )
   494    490     FROM querypoly;
   495    491   .print '</svg>'
   496    492   
   497    493   .print '<h1>Not Within Query</h1>'
   498    494   .print '<pre>'
          495  +.print 'SELECT *'
          496  +.print '  FROM geo1, querypoly'
          497  +.print ' WHERE NOT geopoly_within(_shape, poly);'
          498  +.print 
   499    499   EXPLAIN QUERY PLAN
   500    500   SELECT geopoly_svg(_shape,
   501    501            printf('style="fill:none;stroke:%s;stroke-width:1"',geo1.clr)
   502    502          )
   503    503     FROM geo1, querypoly
   504    504    WHERE NOT geopoly_within(_shape, poly);
   505    505   .print '</pre>'