-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Segmentation fault: 11" when reading in Network object from shapefile #171
Comments
I had no problem loading your network using python 2 and 3 running in docker. So I image it is a problem with your environment and configuration. There's a docker file here you can use to test things out with python 2: https://github.com/cyang-kth/fmm/tree/master/docker If you want to test things out with python 3 you can use this docker file here I threw together:
Then just build and run the image similar to how it was done with python 2 (since alpine linux is used as the base image you will probably have to run |
I just managed to load the file. To generate the shapefile I used st_snaptogrid(geom, 1) to round the geoms to 1m precision. When I don't simplify the geoms anymore, it loads fine. I guess the simplification makes some geoms (very short lines) collapse to NULL geometries. Weird that the attached file loads without issues for you though... |
Hmm, I see. I can't really give you any answers to that. With both of the docker images I built and ran I got the trace:
... after running the two commands you pasted in the original post. |
Ok, thanks for looking into it anyway! So, the issue for me is solved making sure no geometries collapse unto themselves by simplifying them. |
I just installed fmm on Mac (took some time making it work on python3), but I think the install went fine in the end. Running fmm_test.py finishes without any errors. However, when I try to read in a shapefile I made on my own, it throws a "Segmentation fault: 11":
I think my shapefile has the correct structure:
The geoms are in a projected coordinate system, but that shouldn't be the problem right ? I tried just reading in a smaller part of the network, but it still fails. I'm attaching the network I'm trying to load.
small_network.zip
Any help would be much appreciated !
The text was updated successfully, but these errors were encountered: