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 don't.

One theory for what might have happened is that I did not read the .prj file correctly, and the .prj file contained some sort of projection data that would un-distort the polygons.

When I read the pyshp documentation, it says:

You specify the base filename of the shapefile or the complete filename of any of the shapefile component files.... OR any of the other 5+ formats which are potentially part of a shapefile. The library does not care about file extensions.

But it does not mention .prj specifically.

Does pyshp, by default, read .prj files correctly? If not, is there a way to get it to do so?

1 Answer 1


PyShp does not handle projections. You can use pyproj for that. What are you using to visualize the shapefile? If the data is in a geographic coordinate system, it won't appear in the cartesian format that you are expecting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.