PROJINFO(1) | PROJ | PROJINFO(1) |
projinfo - Geodetic object and coordinate operation queries
projinfo
[-o formats] [-k crs|operation|datum|ensemble|ellipsoid] [--summary] [-q] [[--area name_or_code] | [--bbox west_long,south_lat,east_long,north_lat]] [--spatial-test contains|intersects] [--crs-extent-use none|both|intersection|smallest] [--grid-check none|discard_missing|sort|known_available] [--pivot-crs always|if_no_direct_transformation|never|{auth:code[,auth:code]*}] [--show-superseded] [--hide-ballpark] [--accuracy {accuracy}] [--allow-ellipsoidal-height-as-vertical-crs] [--boundcrs-to-wgs84] [--authority name] [--main-db-path path] [--aux-db-path path]* [--dump-db-structure] [--identify] [--3d] [--output-id AUTH:CODE] [--c-ify] [--single-line] --searchpaths | --remote-data | --list-crs [list-crs-filter] | --dump-db-structure [{object_definition} | {object_reference}] | {object_definition} | {object_reference} | (-s {srs_def} -t {srs_def})
where {object_definition} or {srs_def} is one of the possibilities accepted by proj_create()
{object_reference} is a filename preceded by the '@' character. The file referenced by the {object_reference} must contain a valid {object_definition}.
projinfo is a program that can query information on a geodetic object, coordinate reference system (CRS) or coordinate operation, when the -s and -t options are specified, and display it under different formats (PROJ string, WKT string or PROJJSON string).
It can also be used to query coordinate operations available between two CRS.
The program is named with some reference to the GDAL gdalsrsinfo that offers partly similar services.
The following control parameters can appear in any order:
Except all and default, other formats can be preceded by - to disable them.
NOTE:
NOTE:
NOTE:
NOTE:
NOTE:
NOTE:
NOTE:
NOTE:
NOTE:
NOTE:
NOTE:
Hides any coordinate operation that is, or contains, a Ballpark transformation
NOTE:
Sets the minimum desired accuracy for returned coordinate operations.
NOTE:
Allows exporting a geographic or projected 3D CRS as a compound CRS whose vertical CRS represents the ellipsoidal height.
NOTE:
When used with SQL output, this restricts the authorities to which intermediate objects can belong to (the default is EPSG and PROJ). Note that the authority of the --output-id option will also be implicitly added.
Outputs the sequence of SQL statements to create a new empty valid auxiliary database. This option can be specified as the only switch of the utility. If also specifying a CRS object and the --output-id option, the definition of the object as SQL statements will be appended.
Outputs a list (authority name:code and CRS name) of the filtered CRSs from the database. If no filter is provided all authority names and types of non deprecated CRSs are dumped. list-crs-filter is a comma separated combination of: allow_deprecated,geodetic,geocentric, geographic,geographic_2d,geographic_3d,vertical,projected,compound. Affected by options --authority, --area, --bbox and --spatial-test
"Promote" 2D CRS(s) to their 3D version, where the vertical axis is the ellipsoidal height in metres, using the ellipsoid of the base geodetic CRS. Depending on PROJ versions and the exact nature of the CRS involved, especially before PROJ 9.1, a mix of 2D and 3D CRS could lead to 2D or 3D transformations. Starting with PROJ 9.1, both CRS need to be 3D for vertical transformation to possibly happen.
Identifier to assign to the object (for SQL output).
It is strongly recommended that new objects should not be added in common registries, such as EPSG, ESRI, IAU, etc. Users should use a custom authority name instead. If a new object should be added to the official EPSG registry, users are invited to follow the procedure explained at https://epsg.org/dataset-change-requests.html.
Combined with --dump-db-structure, users can create auxiliary databases, instead of directly modifying the main proj.db database. See the example how to export to an auxiliary database.
Those auxiliary databases can be specified through proj_context_set_database_path() or the PROJ_AUX_DB environment variable.
Output the directories into which PROJ resources will be looked for (if not using C API such as proj_context_set_search_paths() that will override them.
Display information regarding if Network capabilities is enabled, and the related URL.
projinfo EPSG:4326
Output:
PROJ.4 string: +proj=longlat +datum=WGS84 +no_defs +type=crs WKT2:2019 string: 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["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",4326]]
projinfo -s NAD27 -t EPSG:4269 --area "USA - Missouri"
Output:
DERIVED_FROM(EPSG):1241, NAD27 to NAD83 (1), 0.15 m, USA - CONUS including EEZ PROJ string: +proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert \ +xy_in=deg +xy_out=rad +step +proj=hgridshift +grids=conus \ +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1 WKT2:2019 string: COORDINATEOPERATION["NAD27 to NAD83 (1)",
SOURCECRS[
GEOGCRS["NAD27",
DATUM["North American Datum 1927",
ELLIPSOID["Clarke 1866",6378206.4,294.978698213898,
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]]]],
TARGETCRS[
GEOGCRS["NAD83",
DATUM["North American Datum 1983",
ELLIPSOID["GRS 1980",6378137,298.257222101,
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]]]],
METHOD["CTABLE2"],
PARAMETERFILE["Latitude and longitude difference file","conus"],
OPERATIONACCURACY[0.15],
USAGE[
SCOPE["unknown"],
AREA["USA - CONUS including EEZ"],
BBOX[23.81,-129.17,49.38,-65.69]],
ID["DERIVED_FROM(EPSG)",1241]]
projinfo GDA94 -o PROJJSON -q
Output:
{
"type": "GeographicCRS",
"name": "GDA94",
"datum": {
"type": "GeodeticReferenceFrame",
"name": "Geocentric Datum of Australia 1994",
"ellipsoid": {
"name": "GRS 1980",
"semi_major_axis": 6378137,
"inverse_flattening": 298.257222101
}
},
"coordinate_system": {
"subtype": "ellipsoidal",
"axis": [
{
"name": "Geodetic latitude",
"abbreviation": "Lat",
"direction": "north",
"unit": "degree"
},
{
"name": "Geodetic longitude",
"abbreviation": "Lon",
"direction": "east",
"unit": "degree"
}
]
},
"area": "Australia - GDA",
"bbox": {
"south_latitude": -60.56,
"west_longitude": 93.41,
"north_latitude": -8.47,
"east_longitude": 173.35
},
"id": {
"authority": "EPSG",
"code": 4283
} }
# Get the SQL statements for a custom CRS projinfo "+proj=merc +lat_ts=5 +datum=WGS84 +type=crs +title=my_crs" --output-id HOBU:MY_CRS -o SQL -q > my_crs.sql cat my_crs.sql # Initialize an auxiliary database with the schema of the reference database echo ".schema" | sqlite3 /path/to/proj.db | sqlite3 aux.db # Append the content of the definition of HOBU:MY_CRS sqlite3 aux.db < my_crs.db # Check that everything works OK projinfo --aux-db-path aux.db HOBU:MY_CRS
or more simply:
# Create an auxiliary database with the definition of a custom CRS. projinfo "+proj=merc +lat_ts=5 +datum=WGS84 +type=crs +title=my_crs" --output-id HOBU:MY_CRS --dump-db-structure | sqlite3 aux.db # Check that everything works OK projinfo --aux-db-path aux.db HOBU:MY_CRS
Output:
INSERT INTO geodetic_crs VALUES('HOBU','GEODETIC_CRS_MY_CRS','unknown','','geographic 2D','EPSG','6424','EPSG','6326',NULL,0); INSERT INTO usage VALUES('HOBU','USAGE_GEODETIC_CRS_MY_CRS','geodetic_crs','HOBU','GEODETIC_CRS_MY_CRS','PROJ','EXTENT_UNKNOWN','PROJ','SCOPE_UNKNOWN'); INSERT INTO conversion VALUES('HOBU','CONVERSION_MY_CRS','unknown','','EPSG','9805','Mercator (variant B)','EPSG','8823','Latitude of 1st standard parallel',5,'EPSG','9122','EPSG','8802','Longitude of natural origin',0,'EPSG','9122','EPSG','8806','False easting',0,'EPSG','9001','EPSG','8807','False northing',0,'EPSG','9001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0); INSERT INTO usage VALUES('HOBU','USAGE_CONVERSION_MY_CRS','conversion','HOBU','CONVERSION_MY_CRS','PROJ','EXTENT_UNKNOWN','PROJ','SCOPE_UNKNOWN'); INSERT INTO projected_crs VALUES('HOBU','MY_CRS','my_crs','','EPSG','4400','HOBU','GEODETIC_CRS_MY_CRS','HOBU','CONVERSION_MY_CRS',NULL,0); INSERT INTO usage VALUES('HOBU','USAGE_PROJECTED_CRS_MY_CRS','projected_crs','HOBU','MY_CRS','PROJ','EXTENT_UNKNOWN','PROJ','SCOPE_UNKNOWN');
PROJ.4 string: +proj=merc +lat_ts=5 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +type=crs WKT2:2019 string: PROJCRS["my_crs",
BASEGEOGCRS["unknown",
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)"],
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]],
ENSEMBLEACCURACY[2.0]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
ID["HOBU","GEODETIC_CRS_MY_CRS"]],
CONVERSION["unknown",
METHOD["Mercator (variant B)",
ID["EPSG",9805]],
PARAMETER["Latitude of 1st standard parallel",5,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8823]],
PARAMETER["Longitude of natural origin",0,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8802]],
PARAMETER["False easting",0,
LENGTHUNIT["metre",1],
ID["EPSG",8806]],
PARAMETER["False northing",0,
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]],
ID["HOBU","MY_CRS"]]
projinfo -o WKT1:GDAL --single-line EPSG:25832
Output:
WKT1:GDAL string: PROJCS["ETRS89 / UTM zone 32N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","25832"]]
A list of known bugs can be found at https://github.com/OSGeo/PROJ/issues where new bug reports can be submitted to.
https://proj.org/
Even Rouault
1983-2022
Dec 1st, 2022 | 9.1.1 |