Open GoogleCodeExporter opened 8 years ago
After refreshing my local copy from a pristine SVN checkout, I see that this
editor bug applies even to POINT types. The bug is that `Editor.point()`
defaults "z" and "m" values to None, which causes the following exception:
{{{
Traceback (most recent call last):
File "testcase.py", line 38, in <module>
test()
File "testcase.py", line 25, in test
e.save(FNAME2)
File "/Users/driggs2/tmp/pyshp/shapefile.py", line 862, in save
self.saveShp(target)
File "/Users/driggs2/tmp/pyshp/shapefile.py", line 829, in saveShp
self.__shapefileHeader(self.shp, headerType='shp')
File "/Users/driggs2/tmp/pyshp/shapefile.py", line 596, in __shapefileHeader
raise ShapefileException("Failed to write shapefile elevation and measure values. Floats required.")
shapefile.ShapefileException: Failed to write shapefile elevation and measure
values. Floats required.
}}}
The signature of `Editor.point()` should be changed to:
`def point(self, x=None, y=None, z=0, m=0, shape=None, part=None, point=None,
addr=None)`
Original comment by david.ri...@myotisoft.com
on 25 Feb 2012 at 10:44
Original comment by jlawh...@gmail.com
on 28 Feb 2012 at 5:23
Original issue reported on code.google.com by
david.ri...@myotisoft.com
on 25 Feb 2012 at 8:54