title: Basemap Shapefile visualizing
body: <p>After creating some maps with Basemap I got enthusiastic. I want to integrate shapefile information, let's say a polygon, but there are some problems. I downloaded the boarders of bavarian villages here:</p>
  
  <p><a href="https://www.arcgis.com/home/item.html?id=b752861d1a08489b9a40337668d4367e" rel="nofollow">https://www.arcgis.com/home/item.html?id=b752861d1a08489b9a40337668d4367e</a></p>
  
  <p>Now I want to integrate a polygon for, let's say, Regensburg. I am able to fetch the information with this code, but I have a few problems</p>
  
  <pre><code>#!/usr/bin/env python
  
  from mpl_toolkits.basemap import Basemap
  import matplotlib.pyplot as plt
  import shapefile
  
  map = Basemap(projection='merc',
                resolution='l',
                area_thresh=0.01,
                llcrnrlon=9.497681, llcrnrlat=47.827908,
                urcrnrlon=12.683716, urcrnrlat=50.408517)
  
  map.drawcountries(color="gray")
  map.fillcontinents(color='#c8dfb0', lake_color='#53BEFD')
  map.drawmapboundary(color='black', linewidth=0.5, fill_color='#53BEFD')
  
  sf = shapefile.Reader("BY_Gemeinden/BY_Gemeinden_WM.shp")
  shapes = sf.shapes()
  records = sf.records()
  for record, shape in zip(records, shapes):
      if record[3] == "Regensburg":
          print(shape.shapeType)
          lons, lates = zip(*shape.points)
          print(record)
          print(lons)
          print(lates)
  
  plt.savefig("foo.eps")
  </code></pre>
  
  <p>The output looks like this:</p>
  
  <pre><code>5
  [797, 'BY', '6001', 'Regensburg', 'Regensburg', 'Freistaat
  Bayern','Oberpfalz', '09362000', '6.42920556908e+004',
  '8.05927936478e+007']
  1350746.04018
  6287601.12826
  </code></pre>
  
  <p>My Questions:</p>
  
  <ol>
  <li>I assume that <code>lon[1],lon[1]</code> is one point of the boarder. Obviously there are a lot more.</li>
  <li>How do I find out what the file says. What is <code>shapeType</code>? What are the numbers inside of <code>records</code>?</li>
  <li>The coordinates seem not to be in "standard" WGS84? What is it?</li>
  <li>Is there a quick way to paint the polygon?</li>
  </ol>
  
  <p>Thanks a lot!!!</p>