[Shapelib] Python SHPObject

Michael Castleton fatuheeva at yahoo.com
Fri Aug 3 12:01:24 PDT 2007


Hello,
I am trying to use the python shapelib module to create a shapefile.  In
this process I found that SHPObject requires the xy coordinate argument to
be in a seemingly strange format.  For example in the following line I am
talking about the 'shp_point' variable:
shapelib.SHPObject(shapelib.SHPT_POINT, 1, shp_point)
The format required is a tuple inside two lists.  Can anyone explain why the
values need to be formatted this way?  If I don't follow this formatting I
get an error saying the values need to be a tuple, but if I place them in a
tuple it doesn't work... unless that tuple is inside two lists.
Thanks,

Mike

-- 
View this message in context: http://www.nabble.com/Python-SHPObject-tf4214228.html#a11989116
Sent from the ShapeLib mailing list archive at Nabble.com.




More information about the Shapelib mailing list