epsg_ident is a command-line utility and Python module for quickly identifying the EPSG Registry Code from a .prj file typically associated with ESRI Shapefiles . It ships with a SQlite3 database containing mappings of Well-known Text strings to EPSG codes, the bulk of which was manually sourced and cleaned from an ESRI website . It’s not complete, however, and in the event you test it against a WKT string not in the database it will search the prj2epsg.org API. If the API returns an exact match, that code is returned and saved to the SQLite database. Handling several partial matches is currently planned, but not yet implemented.

TL;DR

Background

Think of projections as character encoding for spatial data. Spatial data lacking information about the coordinate system on which it has been projected is all but useless, just as if you had text data in an unknown encoding.

epsg_ident is not meant to be a full-fledged client library to the actual EPSG database, for that you’re probably looking for something like python-epsg

Rather, epsg_ident is for those looking to quickly identify the EPSG code of a shapefile, especially when importing into PostGIS . Of course, you could use ogr2ogr to convert everything into a web-friendly projection, like:

$ ogr2ogr -f PostgreSQL -t_srs EPSG:4326 PG:dbname = seattle seattle_land_use.shp

But transforming spatial data from one projection to another is a lossy operation and can result in coordinate drift. Ideally, you would store the original data in its original coordinate system and then transform copies as needed.