GDALSRSINFO(1)

πŸ“¦
version 3.4.3 Β· 2 versions
, in epel 9

πŸ’… gdalsrsinfo(1) β€” the GDAL era ✨

okay so bestie, this is the manual page for gdalsrsinfo, straight out of the GDAL collection. it's a tiny little tool that spills the tea on any SRS you throw at it, and honestly? it ate. let's get into it 🫢


🌸 NAME 🌸

gdalsrsinfo β€” lists info about a given SRS in a number of formats (WKT, PROJ.4, etc.). that's it, that's the whole job, and it does it gorgeously πŸ’…


✨ SYNOPSIS ✨

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

like, that's the whole vibe. short king πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

the gdalsrsinfo utility reports information about a given SRS from one of the following, and yes you have options bestie:

  • 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 flexible. so iconic. main character energy fr fr 🌈

🧚 the flags 🧚

  • --single-line β€” prints the WKT on a single line. one line. no scrolling, no drama, lowkey a lifesaver 😌
  • -V β€” validate the SRS. it's giving vibe check for your coordinate system βœ…
  • -e β€” search for EPSG number(s) corresponding to the SRS. detective mode activated πŸ”
  • -o <out_type> β€” picks your output type. here's the whole menu, no cap:
    • default: proj4 and wkt (default option) πŸŽ€
    • all: all options available
    • wkt_all: all wkt options available
    • PROJJSON: PROJJSON string (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_2018
    • wkt2: latest WKT2 version supported, currently wkt2_2018
    • wkt2_2015: OGC WKT2:2015
    • wkt2_2018: OGC WKT2:2018
    • mapinfo: Mapinfo style CoordSys format
    • xml: XML format (GML based)

literally so many flavors, pick your fighter πŸ“

  • <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 way, she's serving 🫢

πŸ”₯ EXAMPLE πŸ”₯

okay this is the part where she really shows off. watch πŸ‘‘

$ gdalsrsinfo EPSG:4326

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

OGC WKT :
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4326"]]

and then she can pull the proj4 straight out of a .prj file too, no biggie:

$ gdalsrsinfo -o proj4 osr/data/lcc_esri.prj
'+proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666666 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +datum=NAD83 +units=m +no_defs '
\endverbatim
yeah that \endverbatim is just... there. we don't ask questions, we just vibe πŸ’€

rasters work too, bestie β€” a whole GeoTIFF, no problem:

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

and now the big one β€” full WKT2 for EPSG:32722, look at all those parameters 😭✨

$ gdalsrsinfo  -o wkt "EPSG:32722"

PROJCRS["WGS 84 / UTM zone 22S",
    BASEGEOGCRS["WGS 84",
        DATUM["World Geodetic System 1984",
            ELLIPSOID["WGS 84",6378137,298.257223563,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]]],
    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["unknown"],
        AREA["World - S hemisphere - 54Β°W to 48Β°W - by country"],
        BBOX[-80,-54,0,-48]],
    ID["EPSG",32722]]

and if you're feeling extra and go -o wkt_all on EPSG:4322, she serves the ENTIRE buffet. first up, OGC WKT 1:

$ gdalsrsinfo -o wkt_all "EPSG:4322"
OGC WKT 1:
GEOGCS["WGS 72",
    DATUM["World_Geodetic_System_1972",
        SPHEROID["WGS 72",6378135,298.26,
            AUTHORITY["EPSG","7043"]],
        TOWGS84[0,0,4.5,0,0,0.554,0.2263],
        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"]]

then OGC WKT2:2015 β€” the way that BOUNDCRS wraps everything, obsessed πŸ¦‹

OGC WKT2:2015 :
BOUNDCRS[
    SOURCECRS[
        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]],
            AREA["World"],
            BBOX[-90,-180,90,180],
            ID["EPSG",4322]]],
    TARGETCRS[
        GEODCRS["WGS 84",
            DATUM["World Geodetic System 1984",
                ELLIPSOID["WGS 84",6378137,298.257223563,
                    LENGTHUNIT["metre",1]]],
            PRIMEM["Greenwich",0,
                ANGLEUNIT["degree",0.0174532925199433]],
            CS[ellipsoidal,2],
                AXIS["latitude",north,
                    ORDER[1],
                    ANGLEUNIT["degree",0.0174532925199433]],
                AXIS["longitude",east,
                    ORDER[2],
                    ANGLEUNIT["degree",0.0174532925199433]],
            ID["EPSG",4326]]],
    ABRIDGEDTRANSFORMATION["WGS 72 to WGS 84 (1)",
        METHOD["Position Vector transformation (geog2D domain)",
            ID["EPSG",9606]],
        PARAMETER["X-axis translation",0,
            ID["EPSG",8605]],
        PARAMETER["Y-axis translation",0,
            ID["EPSG",8606]],
        PARAMETER["Z-axis translation",4.5,
            ID["EPSG",8607]],
        PARAMETER["X-axis rotation",0,
            ID["EPSG",8608]],
        PARAMETER["Y-axis rotation",0,
            ID["EPSG",8609]],
        PARAMETER["Z-axis rotation",0.554,
            ID["EPSG",8610]],
        PARAMETER["Scale difference",1.0000002263,
            ID["EPSG",8611]],
        AREA["World"],
        BBOX[-90,-180,90,180],
        ID["EPSG",1237]]]

then OGC WKT2:2018, which is basically the same but with GEOGCRS and USAGE blocks doing their little glow-up:

OGC WKT2:2018 :
BOUNDCRS[
    SOURCECRS[
        GEOGCRS["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]],
            USAGE[
                SCOPE["unknown"],
                AREA["World"],
                BBOX[-90,-180,90,180]],
            ID["EPSG",4322]]],
    TARGETCRS[
        GEOGCRS["WGS 84",
            DATUM["World Geodetic System 1984",
                ELLIPSOID["WGS 84",6378137,298.257223563,
                    LENGTHUNIT["metre",1]]],
            PRIMEM["Greenwich",0,
                ANGLEUNIT["degree",0.0174532925199433]],
            CS[ellipsoidal,2],
                AXIS["latitude",north,
                    ORDER[1],
                    ANGLEUNIT["degree",0.0174532925199433]],
                AXIS["longitude",east,
                    ORDER[2],
                    ANGLEUNIT["degree",0.0174532925199433]],
            ID["EPSG",4326]]],
    ABRIDGEDTRANSFORMATION["WGS 72 to WGS 84 (1)",
        METHOD["Position Vector transformation (geog2D domain)",
            ID["EPSG",9606]],
        PARAMETER["X-axis translation",0,
            ID["EPSG",8605]],
        PARAMETER["Y-axis translation",0,
            ID["EPSG",8606]],
        PARAMETER["Z-axis translation",4.5,
            ID["EPSG",8607]],
        PARAMETER["X-axis rotation",0,
            ID["EPSG",8608]],
        PARAMETER["Y-axis rotation",0,
            ID["EPSG",8609]],
        PARAMETER["Z-axis rotation",0.554,
            ID["EPSG",8610]],
        PARAMETER["Scale difference",1.0000002263,
            ID["EPSG",8611]],
        USAGE[
            SCOPE["unknown"],
            AREA["World"],
            BBOX[-90,-180,90,180]],
        ID["EPSG",1237]]]

then the simplified WKT 1, because sometimes you just want the short version πŸ’…

OGC WKT 1 (simple) :
GEOGCS["WGS 72",
    DATUM["World_Geodetic_System_1972",
        SPHEROID["WGS 72",6378135,298.26],
        TOWGS84[0,0,4.5,0,0,0.554,0.2263]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]

and WKT 1 with no CT params β€” even shorter, still valid:

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

and finally the ESRI WKT, for when your software speaks Esri 🧚

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]]

see? all the formats. all of them. she contains multitudes ✨


πŸ‘‘ AUTHOR πŸ‘‘

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

legends, both of them 🫢


1998-2026


and that's the whole page, bestie!! this one's from the GDAL squad, dated Jan 08, 2026 β€” go forth and inspect your SRSs, you're gonna slay πŸ’–βœ¨πŸ¦‹
πŸ“¦ where this page comes from