[gdal-dev] Re: Can't get gdalwarp to create a raster in Mercator-2SP projection?

Brian Case rush at winkey.org
Thu Sep 29 10:40:38 EDT 2011


Patrick

from http://remotesensing.org/geotiff/proj_list/mercator_2sp.html

"The difference between 1SP and 2SP formulations is that the initial
parameters are different: in 1SP you start from the longitude of natural
origin and the scale factor, while in 2SP you start from the longitude
of natural origin and the latitude of one of the standard parallels (the
other is symmetrical in relation to the equator). So, the formulas of
2SP are just those for 1SP after calculating the scale factor from the
absolute value of the latitude of the standard parallels and the "e"
parameter of the datum."


I noticed your scale factor is 1 so isn't that the same thing?

"The Mercator projection is a special case of the Lambert Conic
Conformal projection with the equator as the single standard parallel.
All other parallels of latitude are straight lines and the meridians are
also straight lines at right angles to the equator, equally spaced. It
is little used for land mapping purposes but is in universal use for
navigation charts and is the basis for the transverse and oblique forms
of the Mercator. As well as being conformal, it has the particular
property that straight lines drawn on it are lines of constant bearing.
Thus navigators may derive their course from the angle the straight
course line makes with the meridians.

In the few cases in which the Mercator projection is used for
terrestrial applications or land mapping, such as in Indonesia prior to
the introduction of the Universal Transverse Mercator, a scale factor
may be applied to the projection. This has the same effect as choosing
two standard parallels on which the true scale is maintained at equal
north and south latitudes either side of the equator."

from http://remotesensing.org/geotiff/proj_list/mercator_1sp.html

"I believe the formula (EPSG) notes are exactly the same for Mercator
(1SP) and Mercator (2SP). There is only one projection in GeoTIFF for
straight Mercator."



hope this helps

Brian



On Thu, 2011-09-29 at 11:42 +1000, Patrick Sunter wrote:
> Oops, sorry sent message accidentally without last bit of text output,
> pls see below ...
> 
> On Thu, Sep 29, 2011 at 11:38 AM, Patrick Sunter <patdevelop at gmail.com> wrote:
> > Hi,
> >
> > As part of testing GDAL's NetCDF drivers projections, I've been trying
> > to gdalwarp a Geotiff file from a UTM projection to Mercator-2SP
> > (http://geotiff.maptools.org/proj_list/mercator_2sp.html).
> >
> > Thinking I should file this as a ticket? But thought I'd post here first.
> >
> > I've tried 2 approaches to specifying the target SRS as Mercator-2SP,
> > and in both cases the resulting files comes out as Mercator-1SP:
> >
> > 1) Specifying using Proj4 (the 'lat_ts' paramater specifies a std
> > parallel and differentiates from Mercator-1SP
> > gdalwarp -t_srs '+proj=merc +lat_ts=-45 +lon_0=145 +x_0=0 +y_0=0
> > +ellps=WGS84 +datum=WGS84 +units=m +no_defs' melb-small.tif
> > savedResults/Melb_USGS/refactored_gdal/melb-small_M-2SP.tif
> >
> PROJCS["unnamed",
>     GEOGCS["WGS 84",
>         DATUM["WGS_1984",
>             SPHEROID["WGS 84",6378137,298.257223563,
>                 AUTHORITY["EPSG","7030"]],
>             AUTHORITY["EPSG","6326"]],
>         PRIMEM["Greenwich",0],
>         UNIT["degree",0.0174532925199433],
>         AUTHORITY["EPSG","4326"]],
>     PROJECTION["Mercator_1SP"],
>     PARAMETER["central_meridian",145],
>     PARAMETER["scale_factor",1],
>     PARAMETER["false_easting",0],
>     PARAMETER["false_northing",0],
>     UNIT["metre",1,
>         AUTHORITY["EPSG","9001"]]]
> 
> 
> >
> > 2) Specifying the full requested OGC WKT:
> > gdalwarp -t_srs 'PROJCS["unnamed", GEOGCS["WGS 84", DATUM["WGS_1984",
> > SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]],
> > AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0],
> > UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]],
> > PROJECTION["Mercator_2SP"], PARAMETER["central_meridian",146],
> > PARAMETER["standard_parallel_1",-45],
> > PARAMETER["latitude_of_origin",0], PARAMETER["false_easting",0],
> > PARAMETER["false_northing",0], UNIT["metre",1,
> > AUTHORITY["EPSG","9001"]]]' melb-small.tif
> > savedResults/Melb_USGS/refactored_gdal/melb-small_M-2SP.tif
> >
> > Resulting gdalinfo projection section:
> >
> PROJCS["unnamed",
>     GEOGCS["WGS 84",
>         DATUM["WGS_1984",
>             SPHEROID["WGS 84",6378137,298.257223563,
>                 AUTHORITY["EPSG","7030"]],
>             AUTHORITY["EPSG","6326"]],
>         PRIMEM["Greenwich",0],
>         UNIT["degree",0.0174532925199433],
>         AUTHORITY["EPSG","4326"]],
>     PROJECTION["Mercator_1SP"],
>     PARAMETER["central_meridian",146],
>     PARAMETER["scale_factor",1],
>     PARAMETER["false_easting",0],
>     PARAMETER["false_northing",0],
>     UNIT["metre",1,
>         AUTHORITY["EPSG","9001"]]]
> 
> So it seems GDAL is falsely converting both requested translates to
> Mercator-1SP?
> 
> thanks, Patrick.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev




More information about the gdal-dev mailing list