Hi, I was wondering if it is possible to apply this algorithm when calculating the pole of inacessibility of an SVG path. I'm doing this to build a hierarchy between SVG paths, in a parent-child manner. I've tried checking if point[cx(), cy()] is inside the parent path, but that doesn't guarantee the point is inside both parent and child paths, especially if the child path has an irregular shape, like a 'U'. I've tried using the CLI algorithm on GEOJson files and, while it does work, when I export to .SVG on mapshaper.com the svg file returns empty.
I've tried using a polyfill for GetPathData to obtain all the points of the path, to try emulating a polygon, but I don't know if it really works lilke that because the code freezes up on me. And I've also tried checking if, for all points of path 2, they're either inStroke or inFill of path 1, but that's rather time exhaustive.
I don't know how to reliably apply this when it comes to svg paths. All help would be appreciated. Ideally, the pole of inacessibility would be in the fill of the path, and the goal would be to find the P of I in the fill of the path 2.
Thanks!
Hi, I was wondering if it is possible to apply this algorithm when calculating the pole of inacessibility of an SVG path. I'm doing this to build a hierarchy between SVG paths, in a parent-child manner. I've tried checking if point[cx(), cy()] is inside the parent path, but that doesn't guarantee the point is inside both parent and child paths, especially if the child path has an irregular shape, like a 'U'. I've tried using the CLI algorithm on GEOJson files and, while it does work, when I export to .SVG on mapshaper.com the svg file returns empty. I've tried using a polyfill for GetPathData to obtain all the points of the path, to try emulating a polygon, but I don't know if it really works lilke that because the code freezes up on me. And I've also tried checking if, for all points of path 2, they're either inStroke or inFill of path 1, but that's rather time exhaustive. I don't know how to reliably apply this when it comes to svg paths. All help would be appreciated. Ideally, the pole of inacessibility would be in the fill of the path, and the goal would be to find the P of I in the fill of the path 2. Thanks!