title: How to convert a shapefile to a complete list of latitude and longitude points
body: <p>I'm trying to convert a shapefile to a list of latitude and longitude points that represent every point defined by the shapefile. Reading the file with <code>geopandas</code> and using the <code>.plot()</code> function displays these points as a graph, but I would like the raw points. I attempted to iterate through the polygons in <code>geopandas</code> <code>.geometry</code> and store all the points within the polygons. I plotted these points to test if they gave an accurate representation of the area, but they do not. I did all this with the following code:</p>
  
  <pre><code>import re
  import geopandas as gpd
  import matplotlib.pyplot as plt
  
  def geoToList(geodataframe):
      points = []
      for s in geodataframe.geometry:iq
          s = str(s)
          s = re.sub('[^0-9., ]+', '', s).split(',')
          s = map(lambda x: x.strip(), s)
          s = map(lambda x: (float(x.split()[0]), float(x.split()[1])), s)
          points.extend(list(s))   
      return points
  
  habitat = gpd.read_file('desktop/species_19377/species_19377.shp')
  #borough = borough.to_crs(epsg=4326)
  
  points = geoToList(habitat)
  x = [point[0] for point in points]
  y = [point[1] for point in points]
  
  plt.scatter(x, y)
  plt.show() #representation of the points in all polygons
  habitat.plot() #representtation of the points I want
  </code></pre>
  
  <p>I would like some function that returns a list of points that could be plotted and look identical to the output of <code>habitat.plot()</code></p>
  
  <p>My next idea is to store the graphs as images and assign the pixel values latitude and longitude values based on the scale of the graph, but I'm sure this is more complicated than it needs to be.</p>
  
  <p>Any help would be appreciated!</p>