Last active
October 20, 2016 01:21
-
-
Save DanielKinsman/cb2efa2c534a7d0c29abc55a95be0579 to your computer and use it in GitHub Desktop.
Fiona crash on windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# requirements: ['fiona==1.7.0', 'gdal==2.0.3'] | |
import gdal | |
import fiona | |
import fiona.crs | |
schema = {'geometry': 'Point', 'properties': {'a': 'str'}} | |
feature = { | |
'type': 'Feature', | |
'geometry': {'type': 'Point', 'coordinates': (0, 0)}, | |
'id': '0', | |
'properties': {'a': 'a'} | |
} | |
# This works on windows | |
with fiona.open('test1.geojson', 'w', driver='GeoJSON', crs=fiona.crs.from_epsg(4326), schema=schema) as sink: | |
sink.write(feature) | |
# This *crashes* on windows | |
with fiona.drivers(): | |
with fiona.open('test2.geojson', 'w', driver='GeoJSON', crs=fiona.crs.from_epsg(4326), schema=schema) as sink: | |
sink.write(feature) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment