[SciPy-User] Using geographic coordinates with pyshapelib

bar tomas bartomas at gmail.com
Fri Sep 11 10:35:16 EDT 2009


Hi,

Can I use lat/long coordinates directly when creating shapes with pyshapelib.
I mean, for instance in the following sample program that uses
pyshapelib (from : software.stablers.net/files/shapelibSample.py)
could I use lat/long in the parameters of SHPObject


def make_shapefile(filename):
    obj = shapelib.SHPObject(shapelib.SHPT_POLYGON, 1,
                             [[(10, 10), (20, 10), (20, 20), (10, 10)]])
    print obj.extents()
    print obj.vertices()
    outfile = shapelib.create(filename, shapelib.SHPT_POLYGON)


Do I need to specify anything so that ArMap interprets the coordinates
correctly when importing the created shapefile?

Thanks very much.



More information about the SciPy-User mailing list