I think this solution to the problem is so simple that it should be wrong ;)
. But, although I have not tried it, it seems to me very good. Just install inkscape
on your server and then run this:
inkscape --without-gui --query-all /path/to/doc.svg
According to the help, it will be List id,x,y,w,h for all objects
- it sounds as I need, as well as what is asked here! Output Example:
Layer_1,1.8032746e-06,-0.002,780.37099,455.91999 g4,0.090994976,-72.489183,72.445768,72.454697 polygon6,2.125,-70.896,69,69 polygon8,2.125,-70.896,69,69 g10,0.090994976,-72.489183,64.778768,3.5796973 path12,61.423995,-72.489183,3.4457675,3.5796973 path14,53.756995,-72.489183,3.4457675,3.5796973 path16,46.090995,-72.489183,3.4457675,3.5796973 path18,38.423995,-72.489183,3.4457675,3.5796973 ....
This is fast enough to trigger a web request, but if you have many ways to download, you can easily do it in the background.