Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to import an elevation layer into GeoServer for later WMS access. This is the base layer I would like to import - . What I'd like to do is reproject the layer to Mercator so it looks like this , then somehow convert it to GeoTIFF so that I can import it into GeoServer.

How should I proceed?

I tried using gdal_warp to reproject my layer but it warps the layer completely leaving nothing behind. I had some success reprojecting the layer using G.Projector, but it doesn't work for bigger images and it doesn't georeference the image anyway (GeoServer reports no layers in GeoTIFF file).

share|improve this question
What software do you have access to? – Aaron Nov 21 '12 at 18:31
Why don't you look for georeferenced srtm sources? Don't bother with this jpeg! – underdark Nov 21 '12 at 19:59
If you are hoping to be able to access the elevation heights from the JPEG after reprojection you won't be able to. A jpeg is an 8 bit raster file, which will only hold a value up to 255. Reprojecting the jpeg to TIFF will not make the pixel values from the source jpeg any different. Underdark is correct, grab the source DEM data, like SRTM or GTopo30 if you are looking for global DEMs. – Ryan Garnett Nov 22 '12 at 3:42
The trick is I don't need huge detail, so 8bit precision might just be enough, the reason I want a TIFF is so that I can import it into GeoServer as a WMS layer. – haxx Nov 22 '12 at 17:01

A reprojection means that you want to go from CRS.a to CRS.b . So to reproject an image you can use gdal_translate to assign the said image a CRS.

Un-reprojected images are in pixel-domain which their coordinate system is not making any sense geographically.

The whole world in φ,λ coordinates start from -180 degress to 180 degrees latitude and 90 degrees to -90 degress longtitude.

So you can use gdal_translate to assign the upper left corner their coordinates (ulx,uly) = (-180,90) and lower right (lrx,lry) = (180,-90) and a CRS. For the whole world you can use the common World Sinusoidal

So first you should assign a CRS with gdal_translate :

C:\>gdal_translate -of GTiff -a_srs EPSG:54008 -a_ullr -180 90 180 -90 "" "asdf2.tiff"

And then reproject if you wish to a desired CRS

gdal_warp -s_srs EPSG:54008 -t_srs EPSG:3395 "asdf.tiff" "reprojected.tiff"

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.