GACE UNIT-III
GACE UNIT-III
A spatial database is a database designed to store, manage, and retrieve information related to
objects in a spatial context, such as their location, shape, and size. This type of database is
optimized to handle complex spatial data types, relationships, and operations, such as points,
lines, polygons, and spatial indexing. Examples of spatial databases include PostGIS, Oracle
Spatial, and SQL Server Spatial. They are commonly used in geographic information systems
(GIS), mapping, and location-based services.
Data Storage
In an SDBMS, data is stored in a spatial database which is a type of database that has been
specifically optimized to store and manage spatial data. The data stored in an SDBMS includes
points, lines, polylines, polygon features, and other geographical features such as roads,
buildings, and rivers.
The data stored in an SDBMS is typically organized using a spatial index, which is a data
structure that enables the database to efficiently locate and retrieve spatial data based on its
location. This is achieved by dividing the data into smaller, more manageable units and
organizing them in a hierarchical structure.
SDBMS typically uses a coordinate-based data model, which represents geographical data as a
set of x, y, and z coordinates. This data model allows for precise location data and enables the
database to accurately perform spatial analysis and calculations, such as finding the nearest
point, calculating distances, and performing spatial join operations.
1. Object-Relational Model: This model uses a combination of both the relational and object-
oriented models to store and manage spatial data. It enables the storage of complex data
structures such as polygon and lines in the same database with other traditional data types.
2. Geodetic Model: This model uses a geographic coordinate system to represent spatial data. It
stores data as points, lines, and polygons in terms of longitude and latitude values. The
Geodetic Model is commonly used in Geographic Information Systems (GIS).
3. Raster Model: This model represents spatial data as a grid of cells or pixels. Each cell in the
grid contains a value that represents a feature in the real world. The Raster Model is
commonly used in remote sensing applications.
4. Network Model: This model represents spatial data as a network of interconnected nodes
and edges. It is used to represent transportation networks, water networks, and other complex
systems that have interconnections.
5. Entity-Relationship Model: This model is based on the relational database model and is
used to represent relationships between entities. It is commonly used to represent spatial data
as relationships between objects and their attributes.
6. Object-Oriented Model: This model uses object-oriented programming concepts to store
and manage spatial data. Objects are created as classes, and each object represents a feature
in the real world. The Object-Oriented Model is commonly used in 3D modelling
applications.
1. Spatial data storage: An SDBMS stores geographic and spatial data in a spatial format that
can be easily managed, accessed, and analysed.
2. Spatial data indexing: An SDBMS includes tools for indexing spatial data, allowing for fast
retrieval of spatial data based on geographic location and other criteria.
3. Spatial data analysis: An SDBMS includes tools for spatial data analysis, including the
ability to perform spatial queries, create maps, and perform spatial analysis on the data.
4. Spatial data visualization: An SDBMS includes tools for spatial data visualization, allowing
users to view and interact with the data in a visual format.
5. Spatial data management: An SDBMS includes tools for managing spatial data, including
data backup, data recovery, and data security.
Entity-Relationship model
The Entity-Relationship (ER) model is a conceptual data modeling technique used in Geographic
Information Systems (GIS) to represent real-world entities and their relationships within a spatial
database. It provides a way to visualize and organize the data that will be stored and managed in
the GIS.
Entities: Represent real-world objects or concepts that are of interest in the GIS database,
such as roads, buildings, rivers, or land parcels.
Attributes: Represent the characteristics or properties of an entity, like road name, building
height, river length, or land use type.
Relationships: Describe the connections between entities, such as "road belongs to a land
parcel," or "river flows through a region,".
Normalization in spatial database management systems refers to the process of organizing data in
a database into multiple tables to reduce data redundancy and improve data integrity. The goal is
to eliminate data anomalies that can occur when data is duplicated or inconsistent.
In a spatial database, the normalization process takes into account the spatial nature of the data,
which requires additional consideration for the relationships between data entities. For example,
a spatial database might contain tables for points, lines, and polygon features, each with their
own attributes. Normalization helps to ensure that these features are stored in separate tables and
that the relationships between them are managed properly.
Normalization is an important step in ensuring the quality and reliability of data in spatial
database management systems. It helps to ensure that data is stored in a consistent and organized
manner, reducing the risk of data anomalies and making it easier to maintain and update the data.
In Geographic Information Systems (GIS), the way we represent real-world geographic features
and their characteristics in a digital format is crucial for analysis and visualization. This involves
two key concepts: GIS Data Models and GIS Data Structures.
A GIS data model is a conceptual framework that defines how geographic features are
represented in a GIS. It's an abstraction of the real world, determining the types of entities, their
attributes, and the relationships between them.
A GIS data structure refers to the way data is physically organized and stored within a computer
system to implement a particular data model. It defines how the spatial and attribute information
are linked and accessed.
Vector data structures represent spatial data using discrete features like points, lines, and
polygons, each described by their coordinates. These features are stored as individual objects
with associated attributes. This approach is particularly useful for mapping discrete objects with
definite boundaries, such as roads, buildings, or land parcels.
It represents geographic features as discrete objects using geometric primitives:
Points: Represent locations (e.g., cities, wells). Defined by a single coordinate pair.
Lines (Arcs or Edges): Represent linear features (e.g., roads, rivers). Defined by a series
of connected coordinate pairs.
Polygons (Areas): Represent enclosed areas (e.g., lakes, land parcels). Defined by a
closed loop of connected coordinate pairs.
Precise location: Vector data can accurately represent the locations of discrete features.
Small file size: Vector data typically requires less storage space compared to raster data.
Flexible for analysis: Vector data is well-suited for spatial analysis, such as finding distances,
areas, or performing topological operations.
Raster data in GIS represents geographic information as a grid of cells or pixels, where each cell
contains a value representing a specific attribute of that location. The way this grid and the
associated data are organized and stored is referred to as the raster data structure.
Core Concepts:
Cells (Pixels): The fundamental building blocks of a raster. Each cell represents a
specific area on the ground and holds a single value representing an attribute at that
location (e.g., elevation, temperature, land cover code).
Grid: A regular array of cells arranged in rows and columns. This structure defines the
spatial extent and resolution of the raster data.
Spatial Resolution: The size of each cell on the ground. A finer resolution (smaller cell
size) captures more detail but results in a larger dataset.
Bands: In multi-spectral imagery (like satellite images), a raster dataset can have
multiple bands, each representing the reflectance of the area in a specific portion of the
electromagnetic spectrum. These bands are often stored as layers within the raster data
structure.
Value Type: The type of data stored in each cell (e.g., integer for land cover categories,
floating-point for temperature).
1. Cell-by-Cell Encoding (Direct Raster Encoding): Values for each cell are stored
sequentially, typically row by row (Row-Major Order) or column by column (Column-
Major Order). A header usually precedes the data, containing information like the number
of rows and columns, cell size, and spatial reference.
2. Run-Length Encoding (RLE):Instead of storing each cell value, RLE records sequences
(runs) of identical cell values along a row (or sometimes a column). It stores the value
and the number of consecutive cells with that value.
o Example: A row with values 1, 1, 1, 2, 2, 2, 2, 1, 1 would be encoded
as (1, 3), (2, 4), (1, 2).
3. Quadtree Encoding: A hierarchical, tree-based structure. The entire raster is initially
treated as one block. If the block is not homogeneous (contains different values), it's
divided into four equal quadrants. Each quadrant is then examined, and if non-
homogeneous, it's further subdivided. This continues until each block is homogeneous or
a predefined level of resolution is reached. Each node in the quadtree represents a block,
and leaf nodes represent homogeneous blocks with their value.
4. Block Encoding (or Region Encoding):Identifies and stores contiguous rectangular (or
sometimes more complex polygonal) blocks of cells that share the same value. Each
block is defined by its value, the coordinates of its top-left corner (or another reference
point), and its dimensions (width and height).
5. Raster File Formats (Implementation-Specific Structures): As mentioned before,
various file formats implement specific ways of organizing and storing raster data on
disk. These formats often incorporate a combination of the above encoding techniques
along with metadata (spatial reference, compression information, etc.).
Applications
Attribute data
Attribute data also known as non-spatial data, describes the characteristics and properties
of geographic features represented in a GIS. While spatial data tells us "where"
something is (its location, shape, and extent), attribute data tells us "what" it is, "how
much" there is, "when" it was recorded, and other descriptive information.
Types of Attribute Data: Attribute data can be categorized based on their level of measurement,
which influences the types of analysis that can be performed:
Nominal: Categorical data where values are names or labels with no inherent order or
ranking (e.g., land use type: residential, commercial, industrial; road type: highway, local,
gravel). You can count frequencies and determine the mode.
Ordinal: Categorical data with a meaningful order or ranking, but the intervals between
values are not necessarily equal or measurable (e.g., soil drainage class: poorly drained,
moderately well-drained, well-drained; road condition: poor, fair, good). You can
determine the median and percentiles in addition to the mode and frequencies.
Interval: Numeric data where the order and exact differences between values are
meaningful, but there is no true zero point (e.g., temperature in Celsius or Fahrenheit,
elevation above sea level). You can calculate means and standard deviations, and perform
addition and subtraction. Ratios are not meaningful.
Ratio: Numeric data with a meaningful order, exact differences between values, and a
true zero point, allowing for meaningful ratios (e.g., population, area, distance, rainfall).
You can perform all mathematical operations, including multiplication and division.
Provides Context: Attribute data adds meaning and context to the spatial features,
making maps and analyses more informative.
Enables Analysis: Attribute data is essential for performing various spatial analyses,
such as querying features based on specific criteria, calculating statistics, and identifying
patterns and relationships.
Facilitates Symbolization and Labeling: Attributes are used to control how features are
displayed on a map (e.g., different colors for different land use types, labels showing city
names or population).
Supports Decision-Making: By providing detailed information about geographic
features, attribute data helps users make informed decisions in various fields like urban
planning, environmental management, and resource allocation.
Geo-Database
A geo-database is a database that stores and manages geographic data, including spatial and
attribute data. It provides a structured way to store, query, and analyze geospatial information.
Characteristics of a Geodatabase:
Centralized Data Management: Provides a single environment to manage all GIS data,
reducing redundancy and improving organization.
Support for Diverse Data Types: Can store vector data (points, lines, polygons), raster
data (imagery, grids), attribute tables, topological relationships, networks, and more.
Relational Structure: Often built upon a relational database management system
(RDBMS) like PostgreSQL, Oracle, SQL Server, or a file system (in the case of file
geodatabases). This allows for efficient querying and management of data.
Topology and Integrity Rules: Enables the definition and enforcement of spatial
relationships (e.g., no overlaps between land parcels) and data integrity rules, ensuring
data quality.
Advanced GIS Functionality: Supports complex GIS operations like network analysis,
geometric networks, terrain modeling, and versioning (tracking changes over time).
Scalability: Geodatabases can range from small, single-user file-based systems to large,
multi-user enterprise systems.
Object-Oriented Model (in some implementations): Some geodatabases, like Esri's
ArcGIS Geodatabase, utilize an object-oriented model that allows for the creation of
feature classes with specific behaviors and relationships.
Advantages of Geodatabase:
Improved Data Organization: Keeps all related GIS data together in a structured way.
Enhanced Data Integrity: Allows for the definition and enforcement of rules to
maintain data accuracy and consistency.
Efficient Data Management: Simplifies tasks like backup, sharing, and updating data.
Support for Advanced Analysis: Enables complex spatial analysis that relies on
relationships and topology.
Better Performance: Optimized for querying and retrieving spatial and attribute data.
Metadata
Metadata literally means "data about data." In the context of GIS, it's the descriptive
information that documents the spatial and attribute datasets within a geodatabase (or any other
GIS data source). Think of it as the "who, what, when, where, why, and how" of your GIS data.
Geodatabases often include metadata records associated with each data object or feature
within the database.
This metadata provides context and information about the data, enabling efficient data
management and reuse.
By integrating metadata with geodatabases, users can easily discover, understand, and
utilize geospatial data for various purposes.