title: Python - Shapely large shapefiles
body: <p>I am reading in a GeoJSON file that contains two simple polygon descriptions that I made and six complicated vectors from <a href="http://ryanmullins.org/blog/2015/8/18/land-area-vectors-for-geographic-combatant-commands" rel="nofollow noreferrer">http://ryanmullins.org/blog/2015/8/18/land-area-vectors-for-geographic-combatant-commands</a></p>
  
  <p>I can read my own 4-8 point description into Shapely Polygons. However, the more complicated descriptions from the website above give me the following error:</p>
  
  <pre><code>from shapely.geometry import Polygon
  
  jsonFile="path/to/file.json"
  
  with open(jsonFile) as f:
      data=json.load(f)
  
      for feature in data['features']:
          #This is not how I'm saving the polygons, and is only for testing purposes:
          myPoly=Polygon(feature['geometry']['coordinates'])
  </code></pre>
  
  <p>The error message:</p>
  
  <pre><code>File "/.../anaconda2/lib/python2.7/site-packages/shapely/geometry/polygon.py", line 229, in __init__
  self._geom, self._ndim = geos_polygon_from_py(shell, holes)
  
  File "/.../anaconda2/lib/python2.7/site-packages/shapely/geometry/polygon.py", line 508, in geos_polygon_from_py
  geos_shell, ndim = geos_linearring_from_py(shell)
  
  File "/.../anaconda2/lib/python2.7/site-packages/shapely/geometry/polygon.py", line 454, in geos_linearring_from_py
  assert (n == 2 or n == 3)
  
  AssertionError
  </code></pre>
  
  <p>They are read as <strong>list</strong>, with USAFRICOM having length 113.</p>
  
  <p>Is there a way to read these very long vectors into shapely? I have tried Polygon, MultiPoint, asMultiPointIf. If not, would you be able to suggest how to simplify this vector description into something that could be read by Shapely? </p>