Skip to content
Huidae Cho edited this page Mar 31, 2021 · 26 revisions

Welcome to the projpicker wiki!

Listing all EPSG codes

https://gis.stackexchange.com/a/330283

sqlite3 /usr/share/proj/proj.db "SELECT code FROM projected_crs WHERE auth_name = 'EPSG';"

Retrieving projection information

$ projinfo -o projjson epsg:4326

outputs

PROJJSON:
{
  "$schema": "https://proj.org/schemas/v0.2/projjson.schema.json",
  "type": "GeographicCRS",
  "name": "WGS 84",
  "datum": {
    "type": "GeodeticReferenceFrame",
    "name": "World Geodetic System 1984",
    "ellipsoid": {
      "name": "WGS 84",
      "semi_major_axis": 6378137,
      "inverse_flattening": 298.257223563
    }
  },
  "coordinate_system": {
    "subtype": "ellipsoidal",
    "axis": [
      {
        "name": "Geodetic latitude",
        "abbreviation": "Lat",
        "direction": "north",
        "unit": "degree"
      },
      {
        "name": "Geodetic longitude",
        "abbreviation": "Lon",
        "direction": "east",
        "unit": "degree"
      }
    ]
  },
  "scope": "Horizontal component of 3D system.",
  "area": "World.",
  "bbox": {
    "south_latitude": -90,
    "west_longitude": -180,
    "north_latitude": 90,
    "east_longitude": 180
  },
  "id": {
    "authority": "EPSG",
    "code": 4326
  }
}

Database schema

Database or not?

create table projbbox (
  proj_id varchar(100), # better name for a/the single-word identifier of a coordinate system? crs?
  authority varchar(100),
  code int,
  south_latitude real,
  west_longitude real,
  north_latitude real,
  east_longitude real
)

Discussions

https://github.com/OSGeo/grass/issues/1253#issuecomment-776849517

WKT2 has a optional EXTENT::BBOX attribute -- "the geographic bounding box is an approximate description of location". For a given CRS, it shouldn't be too complicated to implement a qgis-like solution. The other way around, all CRS' for a given coordinate, is more complicated as you need some kind of searchable database for this. There is a SE post on this topic, see the section "EPSG.io" for possible database solution.

Clone this wiki locally