You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to calculate the Frechet distance between two linestrings (each around 1500 segments), I get a segmentation fault on windows 10.
I can avoid this, by specifying the stack reserve size in Visual Studio, and putting it to i.e. 8388608. While this works, larger linestring will potentially crash also unix machines. In this case, a stack size of roughly 3 MiB is enough.
Tested on Windows 10, with Geos 3.10.1, Visual Studio 2019.
The linestrings are attached, the code is as follows:
This is probably because the current GEOS DiscreteFrechetDistance algorithm is a recursive one, and so can use a lot of stack.
JTS now has a DiscreteFrechetDistance implementation which uses an internal stack, and so does not have this problem. It uses a dynamic programming approach which should also be a lot faster. See locationtech/jts#764 and locationtech/jts#783.
When trying to calculate the Frechet distance between two linestrings (each around 1500 segments), I get a segmentation fault on windows 10.
I can avoid this, by specifying the stack reserve size in Visual Studio, and putting it to i.e. 8388608. While this works, larger linestring will potentially crash also unix machines. In this case, a stack size of roughly 3 MiB is enough.
Tested on Windows 10, with Geos 3.10.1, Visual Studio 2019.
The linestrings are attached, the code is as follows:
ls2.csv
ls1.csv
The text was updated successfully, but these errors were encountered: