Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

What are raster and vector data in the GIS context? In general terms what applications, processes, or analysis are each suited for? (And not suited for!)

In answering someone's question today, I wanted to point to a resource giving a general overview of these primary data representations, and to my surprise I couldn't find something like this overview written with GIS in mind. Let's fix that.

Update: Anyone have some small, concise, effective pictures which convey and contrast these two fundamental data representations? The answers so far are great, technical, correct, and wordy. For people new to the idea of raster and vector it will be easier to absorb the details if they have images to reference them to.

share|improve this question
1  
That makes me remeber of an old precision agriculture toolbox built over ArcView3.2, it was called -SSToolbox-. Since it wasn't able to display rasters, it displayed interpolated maps with a lot of small vector squares. I don't have to say that the results were aways disastrous. That was a clear example of vector data misuse. By the way it's licence used to cost about $20000 in the year 2000. –  Pablo Mar 11 '11 at 3:21
6  
There is the old adage related to analysis, "Raster is faster, but vector is correcter..." –  DavidF Mar 11 '11 at 5:15
5  
Thanks David. :) There's a variant attributed to C. Dana Tomlin that goes "Yes raster is faster, but raster is vaster, and vector just seems more correcter." (ref) –  matt wilkie Mar 11 '11 at 18:17
2  
@Pablo, there's material there for an answer, or perhaps better yet a question, "what are representative, educational, examples of vector data misuse?" –  matt wilkie Mar 11 '11 at 18:37
1  
@matt A couple years ago I gave a talk prefaced by a discussion of this issue. (Its purpose was to get GIS professionals to stretch their minds a little bit and think about raster/vector issues outside the limiting context of their software capabilities.) Does anything in it match what you're looking for? quantdec.com/Articles/structure/SpatObj.pdf –  whuber Mar 11 '11 at 22:06
show 5 more comments

5 Answers

Vector Data

Advantages : Data can be represented at its original resolution and form without generalization. Graphic output is usually more aesthetically pleasing (traditional cartographic representation); Since most data, e.g. hard copy maps, is in vector form no data conversion is required. Accurate geographic location of data is maintained. Allows for efficient encoding of topology, and as a result more efficient operations that require topological information, e.g. proximity, network analysis.

Disadvantages: The location of each vertex needs to be stored explicitly. For effective analysis, vector data must be converted into a topological structure. This is often processing intensive and usually requires extensive data cleaning. As well, topology is static, and any updating or editing of the vector data requires re-building of the topology. Algorithms for manipulative and analysis functions are complex and may be processing intensive. Often, this inherently limits the functionality for large data sets, e.g. a large number of features. Continuous data, such as elevation data, is not effectively represented in vector form. Usually substantial data generalization or interpolation is required for these data layers. Spatial analysis and filtering within polygons is impossible

Raster Data

Advantages : The geographic location of each cell is implied by its position in the cell matrix. Accordingly, other than an origin point, e.g. bottom left corner, no geographic coordinates are stored. Due to the nature of the data storage technique data analysis is usually easy to program and quick to perform. The inherent nature of raster maps, e.g. one attribute maps, is ideally suited for mathematical modeling and quantitative analysis. Discrete data, e.g. forestry stands, is accommodated equally well as continuous data, e.g. elevation data, and facilitates the integrating of the two data types. Grid-cell systems are very compatible with raster-based output devices, e.g. electrostatic plotters, graphic terminals.

Disadvantages: The cell size determines the resolution at which the data is represented.; It is especially difficult to adequately represent linear features depending on the cell resolution. Accordingly, network linkages are difficult to establish. Processing of associated attribute data may be cumbersome if large amounts of data exists. Raster maps inherently reflect only one attribute or characteristic for an area. Since most input data is in vector form, data must undergo vector-to-raster conversion. Besides increased processing requirements this may introduce data integrity concerns due to generalization and choice of inappropriate cell size. Most output maps from grid-cell systems do not conform to high-quality cartographic needs.

share|improve this answer
add comment

Pixels vs Coordinates When I think Raster maps, my first thought is satellite imagery. Almost every pixel in a detailed satellite image of a urban area could contain unique information. A single tile in a web map (typically a variant of Mercator loosely referred to as "Spherical Mercator" or "Web Mercator" and supported by Google, Bing, Yahoo, OSM and ESRI)typically has 256 x 256 = 65,536 pixels, and each zoom level has (2^zoom * 2^zoom) tiles. When I think Vector, I think polygons and lines. For example, a shape file detailing zoning boundaries of an entire city (potentially millions of Raster tiles) area might only have 65,000 Vector shapes.

Accurate Scaling It sounds like you (and probably most readers) already know the most obvious difference between raster fixed pixels and vector (coordinate maps). Vector drawings (and maps) can scale with a higher degree of fidelity than pixels because vector data contains coordinate patterns (points, polygons, lines etc) that can rendered relative to each other at different resolutions using simple formulas, while pixel resizing typically uses a smoothing algorithm that results in image artifacts.

Image Compression vs Structure Compression In practice, most images don't have 100% unique pixels can be compressed into smaller data packets, and many vector files contain excess detail that is not needed at many low detail zoom levels. Image compression is a well known and very pretty efficient process and almost every coding library has built in classes to do this work. Vector coordinate compression, or "geometry simplification" is a bit less common (as GIS in general is a bit less common than general image manipulation). In my experience you will spend close to 0 time thinking about image compression (simply turn it off or on) and considerably more time thinking about spatial compression. Check out the Douglas Peucker Algorithm for examples, or just play around with QGIS and some Census boundary files.

Client vs Server Side Rendering Eventually everything viewed on a computer is rendered into pixels on the screen at a particular resolution (ie zoom level). Often (especially on the web) the challenge is getting those pixels in front of users as efficiently as possible. The US Census Tract & Block group shape files are particularly interesting because they are just over the boundary of vector datasets that are 'too big' to render in a web browser as vector data. In, contrast US Counties can just barely be rendered in modern browsers as a vector download. While a US Census Block Group vector shape file would certainly be smaller than a raster tileset rendered to cover the entire US at multiple zoom levels, the Block Group Shape file is too large (close to 1GB) for a web browser to download in demand. Even if the web browser could download the file quickly, most web browsers (even using flash) are quite slow when rendering huge numbers of shapes. So, for viewing large vector datasets, you are often better off translating them into compressed images for transmission to the web browser.

Some Practical Examples I answered a similar question a few days ago about rendering large datasets in google maps. You can see the question and a detailed analysis of "best practice" as used by the NY Times and others today here.

A few years ago decided to transition away from flash heavy client side vector rendering towards server side vector rendering that delivers compressed image tiles to pure html & JavaScript. We have a map gallery with several versions of Html+Raster (Server Generated Image Tiles) and Flash+Vector (client side heavy rendering).

share|improve this answer
6  
Does the "soothing algorithm" involve scented candles? :-) –  whuber Mar 11 '11 at 3:50
    
"that delivers compressed vector tiles" ... I think you mean raster tiles. –  underdark Mar 11 '11 at 7:45
    
typos fixed. @whuber I amused by your comment and tempted to leave the Candles in :-) –  Glenn Mar 11 '11 at 11:25
add comment

It sounds like you are looking for a way to express this to non-technical people, perhaps? You could use an analogy to two childhood items, graph paper and a connect-the-dots puzzle. Each square in a sheet of graph paper corresponds to a raster cell, so imagine coloring each square in, or putting a number in it. Vector data is a connect-the-dots puzzle. In both cases, each layer is simply another sheet of paper.

share|improve this answer
add comment

Showing the same data in both formats can sometimes be helpful in understanding their inherent differences:

Raster vs. Vector vs. Real Life

I got a kick out of this, later in the same .pdf presentation: Minesweeper Example of analysis Source : Juniper GIS

share|improve this answer
1  
I tend to shy from answers with many, bulky graphics; too many page downs for the amount of info to absorb. Minesweeper as an illustration of 3x3 analysis at work is great though! Thanks. –  matt wilkie Jun 8 '12 at 15:57
add comment

It is better to think of raster data as a special type of vector data. In vector data the lines on the map are determined by a particular phenomena. In raster data this delineation is defined by an arbitrary grid that is independent of the phenomena it is attempting to map. Typically this grid is a result of the way a particular sensor captures information (such as a camera). But in all cases raster data can also be represented by vector.

share|improve this answer
    
It is so unusual to characterize raster data as an instance of vector data that you should consider amplifying and justifying this assertion. –  whuber Mar 11 '11 at 15:27
    
@whuber I agree that my justification is lacking. It is technically true that raster can be expressed in a vector form. That fact helps understanding, but is perhaps not practically useful. –  Matthew Snape Mar 11 '11 at 16:38
    
I don't see how thinking of raster as a specialised type of vector is helpful to understanding. Could you please elaborate on how this perspective has helped you? –  matt wilkie Mar 11 '11 at 18:25
    
its useful because it encourages an open minded approach to using tools. GIS is littered with data that is specialised for a particular use such as TIN's, networks or even place names. They can all be expressed in terms of simple geometry, and rasters are no different. A good example is using a raster as an index for a vector dataset. It is counter intuitive, and also massiely faster for simple identify operations. –  Matthew Snape Mar 12 '11 at 9:11
    
Although vector data can look like raster data on a map, the two are fundamentally different for analysis. The proof lies in considering some basic capabilities. E.g., for a raster of n cells, obtaining the value at an arbitrary row and column index is done with a random-access lookup taking O(1) time. With a vector representation, the same values require lookup through an index, taking O(log(n)) time. Another example: shifting a raster takes O(1) time, because only its origin coordinates must change. The same shift in a vector representation is O(n). –  whuber Apr 23 '13 at 20:17
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.