Custom projections


In GeoWebCache, a projection is also known as a gridset.

By default, GeoWebCache only advertises support for EPSG:4326 (longitude/latitude) and EPSG:900913 (spherical web mercator). Any other projection needs to be defined and configured manually.

Adding a custom projection to GeoWebCache requires modifying (or creating, if it doesn’t already exist) the geowebcache.xml configuration file to include a custom projection definition and then associating the layer with that projection. (Read more about this file in the section How to configure layers.)

Defining a projection


GeoWebCache does not know anything about projections; it only knows about its own tile grid. This information is used when passing information to the originating WMS. It is assumed that the WMS can understand requests in the custom projection.

In order to add a custom projection to GeoWebCache, the following information is required:

Field Tag Description
Name <name> A human readable name for the projection. Can typically be the name of the projection (e.g. EPSG:2263).
SRS number <srs><number> The numerical identifier for the SRS (e.g. 2263).
SRS extent <extent><coords> The full extent for the projection in its native units.
List of valid resolutions <resolutions> While a list of resolutions typically decrease by a factor of two with each entry, this is not required.
Meters per unit <metersPerUnit> A constant value of the amount of meters in the native units for the projection.
Tile height and width <tileHeight>, <tileWidth> Typically 256 pixels each, although other values are valid.


For full information, please see the GeoWebCache schema. (Read more about the schema in the section on How to configure layers.)


When defining a new SRS/gridset, it is important to use the full extent of the projection, even if your data only covers a portion of that extent. The extent of the layer itself is defined in the <gridSubset> of the layer definition below.

Determining SRS extent

If you are unsure of the full extent of the SRS, you can use an online resource such as and use the Projected Bounds. For example, on the reference page for EPSG:2263 the Projected Bounds is listed as:

909126.0155, 110626.2880, 1610215.3590, 424498.0529

Determining meters per unit

While many SRS definitions are in meters, there are many other units possible. Setting this will prevent grid shifts and unexpected output.

A short list of correct values of <metersPerUnit> for different units is as follows:

Unit Meters per unit
Degrees 111319.49079327358
Feet 0.3048
Inches 0.0254
Meters 1

While it is not required to put a <metersPerUnit> value when the projection is defined in meters, it is still good practice (and will prevent warnings from being displayed in the logs).


The following is an example of a custom projection definition, in this case EPSG:2263, or New York Long Island (ft).



specific layers will need to be associated with this projection before they can be viewed as such.

Associate a layer with the projection

Once the projection is loaded in GeoWebCache, the next step is to associate the projection to a given layer. This is done in the same geowebcache.xml file.

The necessary information is:

Field Tag Description
Layer name <name> The layer name as published by GeoWebCache. It can be the same name as known to the WMS (for example, in GeoServer, this would be namespace:layername) or not.
Name of projection <gridSetName> The projection name as referenced in the layer definition (in this example, EPSG:2236)
Layer extent <extent><coords> The extent of the layer. This is where the restricted extent is set.
WMS URL <wmsUrl> The path to the WMS endpoint.


Below an example of a single layer added using the previously-defined (EPSG:2263) projection.


Any change made to geowebcache.xml, it is required to reload the configuration.