Custom Projection Problems

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom Projection Problems

Casey Vandenberg
I am trying to create a new project using a custom proj4 string. The parameters I specify are '+proj=utm +zone=6 +ellps=clark66 +towgs84=-5,135,172'. After creating the project however, and verifying the projection settings using g.proj -j -f -p I get the following info:

-PROJ_INFO-------------------------------------------------
name       : Universal Transverse Mercator
proj       : utm
ellps      : wgs84
zone       : 6
towgs84    : -5,135,172,0,0,0,0
no_defs    : defined
-PROJ_UNITS------------------------------------------------
unit       : Meter
units      : Meters
meters     : 1
+proj=utm +no_defs +zone=6 +a=6378137 +rf=298.257223563 +towgs84=-5,135,172,0,0,0,0 +to_meter=1

Why is it not maintaining the Clarke 1866 Elliposid?



Alternatively, if I specify a proj 4 string as follows: '+proj=utm +zone=6 +datum=nad27 +towgs84=-5,135,172' and verify the created projection using g.proj, I get the following output:

-PROJ_INFO-------------------------------------------------
name       : Universal Transverse Mercator
proj       : utm
datum      : nad27
ellps      : clark66
zone       : 6
no_defs    : defined
-PROJ_UNITS------------------------------------------------
unit       : meter
units      : meters
meters     : 1
+proj=utm +no_defs +zone=6 +a=6378206.4 +rf=294.9786982 +towgs84=-22.000,157.000,176.000 +to_meter=1

Here it is maintaining the correct ellipsoid, but it does not maintain the towgs84 datum transformation parameters.



Is this a bug or is my interpretation of creating custom projections completely wrong?

Thanks,

Casey


_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: Custom Projection Problems

Paul Kelly
On Tue, 2 Mar 2010, Casey Vandenberg wrote:

> I am trying to create a new project using a custom proj4 string. The
> parameters I specify are '+proj=utm +zone=6 +ellps=clark66
> +towgs84=-5,135,172'. After creating the project however, and verifying the
> projection settings using *g.proj -j -f -p* I get the following info:
>
> -PROJ_INFO-------------------------------------------------
> name       : Universal Transverse Mercator
> proj       : utm
> ellps      : wgs84
> zone       : 6
> towgs84    : -5,135,172,0,0,0,0
> no_defs    : defined
> -PROJ_UNITS------------------------------------------------
> unit       : Meter
> units      : Meters
> meters     : 1
> +proj=utm +no_defs +zone=6 +a=6378137 +rf=298.257223563
> +towgs84=-5,135,172,0,0,0,0 +to_meter=1
>
> Why is it not maintaining the Clarke 1866 Elliposid?

clark66 is the GRASS abbreviation for that ellipsoid. When you define a
co-ordinate system using a PROJ.4 string you need to use the PROJ.4
abbreviation, which is clrk66. So using +ellps=clrk66 should do what you
want.

> Alternatively, if I specify a proj 4 string as follows: '+proj=utm +zone=6
> +datum=nad27 +towgs84=-5,135,172' and verify the created projection using
> g.proj, I get the following output:
>
> -PROJ_INFO-------------------------------------------------
> name       : Universal Transverse Mercator
> proj       : utm
> datum      : nad27
> ellps      : clark66
> zone       : 6
> no_defs    : defined
> -PROJ_UNITS------------------------------------------------
> unit       : meter
> units      : meters
> meters     : 1
> +proj=utm +no_defs +zone=6 +a=6378206.4 +rf=294.9786982
> +towgs84=-22.000,157.000,176.000 +to_meter=1
>
> Here it is maintaining the correct ellipsoid, but it does not maintain the
> towgs84 datum transformation parameters.

I'm not 100% sure of this (since the string is being interpreted by GDAL
and not GRASS nor PROJ) but specifying +datum overrides both +ellps and
+towgs84. You are correctly getting Clarke 66 since it is associated with
NAD27, but specifying NAD27 seems to be overriding your towgs84
parameters. I suppose that isn't ideal - but seeing you can work around it
by not specifying the datum, I guess it's OK.

Paul
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: Custom Projection Problems

Paul Kelly
On Tue, 2 Mar 2010, Casey Vandenberg wrote:

> Thanks Paul,
>
> That was a typo on my part when specifying the ellipsoid. By typing in
> clrk66, it does maintain the correct ellipsoid and datum transform
> parameters. It is unnerving though how when I specify the Nad27 datum with an
> associated datum transformation shift, it will reject it and use only the
> nad27 default transformation parameters.

I agree - it could arguably be considered a bug. I've submitted a patch to
GDAL for consideration, which would fix this - see
http://trac.osgeo.org/gdal/ticket/3450

Paul
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user