[GIS] Is raster lossy and vector not lossy

compressionfile formatsrasterstoragevector

I am new to GIS, in school for it actually, but I come from a photography / graphic design background. So that said, I always thought that vector graphics were not lossy (scale up or down, doesn't matter) and raster graphics were lossy (or have the potential for being lossy if attempted to scale up). It's certainly true in the graphic design world, do the same rules apply to GIS?

Earlier when I was explaining to someone on another website that one of the differences between "raster vs vector" was that they were "lossy vs not-lossy" respectively, another person felt the need to jump in with this:

"You are not correct.

First, raster is usually performed at a fixed
resolution and is only lossy with some compression techniques. It's
the compression technique, not the raster, which is lossy. Because of
compression and difficulty of displaying a variable dataset in vector
without losing information, some rasters are more efficient than
vectors in displaying info.

Second, vectors can be lossy based on line and area simplification techniques
where unnecessary points are removed because they aren't relevant for
display scale. It can also be lossy in the precision of a coordinate"

Not really sure what some of that language even means.

Can someone here clarify which one is lossy and which is not lossy?

Best Answer

These definitions you're using are not accurate:

  • not lossy (scale up or down, doesn't matter)
  • lossy (or have the potential for being lossy if attempted to scale up)

"Scale up or down, doesn't matter" is a defining characteristic of vector formats and has nothing to do with "lossy" vs "lossless". Similarly, how a raster looks when it's scaled up has nothing to do with whether it's lossless or lossy, it looks different when scaled up because rasters are based on cells(pixels) and scaling them up makes the pixels bigger.

The terms "lossless" and "lossy" apply to data compression techniques. So rasters can be either lossless or lossy depending on the format and the compression scheme used. A TIFF file, for example, can be created with no compression at all, lossless compression using LZW or PackBits, or lossy compression with JPEG. The Esri GRID raster format is compressed using lossless compression and the format doesn't support lossy compression at all.

Vector formats are not "lossy" in the same sense a JPEG is. The person you're quoting is stretching the definition of "lossy" to include things like line smoothing, which does have the effect of making a vector dataset smaller but isn't really a data compression scheme like JPEG is.

Related Question