Access spatial data files using GDAL

by Tom Moore , September 30, 2025

Patchworks now has dataset drivers for raster (GDAL) and vector (OGR) data sources, allowing it to seamlessly access many more popular spatial data formats, such as the GeoPackage, PostGIS, and FileGDB vector formats, as well as the GeoTIFF raster format.


Vector data

The Geospatial Data Abstraction Library (GDAL) provides seamless and uniform access to a diverse set of raster and vector data types. Previously, Patchworks only supported reading vector spatial data from the legacy Shapefile and Arc/Info Coverage formats. Shapefile is still in wide use, and many systems can export spatial data in Shapefile format; however, Shapefile has a 2GB file size limit and a maximum column name width of 10 characters, causing problems for some users.

Modern vector spatial data formats have been developed that overcome these problems. The GeoPackage format is quite attractive for a number of reasons. It is a single-file format, encapsulating all elements in one SQLite database file. GeoPackage is robust and well-tested, based on open-source software and is widely supported by many other tools. PostGIS is the spatial version of the well-known open-source Postgres relational database and has powerful tools for spatial query and manipulation. FileGDB is a proprietary ESRI format, also in wide use. All of these formats support large tables and long column names, with upper limits that far exceed current needs.

Although it was once able to, GDAL no longer supports SDE (an enterprise-level spatial data format). This is generally not a problem. SDE is well-suited as the central repository for important corporate datasets, particularly those being maintained with regular updates, but it would be unsuitable to build models using this type of 'live', ever-changing data. Instead, Patchworks models usually operate off a snapshot of forest inventory data taken at a fixed point in time. In this situation, it is best to occasionally export a modeling layer in one of the supported standalone formats.

The TableDesigner and AddLayerWizard have been updated to provide easy-to-use selectors for supported data sources. GDAL support in Patchworks has been implemented using the standard Patchworks spatial data interface, so all tools work seamlessly with these new formats.

Raster data

Patchworks has long supported viewing and processing raster data. The initial implementation of this feature used the legacy ESRI binary grid format. The old grid format has excellent characteristics for data compression but is somewhat clunky due to its reliance on the ancient INFO tabluar data format. GeoTIFF seems to have taken over as a common interchange format. Although GeoTIFF does not compress as well as ESRI binary grid in some cases, many spatial data tools consume and produce GeoTIFF, and it is a big advantage for Patchworks to be able to work with this file type.

Raster data display is as easy as dropping a GeoTIFF image on top of a MapViewer window. Assuming that the image has a correct transformation, the imagery will display on top of the other spatial data.

GeoTIFF creation can be done with the GridAnalysis package, a toolkit for raster processing similar to the ArcGIS "Spatial Analyst" suite. The GridAnalysis operators use the Patchworks Query Language and easily access Patchworks modeling data, such as the forecast values in the block attribute table.