[Gdal-dev] Warping Plate Carree images to Mercator

Lennox Antoine lxnyce at gmail.com
Sat Jun 3 21:03:19 EDT 2006


I am hoping that if you use the same projection string, you should get
the result you're looking for. They use it to map from Virtual Earth's
Mercator projection to LL, so likewise it "should" be good to use for
LL to Mercator. It doesn't look that way though.

-Lennox

On 6/2/06, Robert Rose <robert.w.rose at gmail.com> wrote:
>
>
>
> On Jun 2, 2006, at 7:13 AM, Lennox Antoine wrote:
>
> I believe this is the same projection used in VirtualEarth
> (http://local.live.com/default.aspx?v=2&cp=0~0&style=h&lvl=1&scene=1875974),
> so you can check out the projection they used to get it into
> Geographic LL coordinates.
>
> http://www.brains-n-brawn.com/default.aspx?vDir=veworldwind
>
> I'll paste the reprojection area of the code here :
>
> //NOTE tiles did not line up properly with ellps=WGS84
> //string [] projectionParameters = new string[]{"proj=merc",
> "ellps=WGS84", "no.defs"};
> //+proj=longlat +ellps=sphere +a=6370997.0 +es=0.0
> string [] projectionParameters = new string[]{"proj=merc",
> "ellps=sphere", "a=" + earthRadius.ToString(), "es=0.0", "no.defs"};
> proj = new Projection(projectionParameters);
>
> I have also had luck estimating it with tangent and log functions
> without using proj.4.
>
> Hi Lennox, thanks for the response.
>
> I'm not sure how to turn what you've given me into command line parameters
> for gdalwarp or gdaltranslate tho...  The Mercator projection string sounds
> pretty similar to what I was trying before...
>
> 1) Save
> http://veimages.gsfc.nasa.gov/7107/world.topo.bathy.200408.3x5400x2700.jpg
> as world.jpg..
>
> 2) gdal_translate -a_srs EPSG:32662 -gcp 0 0 -180 90 -gcp 5400 0 180 90 -gcp
> 5400 2700 180 -90 world.jpg world.tif
>
> 3) gdalwarp -s_srs EPSG:32662 -t_srs "+proj=merc +datum=WGS84" -ts 512 512
> world.tif worldm.tif
>
> (EPSG:32662 is the projection code for WGS84 Plate Carree)
>
> So are you suggesting I add "+ellps=sphere", "es=0" and "+a=earthRadius" to
> my gdalwarp command?
>
> -robert



More information about the Gdal-dev mailing list