Recipe: Importing GeoJSON into Shapely

Pramukta Kumar
1 min readAug 5, 2016

--

Importing GeoJSON into Shapely is incredibly easy. Here’s how it can be done:

If you run this in a Jupyter Notebook cell, Shapely will draw a small (SVG?) picture of it in the cell output.

The world being what it is, and given that GIS data is involved, chances are the GeoJSON file wont be in a convenient projection. Converting it can be done using pyproj like so (as reported in the Shapely docs):

Example Result:

--

--