☰
Python Across Disciplines
with Python + AI Tool   
×
Table of Contents

1.1.   Introduction 1.2.   About the Author & Contact Info 1.3.   Book Conventions 1.4.   What (Who) is a Programmer? 1.5.   Programming Across Disciplines 1.6.   Foundational Computing Concepts 1.7.   About Python 1.8.   First Steps 1.8.1 Computer Setup 1.8.2 Python print() Function 1.8.3 Comments
2.1. About Data 2.2. Data Types 2.3. Variables 2.4. User Input 2.5. Data Structures (DS)         2.5.1. DS Concepts         2.5.2. Lists         2.5.3. Dictionaries         2.5.4. Others 2.6. Files         2.6.1. Files & File Systems         2.6.2. Python File Object         2.6.3. Data Files 2.7. Databases
3.1. About Processing 3.2. Decisions         3.2.1 Decision Concepts         3.2.2 Conditions & Booleans         3.2.3 if Statements         3.2.4 if-else Statements         3.2.5 if-elif-else Statements         3.2.6 In-Line if Statements 3.3. Repetition (a.k.a. Loops)         3.3.1  Repetition Concepts         3.3.2  while Loops         3.3.3  for Loops         3.3.4  Nested Loops         3.3.5  Validating User Input 3.4. Functions         3.4.1  Function Concepts         3.4.2  Built-In Functions         3.4.3  Programmer Defined Functions 3.5. Libraries         3.5.1  Library Concepts         3.5.2  Standard Library         3.5.3  External Libraries 3.6. Processing Case Studies         3.6.1  Case Studies         3.6.2  Parsing Data
4.1. About Output 4.2. Advanced Printing 4.3. Data Visualization   4.4  Sound
  4.5  Graphics
  4.6  Video
  4.7  Web Output
  4.8  PDFs & Documents
  4.9  Dashboards
  4.10  Animation & Games
  4.11  Text to Speech

5.1 About Disciplines 5.2 Accounting 5.3 Architecture 5.4 Art 5.5 Artificial Intelligence (AI) 5.6 Autonomous Vehicles 5.7 Bioinformatics 5.8 Biology 5.9 Bitcoin 5.10 Blockchain 5.11 Business 5.12 Business Analytics 5.13 Chemistry 5.14 Communication 5.15 Computational Photography 5.16 Computer Science 5.17 Creative Writing 5.18 Cryptocurrency 5.19 Cultural Studies 5.20 Data Analytics 5.21 Data Engineering 5.22 Data Science 5.23 Data Visualization 5.24 Drone Piloting 5.25 Economics 5.26 Education 5.27 Engineering 5.28 English 5.29 Entrepreneurship 5.30 Environmental Studies 5.31 Exercise Science 5.32 Film 5.33 Finance 5.34 Gaming 5.35 Gender Studies 5.36 Genetics 5.37 Geography 5.38 Geology 5.39 Geospatial Analysis ☯ 5.40 History 5.41 Humanities 5.42 Information Systems 5.43 Languages 5.44 Law 5.45 Linguistics 5.46 Literature 5.47 Machine Learning 5.48 Management 5.49 Marketing 5.50 Mathematics 5.51 Medicine 5.52 Military 5.53 Model Railroading 5.54 Music 5.55 Natural Language Processing (NLP) 5.56 Network Analysis 5.57 Neural Networks 5.58 Neurology 5.59 Nursing 5.60 Pharmacology 5.61 Philosophy 5.62 Physiology 5.63 Politics 5.64 Psychiatry 5.65 Psychology 5.66 Real Estate 5.67 Recreation 5.68 Remote Control (RC) Vehicles 5.69 Rhetoric 5.70 Science 5.71 Sociology 5.72 Sports 5.73 Stock Trading 5.74 Text Mining 5.75 Weather 5.76 Writing
6.1. Databases         6.1.1 Overview of Databases         6.1.2 SQLite Databases         6.1.3 Querying a SQLite Database         6.1.4 CRUD Operations with SQLite         6.1.5 Connecting to Other Databases
Built-In Functions Conceptss Data Types Date & Time Format Codes Dictionary Methods Escape Sequences File Access Modes File Object Methods Python Keywords List Methods Operators Set Methods String Methods Tuple Methods Glossary Index Appendices   Software Install & Setup
  Coding Tools:
  A.  Python    B.  Google CoLaboratory    C.  Visual Studio Code    D.  PyCharm IDE    E.  Git    F.  GitHub 
  Database Tools:
  G.  SQLite Database    H.  MySQL Database 


Python Across Disciplines
by John Gordon © 2023

Table of Contents

Table of Contents  »  Chapter 5 : Disciplines : Geospatial Analysis : Concepts

Geospatial Concepts

Subscribe Contact


Contents

Overview

Geospatial Analysis is a broad field that involves collecting, combining, analyzing, and visualizing various types of geospatial data. it is used to represent how people, objects, and phenomena exist within an environment (Earth, for example). It is also used to try to make predictions based on trends in the relationships between places within the subject environment. The essence of geospatial analysis is geospatial data, which is data that has a geographic aspect to it. This means that the records within the data are associated with locations on the Earth, such as coordinates on a map, and can include anything from the layout of a city's roads, locations of businesses, to the global spread of natural resources.

In the Humanities, geospatial analysis is used in many types of projects, such as historical mapping, temporal studies, cultural and archeological insights, literature, geo-referencing of texts, war and battle analysis, mapping the spread of disease and epidemics, and many other approaches useful for humanists researchers.

Understanding Geospatial Data

Geospatial data typically comes in two forms: vector data or raster data.

Vector Data

Vector data is a method of storing spatial data characterized by using geometric shapes to accurately represent real-world features on a map. This form of data is typically used in scenarios where precision is key, as it can accurately depict the shape, location, and size of geographic features. Moreover, vector models potentially store additional information (attributes) about the represented features, which can be crucial for various analyses. This types of data represents specific geographical locations and shapes of objects on Earth.

Types of Vector Data

Vector data is in three primary forms, as follows:
  1. Points: Points represent the simplest form of vector data, consisting of a single coordinate pair. They are used to represent features that can be appropriately depicted by a single spot on a map, essentially showing 'where' something is within space. Points have specific features and uses, such as:
    • Location Markers: Points are used for marking specific locations like the site of historical events, positions of archaeological findings, or locations of businesses.
    • Data Collection & Analysis: They are used in GPS tracking, surveying, and collecting location-based data, essential for studies ranging from wildlife tracking to epidemiology.
    • Infrastructure & Planning: Points help in urban planning and utility mapping, indicating features such as lamp posts, street cameras, or fire hydrants.
  2. Lines (a.k.a. Polylines): Lines or polylines consist of a series of connected points. They are used to represent linear features, i.e., features that have length but negligible width compared to their length. Lines have specific features and uses, such as:
    • Transportation Networks: One of the most common uses of line data is in mapping roads, railways, and flight paths, forming the backbone of transport and connectivity analyses.
    • Hydrology: Lines are used to represent rivers, streams, and water pipelines, crucial for studies on water resources or flood analysis.
    • Utility Networks: They are essential in plotting utility lines, including electrical power lines, telecommunications cables, and gas pipelines, aiding in infrastructure development and management.
  3. Polygons: Polygons are shapes consisting of three or more vertices and edges, used to represent areas. They are utilized when the spatial feature has both length and width significant enough to be represented as an area.
    • Administrative Boundaries: Polygons are indispensable for demarcating boundaries, such as countries, provinces, or city limits, and property lines.
    • Land Use & Cover: They help in environmental management and planning, categorizing regions as forested, urban, agricultural, etc., essential for habitat studies, conservation, and urban planning.
    • Zoning & Demographics: olygons are used in creating various zones for administrative purposes, like electoral districts, school districts, or demographic analysis based on different population characteristics.





Example of Vector & Raster Data
© Joey-das-WBF, Creative Commons

Working with vector data in GIS (Geographic Information Systems) often involves several operations like overlaying, buffering, calculating proximity, or performing spatial queries and joins. Each of these operations relies on the geometric characteristics of vector data and is vital across various fields, from urban planning and disaster management to resource allocation and historical research. Furthermore, vector data's attribute component allows users to perform robust analysis, integrating the 'what' and 'why' with the 'where.' For example, a point on a map representing a historical site is not just a location; its attribute data can include the site's establishment date, its significance, materials found during excavations, etc.

Raster Data

Raster data is a type of geospatial data represented by a grid (matrix) of cells (or pixels), where each cell holds a value representing information, such as temperature, elevation, land cover, or spectral reflectance. The nature of raster data makes it particularly suitable for depicting gradual changes across a landscape. The level of detail in a raster is determined by its cell size, often related to as its resolution that represents more continuous data, like elevation, temperatures, or satellite imagery. Each pixel holds a specific value, making this form of data ideal for various overlay analysis. Smaller cells result in higher resolution, as more details can be captured in the image, but this also increases the file size. Raster data is excellent for representing continuous data that changes across space, like elevation or temperature. Raster datasets can become very large, especially as the resolution increases, because each cell represents a piece of spatial information.

Types of Raster Data

Raster data varies based on what aspect of geographic space they represent. Here are some examples:
  1. Digital Elevation Models (DEMs): DEMs represent the surface of the earth and are used to depict terrain. Each cell within a DEM contains an elevation value.
    • Topographic Mapping: DEMs are fundamental in creating contour maps and understanding terrain shapes and features.
    • Hydrology: They are used in watershed analysis, runoff modeling, and flood prediction, where understanding the terrain is essential.
    • Infrastructure Planning: DEMs aid in the planning of roads, buildings, and bridges, considering the topography of the area.
  2. Satellite Imagery: These are images of the earth captured by satellites. Each pixel holds spectral reflectance values, capturing what's happening on the earth's surface across different bands of the electromagnetic spectrum.
    • Environmental Monitoring: Satellite imagery is crucial for tracking deforestation, urbanization, water levels in reservoirs, and changes in ice caps.
    • Agriculture: Farmers and researchers use it to monitor crop health, drought, and land use.
    • Disaster Management: These images help in tracking and managing events like wildfires, hurricanes, or volcanic eruptions.
  3. Orthophotos (a.k.a. Orthoimagery): Orthophotos are aerial photographs that have been geometrically corrected ("orthorectified") to be distortion-free for accurate measurements, combining the image attributes of a photograph with the spatial accuracy and reliability of a map.
    • Base Maps: They often serve as base layers over which other map data is overlaid in GIS applications.
    • Land Cover Analysis: Orthophotos help in understanding land cover and making decisions related to habitat conservation, urban planning, and forestry.
    • Property Analysis: These are used in real estate, property delineation, and assessment.







© 2023 John Gordon
Cascade Street Publishing, LLC