1. GIS data
All (computer) data files are of two types:
ASCII: easily read, edited, exchanged but bulky for graphics data
Binary: require specific software to read, more compact than ASCII.
GIS spatial data (usually binary) can be raster or vector:
Vector data are based on features and have x and y coordinates
You are able to ask questions such as: What are the characteristics of this feature ?
Raster data are based on pixels, with a grid like system of rows and columns.
We can ask questions such as: What is at this location ?
2. Raster data model
For each layer, each grid cell (pixel) contains one numeric value:[(0-1), 0-255 (8 bit), 0-65536 (16 bit), row by row]
- Simple 'grid' structure of rows and columns.
- Based on cells or picture elements (pixels).
- Linear feature (e.g. a road) is a contiguous sequence of cells.
- Resolution is based on size of cell -> the smaller the cell, the higher the resolution..
Header information (which may be a separate file, or at the start of the data file); includes information on:
- number of rows and columns.
- X and Y coordinate of upper left and lower right corners.
- pixel size should be in round values, e.g. 10, 25, 250, 1000 metres
- georeferencing is 'implicit' (based on header information)
- A simple data structure.
- Overlay operations are straight forward.
- High spatial variability is efficiently represented (e.g. relief).
- Only raster can easily store image data (e.g. photos).
- Data structure is not compact
- Map output can appear 'blocky'.
Example: .jpg , .tif (image) and .tfw (world file) ; or geotiff (georeferenced)
3. Vector Data model
- Features are coded as points, lines (arcs) and areas (polygons).
- Defined by single points, connected nodes, and arcs.
- Vector files contain information attached to features.
- georeferencing is explicit - coordinates on each point or vertex
- Compact data structure for homogenous areas.
- Efficient encoding of topology.(= containment, contiguity, connectivity)
- Better suited for map output.
- More complex data structure.
- Cannot store (continuously varying) image data.
Example: shapefiles - consists of at least three files: .shp .shx .dbf ( also for projections: .prj )
CAD files: .dgn (Microstation), .dxf (Autocad)
4. Conversion Between Raster & Vector
Rasterisation: Vector -> Raster (scanning)
Vectorisation: Raster -> Vector
- Place grid cell over 'map': simple conversion.
- Code whether a feature lies in a cell or not in a cell.
- Simple process: main decision is the size of the cell to be produced
- 'Thread' a line through similar pixels: more complex process.
- Use thinning and linking, requires editing.
- Complex process: depends on available software coversion algorithm. ('R2V')
5. Attribute data
Non-spatial attribute data refers to qualities (i.e. "what is it") not the locational information of the feature(s). Vector Data attributes correspond to the three types of classification recognised in cartography: nominal, ordinal and interval.
Table 4-1 : Types of non-spatial attributes
||Pine, Spruce, NDP, Lib
| 3.69 4.128 3.00
||1, 2, 3, 4, 5 ... 10000..
Text is case-sensitive: 'Pine' and 'pine' are as different as 'pine' and 'larch'
Integers can be short (16 bit) or long (32 bit)
Float can be single or double precision
Most queries and analysis relies on the presence of attribute information (e.g. how much pine?)
6. Attribute Tables
- Attributes are stored in an Attribute Table.
- Every vector layer MUST have an associated table
- These are linked to spatial data by a feature code number ('id').
- Attributes are stored in columns as 'items'
- Rows display the attributes for each feature and are known as 'records'
- Queries can be based on records (what is here?), or items (how often does this occur?)
These can be stored in an associated GIS database (within the software), an external database (e.g. Oracle), a standard database or spreadsheet (Access, Excel), a text file (e.g. .csv: comma separated values)
Perhaps the prime reason GIS has become dominated by vector data is the need to manage attributes.
This shows an example from forestry: table legend map
Things you should know after finishing this lecture:
- Why are vector data structures more complex than raster ?
- Which is easier: vector -> raster conversion or vice versa ?
- Describe or list two advantages of vector data over raster
- Describe or list two advantages of raster data over vector