simonw / shapefile-to-sqlite

Load shapefiles into a SQLite (optionally SpatiaLite) database
Apache License 2.0
28 stars 4 forks source link

Be sure to import fiona before shapely #1

Closed simonw closed 4 years ago

simonw commented 4 years ago

See https://github.com/Toblerity/Fiona/issues/383

On OS X I found that this crashes (segmentation fault 11):

import fiona
from shapely.geometry import shape

While this avoids the crash for some reason:

from shapely.geometry import shape
import fiona
simonw commented 4 years ago

I should include a comment about this so no-one in the future ever decides to sort the imports alphabetically.

simonw commented 4 years ago

https://github.com/simonw/shapefile-to-sqlite/blob/e609800cadc7b21b9fedc92879346085a2cdb0ac/shapefile_to_sqlite/cli.py#L5-L8