Closed DanqingZ closed 8 years ago
@DanqingZ Looks like this might be a GDAL 1.0 vs. 2.0 issue. What version of GDAL and Fiona are you running?
They are listed as below, I am using anaconda and pip~ fiona 1.6.0 np110py27_0 gdal 1.11.0 np19py27_0
@DanqingZ Could you please paste the results of:
import fiona.ogrext
print(fiona.ogrext.get_gdal_release_name())
@geowurster 2.0.0
@DanqingZ So you have two versions of GDAL
installed and Fiona
is using 2.0
. @sgillies I think you know more about the conda vs. pip install process than I do.
Oh yes, I used pip install to install both the Fiona and GDAL packages @geowurster @sgillies
@DanqingZ once you get GDAL 2.0 (which Fiona doesn't yet support, but soon...) off your conda environment's library path, Fiona will import and run just fine.
@sgillies ...That is exactly my problem..How to get the GDAL 2.0 off my conda environment's library path? I type "conda list" in the terminal, and it shows the version of GDAL is 1.11
@DanqingZ sorry, but that's a conda issue that you'll need to take up with ContinuumIO or the conda community.
@DanqingZ did you figure out a solution? I've exactly the same problem.
Hi,
I have not found a way to save the output from Fiona into a list and to read it back with shapely. I figure i need to use gdal and output to WKT. Don't know how to make shapely understand the Fiona dictionary output:(
For now, I just use a different file obj for every time I need to do a loop inside a loop. Same file but different handle I guess... Still hoping to get some help on this. It should be simple. I must be missing a small thing. Cheers.
Nicolas
On Nov 13, 2015 23:12, patrick-dd notifications@github.com wrote: @DanqingZ did you figure out a solution? I've exactly the same problem.
Reply to this email directly or view it on GitHub: https://github.com/Toblerity/Fiona/issues/290#issuecomment-156623997
http://gis.stackexchange.com/questions/139905/how-to-call-shapely-coords-on-a-fiona-filtered-list On Nov 13, 2015 23:12, patrick-dd notifications@github.com wrote:@DanqingZ did you figure out a solution? I've exactly the same problem.
—Reply to this email directly or view it on GitHub.
Hi,
import fiona
from shapely.geometry import shape
import time
ptList = []
classpolyList =[]
with fiona.open("c:/pytemp/fiona/planning_neighborhoods.shp", "r") as classPoly:
classpolyList = list(classPoly)
with fiona.open("c:/pytemp/fiona/Schools_Private_Pt.shp", "r") as inputLidarPt:
x = time.time()
print x
ptList = list(inputLidarPt)
x = time.time()
print x
for polyg in classpolyList:
for pts in ptList:
if shape(polyg['geometry']).contains(shape(pts['geometry'])):
pass
else:
pass
y = time.time()
z = y-x
print z
print 'done'
Date: Fri, 13 Nov 2015 20:12:13 -0800 From: notifications@github.com To: Fiona@noreply.github.com Subject: Re: [Fiona] Importing shapefile using fiona (#290)
@DanqingZ did you figure out a solution? I've exactly the same problem.
— Reply to this email directly or view it on GitHub.
@DanqingZ @NicolasCadieux the following commands fixed this issue for me (I had installed gdal and fiona with conda and was at version 2.0.0 and 1.6.0 respectively):
conda install gdal=1.11.2
conda install fiona=1.5.1
This may not be an issue for others, but when i filtered my geodataframe to exclude null cells in the geometry
column, I could successfully write geojson or shapefiles. I ws receiving the same error as the OP before.
Hi all,
I am using geopandas to import shapefile, but it seems the problem is due to fiona according to this post
It is strange that, fiona works for some certain shapefiles, but does not work for others. And actually I think are shapefiles I use are well -maintained. For they can all be opened using QGIS.
Below are my scripts and errors I get.