GDALSRSINFO(1)

πŸ’– GDALSRSINFO(1) πŸ’–

okay so bestie, welcome to gdalsrsinfo, part of the GDAL manual pages, and it's giving absolute legend energy, no cap. ✨


✨ NAME ✨

gdalsrsinfo β€” lists info about a given SRS in number of formats (WKT, PROJ.4, etc.)

like... it's the SRS info-dumper. that's the whole job. and it eats. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

Usage: gdalsrsinfo [--help] [--help-general]
                   [--single-line] [-V] [-e][-o <out_type>] <srs_def>

πŸ¦‹ DESCRIPTION πŸ¦‹

The gdalsrsinfo utility reports information about a given SRS from one of the following:

  • the filename of a dataset supported by GDAL/OGR which contains SRS information
  • any of the usual GDAL/OGR forms (complete WKT, PROJ.4, EPSG:n or a file containing the SRS)

so yeah, you just hand it a thing, and it tells you everything about the SRS inside. iconic behaviour fr fr. πŸ‘‘


🌸 OPTIONS 🌸

  • --help β€” shows this help message and exits. bye bestie πŸ‘‹
  • --help-general β€” gives you a brief usage message for the generic GDAL commandline options, then exits.
  • --single-line β€” prints WKT on a single line. no wrapping, just one long lewk. πŸ’…
  • -V β€” validates the SRS. vibe check time ⭐
  • -e β€” searches for the EPSG number(s) corresponding to the SRS. like a little detective πŸ•΅οΈβ€β™€οΈ
  • -o <out_type> β€” the output types, and there are so many, so buckle up:
    • default: proj4 and wkt (this is the default option, i.e. what you get if you say nothing)
    • all: all options available
    • wkt_all: all wkt options available
    • PROJJSON: PROJJSON string (needs GDAL >= 3.1 and PROJ >= 6.2) 🫢
    • proj4: PROJ.4 string
    • wkt1: OGC WKT format (full)
    • wkt_simple: OGC WKT 1 (simplified)
    • wkt_noct: OGC WKT 1 (without OGC CT params)
    • wkt_esri: ESRI WKT format
    • wkt: latest WKT version supported, currently wkt2_2019
    • wkt2: latest WKT2 version supported, currently wkt2_2019
    • wkt2_2015: OGC WKT2:2015
    • wkt2_2019: OGC WKT2:2019 (for GDAL < 3.6, use wkt2_2018)
    • mapinfo: Mapinfo style CoordSys format
    • xml: XML format (GML based)
  • <srs_def> β€” may be the filename of a dataset supported by GDAL/OGR from which to extract SRS information OR any of the usual GDAL/OGR forms (complete WKT, PROJ.4, EPSG:n or a file containing the SRS). either/or, both slay. πŸ’–

πŸ”₯ RETURN STATUS CODE πŸ”₯

The program returns status code 0 in case of success, and non-zero in case of error (non-blocking errors emitted as warnings are considered as a successful execution). so like, a warning is not a fail, bestie, don't panic. 😭


🌈 EXAMPLE 🌈

⭐ Example 1

Default output.

$ gdalsrsinfo EPSG:4326

PROJ.4 : +proj=longlat +datum=WGS84 +no_defs

OGC WKT2:2019 :
GEOGCRS["WGS 84",
    ENSEMBLE["World Geodetic System 1984 ensemble",
        MEMBER["World Geodetic System 1984 (Transit)"],
        MEMBER["World Geodetic System 1984 (G730)"],
        MEMBER["World Geodetic System 1984 (G873)"],
        MEMBER["World Geodetic System 1984 (G1150)"],
        MEMBER["World Geodetic System 1984 (G1674)"],
        MEMBER["World Geodetic System 1984 (G1762)"],
        MEMBER["World Geodetic System 1984 (G2139)"],
        ELLIPSOID["WGS 84",6378137,298.257223563,
            LENGTHUNIT["metre",1]],
        ENSEMBLEACCURACY[2.0]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    USAGE[
        SCOPE["Horizontal component of 3D system."],
        AREA["World."],
        BBOX[-90,-180,90,180]],
    ID["EPSG",4326]]

⭐ Example 2: PROJ.4 output

$ gdalsrsinfo -o proj4 lcc_esri.prj

+proj=lcc +lat_0=33.75 +lon_0=-79 +lat_1=36.1666666666667 +lat_2=34.3333333333333 +x_0=609601.22 +y_0=0 +datum=NAD83 +units=m +no_defs

$ gdalsrsinfo -o proj4 landsat.tif
PROJ.4 : '+proj=utm +zone=19 +south +datum=WGS84 +units=m +no_defs '

⭐ Example 3: WKT output, latest version

$ gdalsrsinfo  -o wkt "EPSG:32722"

PROJCRS["WGS 84 / UTM zone 22S",
    BASEGEOGCRS["WGS 84",
        ENSEMBLE["World Geodetic System 1984 ensemble",
            MEMBER["World Geodetic System 1984 (Transit)"],
            MEMBER["World Geodetic System 1984 (G730)"],
            MEMBER["World Geodetic System 1984 (G873)"],
            MEMBER["World Geodetic System 1984 (G1150)"],
            MEMBER["World Geodetic System 1984 (G1674)"],
            MEMBER["World Geodetic System 1984 (G1762)"],
            MEMBER["World Geodetic System 1984 (G2139)"],
            ELLIPSOID["WGS 84",6378137,298.257223563,
                LENGTHUNIT["metre",1]],
            ENSEMBLEACCURACY[2.0]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4326]],
    CONVERSION["UTM zone 22S",
        METHOD["Transverse Mercator",
            ID["EPSG",9807]],
        PARAMETER["Latitude of natural origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8801]],
        PARAMETER["Longitude of natural origin",-51,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8802]],
        PARAMETER["Scale factor at natural origin",0.9996,
            SCALEUNIT["unity",1],
            ID["EPSG",8805]],
        PARAMETER["False easting",500000,
            LENGTHUNIT["metre",1],
            ID["EPSG",8806]],
        PARAMETER["False northing",10000000,
            LENGTHUNIT["metre",1],
            ID["EPSG",8807]]],
    CS[Cartesian,2],
        AXIS["(E)",east,
            ORDER[1],
            LENGTHUNIT["metre",1]],
        AXIS["(N)",north,
            ORDER[2],
            LENGTHUNIT["metre",1]],
    USAGE[
        SCOPE["Navigation and medium accuracy spatial referencing."],
        AREA["Between 54Β°W and 48Β°W, southern hemisphere between 80Β°S and equator, onshore and offshore. Brazil. Uruguay."],
        BBOX[-80,-54,0,-48]],
    ID["EPSG",32722]]

⭐ Example 4: WKT output, all versions

$ gdalsrsinfo -o wkt_all "EPSG:4322"

OGC WKT1 :
GEOGCS["WGS 72",
    DATUM["World_Geodetic_System_1972",
        SPHEROID["WGS 72",6378135,298.26,
            AUTHORITY["EPSG","7043"]],
        AUTHORITY["EPSG","6322"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9122"]],
    AXIS["Latitude",NORTH],
    AXIS["Longitude",EAST],
    AUTHORITY["EPSG","4322"]]

OGC WKT2:2015 :
GEODCRS["WGS 72",
    DATUM["World Geodetic System 1972",
        ELLIPSOID["WGS 72",6378135,298.26,
            LENGTHUNIT["metre",1]]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    SCOPE["Horizontal component of 3D system."],
    AREA["World."],
    BBOX[-90,-180,90,180],
    ID["EPSG",4322]]

OGC WKT2:2019 :
GEOGCRS["WGS 72",
    DYNAMIC[
        FRAMEEPOCH[1972]],
    DATUM["World Geodetic System 1972",
        ELLIPSOID["WGS 72",6378135,298.26,
            LENGTHUNIT["metre",1]]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    USAGE[
        SCOPE["Horizontal component of 3D system."],
        AREA["World."],
        BBOX[-90,-180,90,180]],
    ID["EPSG",4322]]

OGC WKT1 (simple) :
GEOGCS["WGS 72",
    DATUM["World_Geodetic_System_1972",
        SPHEROID["WGS 72",6378135,298.26]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]

OGC WKT1 (no CT) :
GEOGCS["WGS 72",
    DATUM["World_Geodetic_System_1972",
        SPHEROID["WGS 72",6378135,298.26]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]

ESRI WKT :
GEOGCS["GCS_WGS_1972",
    DATUM["D_WGS_1972",
        SPHEROID["WGS_1972",6378135.0,298.26]],
    PRIMEM["Greenwich",0.0],
    UNIT["Degree",0.0174532925199433]]

πŸ‘‘ AUTHOR πŸ‘‘

Frank Warmerdam <warmerdam@pobox.com>, Etienne Tourigny <etourigny.dev-at-gmail-dot-com>

absolute legends, we stan. 🫢


1998-2026


okay that's the whole thing bestie, you're officially an SRS girlie now. go forth and gdalsrsinfo your little heart out. 🌸

that was the GDAL manual, gdalsrsinfo(1), dated Aug 18, 2026. mwah, love you, bye!! πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from