Questions tagged [pyshp]

Pyshp is a pure Python shapefile library which can be used to read, write and edit ESRI shapefiles.

Pyshp is an open source library which provides a python interface to ESRI shapefiles, following the Official ESRI Shapefile Specification.

Documentation and download information is provided at the pyshp project page including code samples and more detailed use cases.

102 questions
4
votes
1 answer

Does pyshp read .prj files properly?

I want to read a shapefile using pyshp: sf = shapefile.Reader(('/tmp/India_PCs_Boundary_4_2_19/India_PCs_Boundary.shp')) but when I look at the result, the polygons look all squishy and distorted; they're supposed to exactly cover India, but they…
Dan B
  • 41
  • 2
2
votes
2 answers

pyshp problem with naturalearthdata-shapefile

I am trying to follow the example at https://code.google.com/p/pyshp/wiki/ShapeRecords by entering the following code: import shapefile r = shapefile.Reader("ne_110m_admin_0_countries") sr = r.shapeRecords() However, it gives this error-message…
Kurt
  • 7,087
  • 4
  • 33
  • 51
1
vote
1 answer

Using PyShp to create polygon shapefiles?

I have a script for creating points shapefiles, but I can not fix it for make a new polyline shp file. I have obtained the data from a excel file and extract data in three differents lists Lon,lat,label import shapefile as shp from openpyxl import…
kamome
  • 757
  • 2
  • 12
  • 25