[Gdal-dev] Warping Plate Carree images to Mercator

Robert Rose robert.w.rose at gmail.com
Thu Jun 1 20:31:15 EDT 2006


Ah, thank you!  That helps, but I still can't figure it out.

Basically what I'm trying to do is convert this:

http://veimages.gsfc.nasa.gov/7107/world.topo.bathy.200408.3x5400x2700.jpg

Into something that looks like this:

http://maps.google.com/?ll=4.915833,56.25&spn=179.778788,360&t=k&om=1

-robert

On 6/1/06, Joaquim Luis <jluis at ualg.pt> wrote:
>
> Robert,
> I don't know what you got, but I know that you cannot project the poles
> using a Mercator projection
> (+/- 90 degrees are infinitely  deformed  in  Mercator)
>
> Joaquim Luis
>
> > Howdy folks!  I'm super-new to GDAL and the whole GIS space.  I've got
> > a question that I think is pretty simple...
> >
> > I'm trying to warp the NASA BlueMarble images into Mercator WGS84
> > projected images.  The documentation on BlueMarble says that they come
> > in the Plate Carree WGS84 projection system.
> >
> > For starters I'm trying to take the lowest-resolution 8km whole-world
> > image and convert it into a 512x512 GeoTIFF in Mercator.  Below is my
> > best guess so far as to how to do this with the gdal command line
> > utilities:
> >
> >> 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
> > Input file size is 5400, 2700
> > 0...10...20...30...40...50...60...70...80...90...100 - done.
> >
> >> gdalinfo world.tif
> > Driver: GTiff/GeoTIFF
> > Size is 5400, 2700
> > Coordinate System is `'
> > GCP Projection = PROJCS["WGS 84 / Plate Carree",GEOGCS["WGS
> > 84",DATUM["WGS_1984"
> > ,SPHEROID["WGS
> > 84",6378137,298.2572235630016,AUTHORITY["EPSG","7030"]],AUTHORITY
> > ["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433
> ],AUTHORI
> >
> >
> TY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32
> >
> > 662"]]
> > GCP[  0]: Id=1, Info=
> >          (0,0) -> (-180,90,0)
> > GCP[  1]: Id=2, Info=
> >          (5400,0) -> (180,90,0)
> > GCP[  2]: Id=3, Info=
> >          (5400,2700) -> (180,-90,0)
> > Metadata:
> >  AREA_OR_POINT=Area
> > Corner Coordinates:
> > Upper Left  (    0.0,    0.0)
> > Lower Left  (    0.0, 2700.0)
> > Upper Right ( 5400.0,    0.0)
> > Lower Right ( 5400.0, 2700.0)
> > Center      ( 2700.0, 1350.0)
> > Band 1 Block=5400x1 Type=Byte, ColorInterp=Red
> > Band 2 Block=5400x1 Type=Byte, ColorInterp=Green
> > Band 3 Block=5400x1 Type=Byte, ColorInterp=Blue
> >
> >> gdalwarp -s_srs EPSG:32662 -t_srs "+proj=merc +datum=WGS84" -ts 512
> > 512 world.tif worldm.tif
> > Processing input file world.tif.
> > :0...10...20...30...40...50...60...70...80...90...100 - done.
> >
> > The end result is definitely a 512x512 file that's been warped, but it
> > doesn't look at all like a Mercator projection of the Earth.
> >
> > Any help would be greatly appreciated!  Thanks!
> >
> > -robert
> > _______________________________________________
> > Gdal-dev mailing list
> > Gdal-dev at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/gdal-dev
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060601/81f96135/attachment.html


More information about the Gdal-dev mailing list