Ii Unit Gis
Ii Unit Gis
In GIS (Geographic Information Systems), the database structure for spatial data models is
designed to effectively manage and query both spatial and attribute data. Understanding how
these data models are structured helps in the efficient management of GIS data. Here’s a detailed
look at the database structure in spatial data models:
Tables: Each vector layer is typically represented as a table in a database. Each row
corresponds to a spatial feature, and each column represents an attribute.
o Geometry Column: Stores spatial data, often in a format like WKT (Well-
Known Text), WKB (Well-Known Binary), or as binary blobs in relational
databases.
o Attribute Columns: Store non-spatial information about each feature (e.g., name,
population).
Spatial Indexes: Improve the performance of spatial queries. Common spatial indexes
include:
o R-trees: Used for indexing spatial objects by their bounding boxes.
o Quad-trees: Divide space into quadrants recursively for efficient querying.
o Geohash: Used in some spatial databases to index data in a grid-like fashion.
1.3. Example
In a PostgreSQL database with PostGIS extension, you might have a table cities with
columns:
o id (Primary Key)
o name (VARCHAR)
o population (INTEGER)
o geom (GEOMETRY, stores the spatial data)
Raster Grids: Represent spatial data in a grid format where each cell (or pixel) has a
value representing information like elevation, temperature, or land cover.
Raster Layers: Stored as raster files or within raster-enabled databases. Each raster layer
is often a separate dataset.
o Pixel Values: Stored in a grid structure where each pixel's value represents data.
o Metadata: Includes georeferencing information (e.g., coordinate system, cell
size).
Spatial Indexing: Raster databases use spatial indexing techniques to manage large
datasets and improve query performance.
2.3. Example
2. Database Implementation
a. Relational Databases
3.1. Structure
Tables: Represent vector layers with columns for spatial and attribute data.
Spatial Extensions: Extensions like PostGIS (PostgreSQL) or Oracle Spatial add support
for spatial data types and functions.
3.2. Example
b. NoSQL Databases
4.1. Structure
Documents: Store spatial data in formats like GeoJSON within NoSQL databases.
Collections: Group related documents, often with geospatial indexing capabilities.
Unit-II
SPATIAL DATA MODELS
4.2. Example
c. File-Based Databases
5.1. Structure
File Formats: Use specific file formats for storing spatial data.
o Shapefiles: Consist of multiple files (.shp, .shx, .dbf) to store geometry and
attributes.
o GeoTIFF: Stores raster data with embedded georeferencing information.
5.2. Example
Constraints: Ensure data adheres to specific rules, like topological rules to prevent
overlaps or gaps.
Validation: Automated checks to validate spatial data accuracy, like ensuring polygon
boundaries do not intersect incorrectly.
Query Functions: GIS databases provide functions for spatial queries, such as:
o Buffering: Creating a buffer zone around spatial features.
o Intersection: Finding overlapping areas between features.
o Distance Calculations: Measuring distances between spatial objects.
4.1. Example
The Relational Model and the Object-Oriented Model are approaches to managing
and organizing data, but they have different paradigms and characteristics. Here’s a comparison:
Relational Model:
1. Concept:
Based on: The relational model organizes data into tables (or relations). Each table is a
collection of rows (or tuples) and columns (or attributes).
Data Representation: Data is represented in a structured format with a fixed schema. Each table
has a primary key to uniquely identify rows, and foreign keys to establish relationships between
tables.
2. Data Manipulation:
Language: SQL (Structured Query Language) is used for querying and manipulating data.
Operations: Supports operations like SELECT, INSERT, UPDATE, DELETE, and JOIN.
3. Advantages:
4. Limitations:
Performance: Can be less efficient for very complex queries or large-scale applications due to
the overhead of joining tables.
Object-Relational Impedance Mismatch: Discrepancy between the relational model and object-
oriented programming models.
Unit-II
SPATIAL DATA MODELS
Object-Oriented Model:
1. Concept:
Based on: The object-oriented model organizes data using objects, similar to how data is
represented in object-oriented programming languages like Java or C++.
Data Representation: Data is encapsulated in objects, which have attributes (data) and methods
(functions). Objects can be organized into classes and can inherit properties from other classes.
2. Data Manipulation:
Language: There is no single standard language for object-oriented databases, but many use
query languages similar to SQL with object-oriented extensions.
Operations: Supports complex data models with rich relationships. Queries can be more flexible
in navigating these relationships.
3. Advantages:
Complex Data Representation: Better suited for applications with complex data structures, like
those involving hierarchies and relationships.
Encapsulation: Promotes better data abstraction and reuse through encapsulation and
inheritance.
Consistency with Programming: Aligns with object-oriented programming paradigms, reducing
the gap between application code and data storage.
4. Limitations:
Complexity: Can be more complex to design and manage due to the rich data models and
relationships.
Performance: May have performance issues in certain types of queries or operations compared
to relational databases.
6.ENTITIES:
In a spatial data model, entities are components that represent real-world objects or
phenomena and their spatial relationships. These entities help to structure and analyze spatial
data effectively. Here’s a breakdown of some key entities typically found in spatial data models:
Geometric Objects: Fundamental geometric entities used to describe spatial features. They
include points, lines, and polygons, and can be used to model more complex shapes like
multipolygons or multilines.
Topological Objects: Describe spatial relationships and connectivity between geometric objects.
For instance, adjacency (which features are next to each other) and connectivity (how features
are linked) are important in this context.
6.3. Attributes:
Spatial Attributes: Describe the geometric properties of spatial features, such as coordinates,
shape, size, and spatial relationships.
Non-Spatial Attributes: Provide additional information about spatial features, such as names,
types, and other descriptive details. For example, a road (spatial feature) might have attributes
like road type, speed limit, and name.
Proximity: Measures how close or far apart features are from each other. For example, the
distance between two buildings.
Containment: Determines whether one feature is inside another. For instance, a park being
within a city boundary.
Intersection: Identifies where two features overlap or cross each other. For example, where a
road intersects with a river.
Adjacency: Describes which features share a boundary. For instance, neighboring land parcels.
Coordinate Systems: Define how spatial data is mapped onto a surface. Common systems
include latitude/longitude (geographic coordinates) and UTM (Universal Transverse Mercator).
Projection Systems: Transform spatial data from a spherical surface (Earth) to a flat surface
(map), considering distortions in shape, area, distance, or direction.
Unit-II
SPATIAL DATA MODELS
6.6. Spatial Databases:
Geodatabases: Specialized databases designed to store and manage spatial data efficiently.
They often include features like spatial indexing, topology rules, and advanced querying
capabilities.
Raster Models: Represent spatial data as a grid of cells or pixels, each with a value. Useful for
continuous data like elevation or temperature.
Vector Models: Represent spatial data using discrete geometric shapes like points, lines, and
polygons. Ideal for data with distinct boundaries and attributes.
7. ER DIAGRAM:
An Entity-Relationship (ER) diagram in a spatial data model extends the traditional
ER diagram to incorporate spatial elements and relationships. This extension helps in modeling
the complexity of spatial data and its relationships effectively. Here's how you can think about
integrating spatial aspects into an ER diagram:
Entities:
1. Spatial Entities: Represent real-world objects with spatial characteristics. These entities
can include:
1. Point Entities: Represent specific locations (e.g., tree, landmark).
2. Line Entities: Represent linear features (e.g., road, river).
3. Polygon Entities: Represent areal features (e.g., park, building footprint).
2. Non-Spatial Entities: Represent objects or concepts that are not inherently spatial but
are related to spatial entities (e.g., building, vehicle).
Attributes:
1. Spatial Relationships: Define how spatial entities interact or are related in space.
Common types include:
1. Proximity: How close two spatial entities are.
2. Containment: Whether one spatial entity is inside another.
3. Intersection: Where two spatial entities overlap or cross.
4. Adjacency: Whether two spatial entities share a boundary.
2. Non-Spatial Relationships: Define how non-spatial entities are related to spatial
entities. For instance, a “Building” might be located at a “Plot” (a spatial entity).
Specify Attributes:
Establish Relationships:
1. Represent spatial entities with shapes (e.g., polygons for areas, lines for linear features)
in the diagram.
Unit-II
SPATIAL DATA MODELS
2. Use annotations to describe spatial relationships and attributes.
Entities:
o Building
Relationships:
o Located_In:
Non-Spatial Entity:
o Owner
o Has_Owner:
Building → Owner
Type: One-to-One or One-to-Many, depending on the context
Unit-II
SPATIAL DATA MODELS
7.4.Visual Representation:
8. DATA MODELS:
Geographical data models are essential for representing and analyzing spatial data, and
they typically fall into two main categories: raster models and vector models. Each has its
strengths and is suited to different types of spatial analysis and data representation. Here’s an
overview of these models and some additional data models that are relevant in the context of
geographical data.
Concept:
Representation: Spatial data is represented as a grid of cells or pixels, each with a specific value.
Resolution: The grid cells have a fixed size, and the resolution of the raster data depends on the
size of these cells.
Applications:
Continuous Data: Ideal for representing continuous phenomena such as elevation, temperature,
and land cover.
Remote Sensing: Commonly used for satellite imagery and aerial photography.
Characteristics:
Simple Structure: Each cell contains a value representing the attribute or measurement at that
location.
Spatial Analysis: Raster models support operations like map algebra, overlay, and buffering,
though they might be less efficient for certain types of analysis compared to vector models.
Examples:
Representation: Spatial data is represented using geometric shapes such as points, lines, and
polygons.
Precision: Provides high precision in representing discrete features.
Applications:
Discrete Data: Best for representing features with defined boundaries like roads, buildings, and
political boundaries.
Geographic Information Systems (GIS): Commonly used in GIS for detailed spatial analysis and
mapping.
Characteristics:
Detailed Representation: Points represent specific locations, lines represent linear features, and
polygons represent areas.
Spatial Relationships: Vector models support complex relationships like adjacency,
containment, and connectivity.
Examples:
Concept:
Combination: Integrate both raster and vector data models to leverage the strengths of each.
Flexibility: Allows for complex analyses that benefit from the continuous representation of
rasters and the precision of vectors.
Applications:
Integrated Analysis: Useful for tasks that require both continuous and discrete data, such as
land use planning and environmental modeling.
Characteristics:
Unit-II
SPATIAL DATA MODELS
Data Integration: Often involves converting data between raster and vector formats, depending
on the analysis needs.
Examples:
Land Use Planning: Combining raster land cover data with vector infrastructure data for
comprehensive analysis.
Concept:
Representation: Uses objects to model both spatial and non-spatial data with a focus on
encapsulation and inheritance.
Complex Structures: Allows for modeling complex spatial relationships and behaviors.
Applications:
Complex Data: Suitable for applications that involve complex data structures and behaviors,
such as urban planning and resource management.
Characteristics:
Examples:
Concept:
Representation: Focuses on the spatial relationships between features rather than just their
geometric shapes.
Topological Relationships: Includes relationships such as adjacency, connectivity, and
containment.
Applications:
Unit-II
SPATIAL DATA MODELS
Network Analysis: Useful for analyzing networks like transportation systems and utilities.
Spatial Consistency: Ensures that spatial relationships are maintained accurately.
Characteristics:
Topology: Maintains information about how spatial features are connected and interact with
each other.
Data Integrity: Ensures that spatial relationships and boundaries are consistent.
Examples:
Street Networks: Representing road networks with accurate connectivity and intersection
information.
Concept:
Representation: Organizes data into hierarchical levels or layers, often with parent-child
relationships.
Layered Approach: Each layer represents different types of data or different levels of detail.
Applications:
Multi-Level Analysis: Useful for applications that require analysis at different scales or levels of
detail.
Characteristics:
Layering: Data is structured in layers, each representing a different aspect of the spatial data.
Scalability: Allows for scaling up or down depending on the level of detail required.
Examples:
Land Use and Zoning Maps: Layers representing different zoning categories, land use types, and
infrastructure.
8.7.Summary
Raster Data Models: Ideal for continuous data and remote sensing.
Vector Data Models: Best for discrete features and detailed spatial analysis.
Hybrid Data Models: Combine raster and vector data for integrated analysis.
Unit-II
SPATIAL DATA MODELS
Object-Oriented Data Models: Model complex data structures with objects.
Topological Data Models: Focus on spatial relationships and network analysis.
Hierarchical Data Models: Organize data in layers for multi-level analysis.
Purpose:
To provide a high-level, abstract view of the spatial data and its relationships without focusing
on how the data will be physically stored or implemented.
Characteristics:
High-Level Abstraction: Captures the essential components of the GIS system, including key
spatial features and their relationships.
Focus: On understanding the types of data required, the relationships between different types
of data, and the rules governing these relationships.
Components:
Entities: Represent real-world objects or phenomena that need to be modeled (e.g., "Road,"
"Building," "Park").
Attributes: Describe properties of these entities (e.g., "Road" might have attributes like "Name,"
"Type," "Length").
Relationships: Define how entities interact or are related (e.g., "Road intersects Park," "Building
located in Park").
Example in GIS:
Entities:
Purpose:
To translate the conceptual model into a detailed structure that outlines how spatial data is
organized and related within the GIS system, independent of any specific technology or
database management system.
Characteristics:
Detailed Structure: Defines how data is logically organized, including tables, relationships, and
constraints.
Focus: On the logical representation of data and relationships, ensuring that all necessary data is
captured in a structured format.
Components:
Example in GIS:
Tables/Layers:
o Roads: Table with columns for "Road_ID," "Name," "Type," "Length," and spatial data
(geometry).
o Buildings: Table with columns for "Building_ID," "Name," "Height," "Footprint," and
spatial data (geometry).
o Parks: Table with columns for "Park_ID," "Name," "Area," and spatial data (geometry).
Relationships:
o Foreign Keys:
Building table might include a foreign key linking to the Parks table to indicate
the park in which the building is located.
o Spatial Relationships:
Unit-II
SPATIAL DATA MODELS
Intersection: Use spatial queries to determine if Roads intersect with Parks.
Purpose:
To define the specific implementation details of the data model within a particular GIS database
or system, including how the data is physically stored, accessed, and managed.
Characteristics:
Components:
Database Schema: Defines the actual structure of tables, fields, and relationships in the GIS
database.
Data Types: Specifies the data types for each field (e.g., INTEGER, VARCHAR, GEOMETRY).
Indexes: Implement spatial indexes for efficient querying and analysis (e.g., R-trees for spatial
indexing).
Constraints: Enforce data integrity and ensure valid spatial data (e.g., constraints to ensure valid
geometries and relationships).
Example in GIS:
Database Schema:
Road_ID: INTEGER
Name: VARCHAR
Type: VARCHAR
Length: FLOAT
Geometry: GEOMETRY (using spatial data types for storing line features)
Indexes:
o Spatial Index: Create a spatial index on the Geometry column of the Roads table to
speed up spatial queries.
Constraints:
Unit-II
SPATIAL DATA MODELS
o Check Constraints: Ensure that the Geometry column contains valid line geometries.
9.4.Summary
Conceptual Data Model: Focuses on the high-level abstraction of spatial data, including entities,
attributes, and relationships, without concern for implementation details.
Logical Data Model: Provides a detailed view of how data is organized logically within the
system, including tables, relationships, and normalization.
Physical Data Model: Defines the specific technical details of data storage and management,
including schema design, data types, indexes, and constraint.
Raster data compression can be broadly classified into two categories: lossless and lossy
compression.
1. Lossless Compression
Purpose:
To reduce file size without losing any of the original data. The compressed data can be restored
exactly to its original form.
Techniques:
Run-Length Encoding (RLE): Compresses sequences of the same value (runs) into a single
value and count. For example, a row with multiple consecutive pixels of the same color is
encoded as a single value and its count.
Huffman Coding: Uses variable-length codes for different pixel values based on their frequency
of occurrence. More frequent values are encoded with shorter codes.
LZW (Lempel-Ziv-Welch): A dictionary-based compression method that replaces repetitive
strings with shorter codes.
DEFLATE: A combination of LZ77 (dictionary compression) and Huffman coding. It is used in
formats like PNG and GeoTIFF.
Unit-II
SPATIAL DATA MODELS
Example Formats:
PNG (Portable Network Graphics): Uses lossless compression and is commonly used for raster
images in web applications.
GeoTIFF: A format for raster graphics that supports lossless compression methods like LZW and
DEFLATE.
2. Lossy Compression
Purpose:
To reduce file size by discarding some of the data, which may result in a loss of quality. The
compressed data cannot be perfectly restored to its original form.
Techniques:
JPEG Compression: Based on discrete cosine transform (DCT), it is widely used for
photographic images. It achieves high compression ratios by removing high-frequency content
that is less noticeable to the human eye.
Wavelet Compression: Uses wavelet transforms to decompose the image into different
frequency components, allowing for efficient compression. It is used in formats like JPEG2000.
Example Formats:
JPEG (Joint Photographic Experts Group): Uses lossy compression, often used for
photographs and satellite imagery where high compression ratios are needed.
JPEG2000: An improved version of JPEG that uses wavelet-based compression, providing better
quality and flexibility.
Compression Ratio:
o Compression Ratio is the ratio of the size of the uncompressed data to the size of the
compressed data. Higher ratios indicate more significant reductions in file size.
Data Quality:
o Lossless Compression preserves the original quality of the raster data, which is essential
for applications requiring high precision, such as scientific analysis.
o Lossy Compression can lead to a loss of detail and quality, which may be acceptable for
some applications like web maps or general visualization but not for detailed analysis.
Unit-II
SPATIAL DATA MODELS
Performance:
o Compression and Decompression Speed: Different algorithms have different speeds for
compressing and decompressing data. It’s essential to balance compression ratio with
processing time.
o Storage and Transmission: Compression reduces storage requirements and speeds up
data transmission, which is crucial for large datasets or when data needs to be transmitted
over networks.
Compatibility:
o Ensure that the chosen compression method is supported by the GIS software or tools
used for processing and analyzing the raster data.
Data
Grid of cells with values Points, lines, and polygons
Representation
Accuracy Less precise for discrete features Highly accurate for discrete features
Raster: A digital elevation model (DEM) representing terrain elevation would be best
represented as a raster because elevation changes smoothly across the landscape.
Vector: A city map showing street networks, building footprints, and land parcels would be best
represented as vector data because it requires precise boundaries and detailed attributes.
Unit-II
SPATIAL DATA MODELS
12. TIN AND GRID DATA MODELS:
In Geographic Information Systems (GIS), both Triangulated Irregular
Networks (TIN) and Grid data models are used to represent and analyze spatial data,
particularly for surfaces like elevation. Each model has its own advantages and is suited to
different types of spatial analysis and applications. Here’s a detailed comparison of TIN and Grid
data models:
Concept:
Grid-Based Representation: Also known as raster data model, it represents spatial data as a
matrix of cells (or pixels), where each cell contains a value representing some attribute of that
location.
Characteristics:
Uniform Grid: The grid is composed of evenly spaced cells arranged in rows and columns. Each
cell holds a value representing data for that spatial location.
Resolution: Determined by the size of the cells; smaller cells provide higher resolution and more
detail but also result in larger file sizes.
Advantages:
Simplicity: Easy to create and manage, especially for continuous data. Each cell is directly
related to its neighbors, simplifying data processing.
Ease of Analysis: Raster operations (e.g., map algebra, overlays) are straightforward due to the
uniform structure of the grid.
Continuous Data: Suitable for representing continuous surfaces such as elevation, temperature,
and precipitation.
Disadvantages:
Storage Requirements: High-resolution rasters can consume significant storage space due to the
large number of cells.
Loss of Detail: Less precise for representing discrete features (e.g., roads, building footprints)
because of the grid's inherent resolution limits.
Concept:
Characteristics:
Irregular Grid: TIN does not have a regular grid structure. Instead, it uses triangular facets to
connect a set of points with known values.
Precision: Can represent surfaces with varying levels of detail more precisely than a raster
model, particularly where there is a lot of variation in the data.
Advantages:
Detail and Accuracy: Captures complex surface details more efficiently by adjusting triangle
size according to the variability in the surface. Better for surfaces with varying levels of detail.
Adaptive: More efficient for modeling surfaces with large variations because the triangle size can
vary. Smaller triangles can be used in areas with high detail and larger triangles in more uniform
areas.
Efficient Storage: Often requires less storage space compared to high-resolution rasters,
especially for surfaces with significant variation.
Disadvantages:
Complexity: More complex to create and process compared to raster models. Requires
triangulation algorithms and management of irregular structures.
Analysis Complexity: Some spatial analyses and operations can be more complex due to the
irregular nature of the data.
Terrain Modeling: Representing detailed terrain surfaces where elevation changes significantly
over short distances.
Hydrological Modeling: Modeling river networks and watershed boundaries with high precision.
12.3.Comparison Summary
Unit-II
SPATIAL DATA MODELS
Aspect Grid (Raster) Data Model TIN Data Model
Network of non-overlapping
Representation Uniform grid of cells
triangles
Storage Can be high, especially for high Generally lower, especially for
Requirements resolution complex surfaces
Easier for continuous data and More complex, but efficient for
Ease of Analysis
uniform operations detailed surfaces
Grid (Raster): A land cover map with various classes (forest, water, urban) can be
represented as a raster where each cell holds a class value. Similarly, a DEM showing elevation
can be effectively modeled as a raster to perform surface analysis or terrain modeling.
TIN: For a detailed terrain model of a mountainous region where elevation changes
rapidly, a TIN can more accurately represent the terrain's complexity by adjusting
triangle sizes to capture more detail where needed.
Both TIN and Grid data models are valuable in GIS for different purposes. The choice between
them depends on the specific requirements of the analysis and the nature of the spatial data being
represented.