Opened 5 years ago
Closed 5 years ago
#2240 closed defect (fixed)
export tiling as svg
Reported by: | Dimitar Misev | Owned by: | apercov |
---|---|---|---|
Priority: | major | Milestone: | 10.0 |
Component: | qlparser | Version: | 9.8 |
Keywords: | Cc: | Vlad Merticariu, Bang Pham Huu, Peter Baumann | |
Complexity: | Medium |
Description
With a query like this we can print the sdoms of tiles in an array:
rasql -q 'select dbinfo(c, "printtiles=1") from test_grey as c' --out string
resulting in a json array of sdom strings like this:
"tileDomains": [ "[100:149,210:210]" "[150:199,0:29]", "[150:199,30:59]", "[150:199,60:89]", ...
The code handling this is in qlparser/qtinfo.cc
It would be very useful to export the tiles as svg that can be visualized, e.g.
rasql -q 'select dbinfo(c, "printtiles=svg") from test_grey as c' --out string
would produce similar to below output (id would contain the tile id)
<svg width="array width" height="array height"> <rect x="100" y="210" width="50" height="1" id="1232"></rect> <rect x="150" y="0" width="50" height="30" id="3223"></rect> ... </svg>
It would also be useful to set various fill colors for each tile, e.g. choose 10-20 colors and rotate them over the rectangles.
This would work only on 2D arrays. 3D and higher dimension would require to generate something like webgl probably.
Attachments (2)
Change History (5)
by , 5 years ago
Attachment: | vistiles.sh added |
---|
comment:1 by , 5 years ago
by , 5 years ago
Attachment: | tiling_test_grey.png added |
---|
comment:2 by , 5 years ago
Status: | assigned → accepted |
---|
comment:3 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Note:
See TracTickets
for help on using tickets.
I made a small script which converts the output of dbinfo to svg; execute with
vistiles.sh collName
.E.g. for test_grey it produces something like this if you open the svg in inkscape: