Skip to content

Instantly share code, notes, and snippets.

@JeffJacobson
Last active May 7, 2026 16:17
Show Gist options
  • Select an option

  • Save JeffJacobson/6bd40e60c47465db75ba7db83f3f97a5 to your computer and use it in GitHub Desktop.

Select an option

Save JeffJacobson/6bd40e60c47465db75ba7db83f3f97a5 to your computer and use it in GitHub Desktop.
Useful GDAL commands

Useful GDAL commmands

List Drivers

List vector drivers with create and virtual_io capabilities

  1. List all of the installed GDAL drivers in JSON format.
  2. Convert the JSON output into PowerShell objects.
  3. Filter to include only
    • Vector drivers
    • Drivers with capabilities:
      • create
      • virtual_io
  4. Exclude the scopes property from the output
  5. Sort the output by the short_name property
  6. Format the output as a table
gdal info --formats --json | 
ConvertFrom-Json |
Where-Object { $_.scopes -icontains 'vector' -and $_.capabilities -icontains 'create' -and $_.capabilities -icontains 'virtual_io' }  |
Select-Object -ExcludeProperty scopes |
Sort-Object -Property short_name |
Format-Table -AutoSize
Sample output

short_name     long_name                                           capabilities                            file_extensions
----------     ---------                                           ------------                            ---------------
Arrow          (Geo)Arrow IPC File Format / Stream                 {open, create, virtual_io}              {arrow, feather, arrows, ipc}
BAG            Bathymetry Attributed Grid                          {open, create, create_copy, virtual_io} {bag}
CSV            Comma Separated Value (.csv)                        {open, create, update, virtual_io}      {csv, tsv, psv}
DGN            Microstation DGN                                    {open, create, virtual_io}              {dgn}
DXF            AutoCAD DXF                                         {open, create, virtual_io}              {dxf}
ESRI Shapefile ESRI Shapefile                                      {open, create, update, virtual_io}      {shp, dbf, shz, shp.zip}
FlatGeobuf     FlatGeobuf                                          {open, create, virtual_io}              {fgb}
GeoJSON        GeoJSON                                             {open, create, update, virtual_io}      {json, geojson}
GeoJSONSeq     GeoJSON Sequence                                    {open, create, virtual_io}              {geojsonl, geojsons}
GeoRSS         GeoRSS                                              {open, create, virtual_io}              
GML            Geography Markup Language (GML)                     {open, create, virtual_io}              {gml, xml}
GPKG           GeoPackage                                          {open, create, create_copy, update…}    {gpkg, gpkg.zip}
GPX            GPX                                                 {open, create, virtual_io}              {gpx}
JML            OpenJUMP JML                                        {open, create, virtual_io}              {jml}
JSONFG         OGC Features and Geometries JSON                    {open, create, virtual_io}              {json}
KML            Keyhole Markup Language (KML)                       {open, create, virtual_io}              {kml}
LIBKML         Keyhole Markup Language (LIBKML)                    {open, create, update, virtual_io}      {kml, kmz}
MapInfo File   MapInfo File                                        {open, create, update, virtual_io}      {tab, mif, mid}
MapML          MapML                                               {open, create, virtual_io}              
MBTiles        MBTiles                                             {open, create, create_copy, virtual_io} {mbtiles}
MiraMonVector  MiraMon Vectors (.pol, .arc, .pnt)                  {open, create, virtual_io}              {pol, arc, pnt}
MVT            Mapbox Vector Tiles                                 {open, create, virtual_io}              {mvt, mvt.gz, pbf}
ODS            Open Document/ LibreOffice / OpenOffice Spreadsheet {open, create, update, virtual_io}      {ods}
OGR_GMT        GMT ASCII Vectors (.gmt)                            {open, create, virtual_io}              {gmt}
OpenFileGDB    ESRI FileGeodatabase (using OpenFileGDB)            {open, create, update, virtual_io}      {gdb}
Parquet        (Geo)Parquet                                        {open, create, update, virtual_io}      {parquet}
PCIDSK         PCIDSK Database File                                {open, create, update, virtual_io}      {pix}
PDF            Geospatial PDF                                      {open, create, create_copy, update…}    {pdf}
PDS4           NASA Planetary Data System 4                        {open, create, create_copy, update…}    {xml}
PGDUMP         PostgreSQL SQL dump                                 {create, virtual_io}                    {sql}
PMTiles        ProtoMap Tiles                                      {open, create, virtual_io}              {pmtiles}
S57            IHO S-57 (ENC)                                      {open, create, virtual_io}              {000}
Selafin        Selafin                                             {open, create, virtual_io}              
SQLite         SQLite / Spatialite                                 {open, create, update, virtual_io}      {sqlite, db}
TileDB         TileDB                                              {open, create, create_copy, update…}    
VDV            VDV-451/VDV-452/INTREST Data Format                 {open, create, virtual_io}              {txt, x10}
VICAR          MIPL VICAR file                                     {open, create, create_copy, virtual_io} 
WAsP           WAsP .map format                                    {open, create, virtual_io}              {map}
XLSX           MS Office Open XML spreadsheet                      {open, create, update, virtual_io}      {xlsx, xlsm}

List drivers with short_names that contain json (case insensitive)

gdal info --formats --json | 
ConvertFrom-Json |
Where-Object -Property short_name -ILike '*json*' |
Sort-Object -Property short_name |
Format-Table
short_name long_name                        scopes   capabilities                       file_extensions
---------- ---------                        ------   ------------                       ---------------
ESRIJSON   ESRIJSON                         {vector} {open, virtual_io}                 {json}
GeoJSON    GeoJSON                          {vector} {open, create, update, virtual_io} {json, geojson}
GeoJSONSeq GeoJSON Sequence                 {vector} {open, create, virtual_io}         {geojsonl, geojsons}
JSONFG     OGC Features and Geometries JSON {vector} {open, create, virtual_io}         {json}
TopoJSON   TopoJSON                         {vector} {open, virtual_io}                 {json, topojson}

List drivers with names containing esri (case insensitive)

gdal info --formats --json | 
ConvertFrom-Json |
Where-Object -Property short_name -ILike '*esri*' |
Sort-Object -Property short_name |
Format-Table
short_name     long_name          scopes   capabilities                       file_extensions
----------     ---------          ------   ------------                       ---------------
ESRI Shapefile ESRI Shapefile     {vector} {open, create, update, virtual_io} {shp, dbf, shz, shp.zip}
ESRIC          Esri Compact Cache {raster} {open, virtual_io}                 {json, tpkx}
ESRIJSON       ESRIJSON           {vector} {open, virtual_io}                 {json}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment