Custom projections using and gdal

Every now and then I get the urge to define my own projection. Usually, I sit down for a while, hit my head on the wall, and the urge passes. For a few years I have worked with the Lake Erie and Allegheny Partnership for Biodiversity on various projects. Now we are getting deep into region-wide data collection, and so I decided to define an Albers Equal Area projection for the task. Specifically, I sought to refine an existing projection to match the bounds and center of the LEAP region. Yes, I know. I will be cursed one day for this decision, but it sure beats the alternatives at the moment.

Map of LEAP Region

Beyond defining the projection, I wanted it as an ESRI WKT and in Proj4 format. Here are the steps I took. I used to help me do the format translation. needs the projection input in a form called Well Known Text (WKT)– specifically the Open Geospatial Consortium’s for of WKT. First, I uploaded the description in ESRI’s WKT: this doesn’t work. So here’s ESRI’s WKT for the LEAP boundary as I created a few days ago:


I changed 4 things from the North America version of this:


OGC WKT has different names for these, specifically:


So, we can take USA Contiguous Albers Equal Area Conic from

Go to it’s OGC WKT page:

And thus extract the OGC WKT we want to modify:


Modifying those parameters thusly:


Resulting in the following:


Which I have uploaded to a custom LEAP projection.

Ok. Final step. gdalwarp was the original tool I wanted to use. It requires that we define our projection in a format called Proj4 or using an EPSG code. Since we invented this projection, it’s has no EPSG code. Now that we have a definition for it loaded into, we can use the web site to give us the proj4 definition:

This site now gives us the following:

+proj=aea +lat_1=39 +lat_2=43 +lat_0=41 +lon_0=-80.75 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs

The sample reprojection code from the gdalwarp website is as follows:

gdalwarp -t_srs '+proj=utm +zone=11 +datum=WGS84' raw_spot.tif utm11.tif

To use it for our own data, we’ll do something like this:

gdalwarp -t_srs '+proj=aea +lat_1=39 +lat_2=43 +lat_0=41 +lon_0=-80.75 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs ' input.tif output.tif

Boom! Data reprojected. And so another projection is born. Oops.

postscript– Yes I know about— as far as I can tell, it does not yet have the ability to receive uploads.

Edit from Howard Butler:


gdalwarp -t_srs "" input.tif output.tif


3 thoughts on “Custom projections using and gdal

      1. Thanks – my main reason is that I’ve just added support for a “shapeburst”/buffered gradient fill style to QGIS, and this map looks to be a great example of this style type. I’d love to view a larger copy so I can check whether it’s now possible to completely recreate this directly in QGIS, or whether there’s further tweaks I can do to make this possible.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.