[gdal-dev] Re-aligning maps from grid north to true north

Frank Warmerdam warmerdam at pobox.com
Wed Jan 27 21:34:57 EST 2010


On Thu, Jan 28, 2010 at 2:01 AM, Smart, Gary <Gary.Smart at goodrich.com> wrote:
> We have tif maps which are OSGB grid aligned, but we need them aligned to
> true-north.  I presume this could be achieved by gdalwarp.  Can anyone give
> me a clue how to do this?  Am I right in thinking that simply setting the
> correct s_srs and t_srs would achieve everything I need?  If so – what part
> of the WKT would relate to Grid vs True?

Gary,

It sounds like you want to reproject into a coordinate
system that is aligned with the geographic lines of
longitude.  The most obvious candidate coordinate
system is geographic coordinates themselves.  If
your existing grids are properly recognised as OSGB
British National Grid, then it would be sufficient to do
something like:

  gdalwarp -t_srs WGS84 in.tif out.tif

If your input files do not have the coordinate system
set properly, but *do* have georeferencing set in
terms of british national grid meters, then you could
force gdalwarp to understand the input coordinate system
like this:

  gdalwarp -s_srs EPSG:27700 -t_srs WGS84 in.tif out.tif

There are some other projected coordinate systems
which are also aligned with the lines of longitude,
including Mercator.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent


More information about the gdal-dev mailing list