How to Install GDAL for Any Operating System
| | |

How to Install GDAL for Any Operating System

GDAL, the Geospatial Data Abstraction Library, was designed to interact with raster and vector (geospatial) data. Over time it has evolved to include sophisticated data manipulation and analysis tools. The GDAL source code is C++, which makes it fast to run but difficult to install. Many software and applications use GDAL for handling and analyzing…

How to Clip a Raster to a Polygon or an Extent with Python (Extract by Mask)
| |

How to Clip a Raster to a Polygon or an Extent with Python (Extract by Mask)

Clipping, extracting to masks, and subsetting rasters are common GIS operations. Using the gdal package for Python it is very easy to automate these processes. This tutorial will demonstrate how to use the Warp() function from the gdal Python API to clip rasters to a specified extent and to clip rasters to a polygon layer. These operations are also often referred to as mask extraction or extract to mask.

GDAL Python Tutorial: Reading and Writing Raster Datasets
| |

GDAL Python Tutorial: Reading and Writing Raster Datasets

The Geospatial Data Abstraction Library (GDAL) is the standard for managing spatial data formats. GDAL has been incorporated into many different enterprise and open source GIS projects. Because GDAL is open source, it can be used by all. Learning to use GDAL with Python can help you automate workflows and implement custom raster processing solutions….

How To Install GDAL for Python with Anaconda
|

How To Install GDAL for Python with Anaconda

The Geospatial Data Abstraction Library (GDAL) is a fundamental package for spatial analysis with Python. GDAL is a powerful package with a lot of functionality. However, it is notoriously difficult to install. There are two reliable ways to install the GDAL python package: from the conda-forge channel using the conda installer or using pip to…

Use Python to Convert Polygons to Raster with GDAL.RasterizeLayer
|

Use Python to Convert Polygons to Raster with GDAL.RasterizeLayer

When you work with spatial data it’s inevitable that you will need to implement information from both a vector and raster data source for the same location. This task can easily be accomplished manually, but it often becomes quite cumbersome when the process must be automated across a large number of features, time periods, and/or…

Unsupervised Land Cover Classification with Python
| | |

Unsupervised Land Cover Classification with Python

Aerial imagery is used for purposes ranging from military actions to checking out the backyard of a house you might buy. Our human brains can easily identify features in these photographs, but it’s not as simple for computers. Automated analysis of aerial imagery requires classification of each pixel into a land cover type. In other…

Python: Geographic Object-Based Image Analysis (GeOBIA) – Part 2: Image Classification
| | | |

Python: Geographic Object-Based Image Analysis (GeOBIA) – Part 2: Image Classification

Use the random forests algorithm to classify image segments into land cover categories. This post is a continuation of Geographic Object-Based Image Analysis (GeOBIA). Herein, we use data describing land cover types to train and test the accuracy of a random forests classifier. Land cover data were created in the previous post. Step-be-step video instructions…

Python: Geographic Object-Based Image Analysis (GeOBIA) – Part 1: Image Segmentation
| | | |

Python: Geographic Object-Based Image Analysis (GeOBIA) – Part 1: Image Segmentation

This tutorial will walk you through segmenting and classifying high resolution imagery using Python. Part 1 of this tutorial teaches how to segment images with Python. After you have completed Part 1, Part 2 will teach how to use machine learning methods to classify segments into land cover types with Python. YouTube videos give step-by-step…