title: Resampling a raster using rasterio - simple modification of grid spacing
body: <p>I am resampling raster data using Python's rasterio. Looking at the <code>rasterio.enums.Resampling</code> class, it appears the only way to do this is to interpolate between adjacent raster grids, essentially smoothing the data.</p>
  <p>Is there some way to do a simple upsampling that effectively divides one raster grid into many and preserves the original value for all of the sub-grids?</p>
  <p>My resampling script is as follows - currently using the bi-linear method:</p>
  <pre><code>with rasterio.open(str(rasterpath+filename), crs=&quot;EPSG:4326&quot;) as src:
      data = src.read(
          out_shape=(
              src.count,
              int(src.height * upscale_factor),
              int(src.width * upscale_factor)
          ),
          resampling=Resampling.bilinear)
  
  # scale image transform
      transform = src.transform * src.transform.scale(
          (src.width / data.shape[-1]),
          (src.height / data.shape[-2])
      )
  </code></pre>
  <p>Any suggestions? I would think some sort of treatment for discrete data would be built in but have not found it yet...</p>