Skip to content

Instantly share code, notes, and snippets.

View grovduck's full-sized avatar

Matt Gregory grovduck

  • Oregon State University
  • Corvallis, OR
View GitHub Profile
@grovduck
grovduck / gdal_rat_to_pandas_df.py
Last active February 16, 2022 09:24
[RAT to pandas DF] Script for converting a GDAL RasterAttributeTable to a pandas DataFrame #pandas #gdal #rat
import sys
import pandas as pd
from osgeo import gdal
def rat_to_df(in_rat):
"""
Given a GDAL raster attribute table, convert to a pandas DataFrame
Parameters