Nice tutorial here on using basemap:
Visualization: Mapping Global Earthquake Activity: This project introduces the Basemap library, which can be used to create maps and plot geographical datasets.
http://introtopython.org/visualization_earthquakes.html
- How to open a projection file?
- How to reproject?
https://pcjericks.github.io/py-gdalogr-cookbook/projection.html
This kind of works?
from pathlib import Path
from pyproj import Proj, transform
import shapefile
SHP_FOLDER = Path('nycb2010_16a')
SHP_FILENAME = SHP_FOLDER.joinpath('nycb2010.shp')
sf = shapefile.Reader(str(SHP_FILENAME))
This is supposedly useful for converting a shapefile from one projection to another.
This was a good readme, kind of...not sure what parts of the code are germane to the task: https://glenbambrick.com/2016/01/24/reproject-shapefile/
I installed it via pip.
https://pypi.python.org/pypi/pyshp
On pyproj:
If you do need to deal with projections programmatically you basically have one choice: the PROJ4 library. It is one of the few free libraries, if not the only library period, that comprehensively deals with re-projecting goespatial data. Fortunately it has bindings for just about every language out there and is incorporated into many libraries including OGR. There is a Python project called pyproj which provides python bindings.