Index: ext/rtree/visual01.txt ================================================================== --- ext/rtree/visual01.txt +++ ext/rtree/visual01.txt @@ -556,11 +556,11 @@ .print '

Color-Change And Move Overlapping Elements

' 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)); .print '' SELECT geopoly_svg(_shape, @@ -567,9 +567,23 @@ printf('style="fill:none;stroke:%s;stroke-width:1"',geo1.clr) ) FROM geo1; SELECT geopoly_svg(poly,'style="fill:none;stroke:black;stroke-width:2"') FROM querypoly; +--ROLLBACK; +.print '' + + +.print '

Overlap With Translated Query Polygon

' +UPDATE querypoly SET poly=geopoly_xform(poly,1,0,0,1,300,0); +.print '' +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 '' .print ''