title: Add SpatialPointsDataFrame and SpatialLinesDataFrame to raster plot
body: <p>I need to convert a shape file into a raster and have absolutely no clue where to even start. </p>
  
  <p>If anyone could help me out I'd really appreciate!</p>
  
  <p>Update: I have found out about the 'readOGR'-function, but everytime I use it I get the following message:</p>
  
  <pre><code>Warning messages:
  1: In readOGR(dsn = "C:/Users/Giaco/Dropbox/Random Walk/Waterbodies",  :
    Dropping null geometries: 308, 309
  2: In readOGR(dsn = "C:/Users/Giaco/Dropbox/Random Walk/Waterbodies",  :
    Z-dimension discarded
  </code></pre>
  
  <p>Can somebody tell me what that means? </p>
  
  <p>Edit: </p>
  
  <pre><code>altdata &lt;- raster("altitude.tif")        
  plot(altdata)
  Lotic &lt;- readOGR(dsn="C:/Users/Giaco/Dropbox/Random Walk/Waterbodies",layer="Lotic")
  Lentic &lt;- readOGR(dsn="C:/Users/Giaco/Dropbox/Random Walk/Waterbodies",layer="Lentic")
  </code></pre>
  
  <p>How can I plot the raster "altdata", the SpatialPointsDataFrame "Lentic" and the SpatialLinesDataFrame "Lotic" all in one plot ?</p>
  
  <p>Edit: </p>
  
  <pre><code>altdata
  class       : RasterLayer 
  dimensions  : 1286, 963, 1238418  (nrow, ncol, ncell)
  resolution  : 15, 15  (x, y)
  extent      : 90938.29, 105383.3, 190000, 209290  (xmin, xmax, ymin, ymax)
  coord. ref. : +proj=tmerc +lat_0=39.66666666666666 +lon_0=1 +k=1 +x_0=200000 +y_0=300000 +ellps=intl +pm=-9.131906111111112 +units=m +no_defs 
  data source : C:\Users\Giaco\Dropbox\Random Walk\altitude.tif 
  names       : altitude 
  values      : -32768, 32767  (min, max)
  
  &gt; Lentic 
  class       : SpatialPointsDataFrame 
  features    : 182 
  extent      : -108473.2, -95455.86, -107870.9, -91344.22  (xmin, xmax, ymin, ymax)
  coord. ref. : +proj=tmerc +lat_0=39.66825833333333 +lon_0=-8.133108333333334 +k=1 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs 
  variables   : 3
  names       : Presence,     Type, Accessible 
  min values  :        0, Fountain,          0 
  max values  :        1,     Well,          2 
  &gt; Lotic
  class       : SpatialLinesDataFrame 
  features    : 317 
  extent      : -108956.5, -93832.44, -108979.5, -90747.34  (xmin, xmax, ymin, ymax)
  coord. ref. : +proj=tmerc +lat_0=39.66825833333333 +lon_0=-8.133108333333334 +k=1 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs 
  variables   : 1
  names       : Presence 
  min values  :        0 
  max values  :        1 
  </code></pre>