EPSG:CODE

How to Add a Custom CRS to GeoServer

GeoServer supports custom coordinate reference systems through the epsg.properties file. This allows you to add CRS definitions not included in the built-in EPSG database or override existing ones.

Step 1: Locate the File

Find or create the following file in your GeoServer data directory:

Path
<GEOSERVER_DATA_DIR>/user_projections/epsg.properties

Step 2: Add the CRS Definition

Add the CRS definition in WKT format. Each line should follow the format EPSG_CODE=WKT_DEFINITION:

Config
5255=PROJCS["TUREF / TM33",GEOGCS["TUREF",DATUM["Turkish_National_Reference_Frame",SPHEROID["GRS 1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1]]

Search for any EPSG code on the home page and copy the definition from the GeoServer tab.

Step 3: Restart GeoServer

Restart GeoServer for the changes to take effect:

Shell
sudo systemctl restart geoserver

Step 4: Verify

Go to Demos → SRS List in the GeoServer web interface and search for your EPSG code.

Notes