title: terra_rasterize Error: [rasterize] cannot create dataset
body: <p>I am trying to use the <strong>rasterize</strong> function in the <strong>R</strong> package <strong>terra</strong> (v.1.6-7) to transfer population values associated with municipalities to a raster. I am doing this for two shapefiles, <code>dipomun00gw.shp</code> and <code>municipiosPOP.shp</code>. This is the code:</p>
  <pre><code>library(terra)
  
  # Read shapefiles for 2000 and 2010
  v_00 &lt;- vect(&quot;dipomun00gw.shp&quot;)
  v_10 &lt;- vect(&quot;municipiosPOP.shp&quot;)
  
  # create blank rasters using each year's shape file as extent
  r_00 &lt;- rast(v_00, res=.01)  
  r_10 &lt;- rast(v_10, res=.01)  
  
  # Rasterize
  x_00 &lt;- rasterize(v_00, r_00, &quot;POTO00&quot;)
  x_10 &lt;- rasterize(v_10, r_10, &quot;POB_10&quot;)  
  #Error: [rasterize] cannot create dataset
  </code></pre>
  <p>For some reason, <code>v_00</code> rasterizes without any issues, but <code>v_10</code> produces the an error.</p>
  <p>I cannot identify what characteristic of the shapefile <code>municipiosPOP.shp</code> is causing this error.</p>
  <p>Does anyone know what is going on?</p>
  <p>Shapefiles can be accessed <a href="https://drive.google.com/drive/folders/1yS1KTGX0zLewfyL08jh8m3ZI2CPOzg2U?usp=sharing" rel="nofollow noreferrer">here</a>.</p>