Replies: 2 comments
-
Hi, This is not an issue with momepy, strictly speaking. Your GeoDataFrame In any case, I'd like to point out that this tracker is primarily for issue reporting and suggestions for further development. I would recommend trying asking your questions like this one on http://stackoverflow.com or http://gis.stackexchange.com and filing an issue only if you won't get a response there. I am certain that the community there would be happy to help you with the question above. |
Beta Was this translation helpful? Give feedback.
-
Thank you. Let me try to solve the issue or ask it in StackOverflow. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have measured linearity with momepy as below. I want to know how to save it as shape file. The error message said " Invalid field type <class 'tuple'>"
edges.to_file("C:/mo2/edges_shape.shp")
ValueError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_13696/672022182.py in
----> 1 edges.to_file("C:/mo2/edges_shape.shp")
C:\anaconda\envs\geo\lib\site-packages\geopandas\geodataframe.py in to_file(self, filename, driver, schema, index, **kwargs)
1112 from geopandas.io.file import _to_file
1113
-> 1114 _to_file(self, filename, driver, schema, index, **kwargs)
1115
1116 def set_crs(self, crs=None, epsg=None, inplace=False, allow_override=False):
C:\anaconda\envs\geo\lib\site-packages\geopandas\io\file.py in _to_file(df, filename, driver, schema, index, mode, crs, **kwargs)
394 filename, mode=mode, driver=driver, crs_wkt=crs_wkt, schema=schema, **kwargs
395 ) as colxn:
--> 396 colxn.writerecords(df.iterfeatures())
397
398
C:\anaconda\envs\geo\lib\site-packages\fiona\collection.py in writerecords(self, records)
359 if self.mode not in ('a', 'w'):
360 raise IOError("collection not open for writing")
--> 361 self.session.writerecs(records, self)
362 self._len = self.session.get_length()
363 self._bounds = None
fiona/ogrext.pyx in fiona.ogrext.WritingSession.writerecs()
fiona/ogrext.pyx in fiona.ogrext.OGRFeatureBuilder.build()
ValueError: Invalid field type <class 'tuple'>
Beta Was this translation helpful? Give feedback.
All reactions