Book Image

Learning Geospatial Analysis with Python - Fourth Edition

By : Joel Lawhead
4 (1)
Book Image

Learning Geospatial Analysis with Python - Fourth Edition

4 (1)
By: Joel Lawhead

Overview of this book

Geospatial analysis is used in almost every domain you can think of, including defense, farming, and even medicine. In this special 10th anniversary edition, you'll embark on an exhilarating geospatial analysis adventure using Python. This fourth edition starts with the fundamental concepts, enhancing your expertise in geospatial analysis processes with the help of illustrations, basic formulas, and pseudocode for real-world applications. As you progress, you’ll explore the vast and intricate geospatial technology ecosystem, featuring thousands of software libraries and packages, each offering unique capabilities and insights. This book also explores practical Python GIS geospatial applications, remote sensing data, elevation data, and the dynamic world of geospatial modeling. It emphasizes the predictive and decision-making potential of geospatial technology, allowing you to visualize complex natural world concepts, such as environmental conservation, urban planning, and disaster management to make informed choices. You’ll also learn how to leverage Python to process real-time data and create valuable information products. By the end of this book, you'll have acquired the knowledge and techniques needed to build a complete geospatial application that can generate a report and can be further customized for different purposes.
Table of Contents (18 chapters)
1
Part 1:The History and the Present of the Industry
5
Part 2:Geospatial Analysis Concepts
11
Part 3:Practical Geospatial Processing Techniques

Calculating the area of a polygon

We have one more calculation before we move on to editing GIS data. The most basic unit of GIS is a point. Two points can form a line. Multiple lines that share endpoints can form a polyline, and polylines can form polygons. Polygons are used to represent everything from a house to an entire country in geospatial operations.

Calculating the area of a polygon is one of the most useful operations in GIS if we wish to understand the relative size of features. But in GIS, area calculations go beyond basic geometry. The polygon lies on the Earth, which is a curved surface. The polygon must be projected to account for that curvature.

Fortunately, there is a pure Python module simply called area that handles these complications for us. And because it’s pure Python, you can look at the source code to see how it works. The area module’s area() function accepts a GeoJSON string with a list of points that form a polygon and then returns the...