This is caused by the plotting function which only plots a sample of the pixels for speed reasons. You can tweak it. Here's a reproducible example taken from one feature from your shape: These coordinates are part of one feature in your data: ``` xy = structure(c(417476.8675, 417468.8832, 417473.037, 417458.7495, 417352.3868, 417328.5742, 417318.52, 417303.7033, 417293.8735, 5887737.1296, 5887834.9375, 5887938.579, 5888021.6583, 5888042.825, 5888022.7166, 5887966.6249, 5887940.1665, 5887907.6158), .Dim = c(9L, 2L), .Dimnames = list(NULL, c("x", "y"))) ``` and we make a `SpatialLines` object out of it: ``` ltest = SpatialLines(list(Lines(list(Line(xy)),ID=1))) ``` we'll use a raster with a much larger extent: ``` e = extent(c(xmin=414500,xmax=424500,ymin=5882000,ymax=5890000)) ``` Now try and rasterize over a fine grid on that raster: ``` r5 <- raster(ncol=4000, nrow=4000, extent(e)) rtest = rasterize(ltest,r5) plot(ltest) plot(rtest,add=TRUE) ``` [![enter image description here][1]][1] That only shows a few pixels. But... > sum(rtest[],na.rm=TRUE) [1] 299 tells me there's 299 pixels. Change the `maxpixels` value to plot and: > plot(ltest) > plot(rtest,add=TRUE,maxpixels=ncell(rtest)) it looks fine: [![enter image description here][2]][2] Note the pixels seem much smaller than in the first plot, because I think when it subsamples them it also rescales them in size so they are visible in a full plot - that makes them way too big in a zoomed plot. Any analysis you do with this raster will work fine, its only plotting that's affected and then you can fix that with `maxpixels`. Its not a bug despite what my earlier version may have said! [1]: https://i.sstatic.net/cMggC.png [2]: https://i.sstatic.net/xJp3b.png