UTM Zone projection parameters to pass to pj_transform()

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

UTM Zone projection parameters to pass to pj_transform()

Jacques, David - Fort Worth, TX
Dear list...

I am using proj4.4.9 and libgeotiff to read multiple geotiff headers in
order to
 reproject the bounding box from UTM to geographic for an inventory
tracking map.
 However my sample output points from the pj_transform() function are
not correct.

 Below are the input & output coordinate systems, each with their
corresponding line in the epsg file.

  //<26915> +proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m
+no_defs  <>
  static char *utm15n_parms[] =
{"proj=utm","zone=15","ellps=GRS80","datum=NAD83","units=m","no_defs"};

  //<4326> +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  <>
  static char *ddwgs84_parms[] =
{"proj=longlat","ellps=WGS84","datum=WGS84","no_defs"};


What other parameters are needed for the UTM coordinate system ?  
Its supposed to be UTM Zone 15N NAD83 GRS80


Regards


David



_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

RE: UTM Zone projection parameters to pass to pj_transform()

Ed McNierney-4
David -

What are the input and output values you are using, and how are you
concluding they're not correct?

        - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
[hidden email]
(978) 251-4242  

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Jacques, David -
Fort Worth, TX
Sent: Monday, November 28, 2005 2:28 PM
To: [hidden email]
Subject: [Proj] UTM Zone projection parameters to pass to pj_transform()

Dear list...

I am using proj4.4.9 and libgeotiff to read multiple geotiff headers in
order to  reproject the bounding box from UTM to geographic for an
inventory tracking map.
 However my sample output points from the pj_transform() function are
not correct.

 Below are the input & output coordinate systems, each with their
corresponding line in the epsg file.

  //<26915> +proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m
+no_defs  <>
  static char *utm15n_parms[] =
{"proj=utm","zone=15","ellps=GRS80","datum=NAD83","units=m","no_defs"};

  //<4326> +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  <>
  static char *ddwgs84_parms[] =
{"proj=longlat","ellps=WGS84","datum=WGS84","no_defs"};


What other parameters are needed for the UTM coordinate system ?  
Its supposed to be UTM Zone 15N NAD83 GRS80


Regards


David



_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

UTM Zone projection parameters to pass to pj_transform()

Jacques, David - Fort Worth, TX
In reply to this post by Jacques, David - Fort Worth, TX
The output from listgeo is this...

Corner Coordinates:
Upper Left    ( 360427.280,3278421.510)
Lower Left    ( 360427.280,3270801.510)
Upper Right   ( 367182.280,3278421.510)
Lower Right   ( 367182.280,3270801.510)
Center        ( 363804.780,3274611.510)

The corner coordinates in Decimal Degrees should be

Upper Left    ( 29.628626,-94.441707)
Lower Left    ( 29.559135,-94.441707)
Upper Right   ( 29.628626,-94.371019)
Lower Right   ( 29.559135,-94.371019

What I get is...

-1.648319,0.517104
-1.648302,0.515904
-1.647101,0.517117
-1.647085,0.515917

This prompted me to look at the PJ structure in debug mode (watch)
In my Visual Studio 7 IDE. I saw the following string in the
description...

+ descr 0x0043802c "Universal Transverse Mercator (UTM) Cyl, Sph
zone= south" const char *

Funny how I didn't specify "south".

This led me to believe I need to specify more parameters.


David

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: UTM Zone projection parameters to pass to pj_transform()

Eric Miller-4
In reply to this post by Jacques, David - Fort Worth, TX
The results look like they're still in radians.  Multiply by 180 / M_PI (or use the RAD_TO_DEG macro).  You can use the pj_is_latlong() function to test if a projection is latlong and then conditionally convert from/to radians.

Eric G. Miller
GIS Analyst
Wildlife and Habitat Data Analysis Branch
Department of Fish and Game

>>> [hidden email] 11/28/2005 12:13:28 PM >>>
The output from listgeo is this...

Corner Coordinates:
Upper Left    ( 360427.280,3278421.510)
Lower Left    ( 360427.280,3270801.510)
Upper Right   ( 367182.280,3278421.510)
Lower Right   ( 367182.280,3270801.510)
Center        ( 363804.780,3274611.510)

The corner coordinates in Decimal Degrees should be

Upper Left    ( 29.628626,-94.441707)
Lower Left    ( 29.559135,-94.441707)
Upper Right   ( 29.628626,-94.371019)
Lower Right   ( 29.559135,-94.371019

What I get is...

-1.648319,0.517104
-1.648302,0.515904
-1.647101,0.517117
-1.647085,0.515917

This prompted me to look at the PJ structure in debug mode (watch)
In my Visual Studio 7 IDE. I saw the following string in the
description...

+ descr 0x0043802c "Universal Transverse Mercator (UTM) Cyl, Sph
zone= south" const char *

Funny how I didn't specify "south".

This led me to believe I need to specify more parameters.


David

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj


_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

RE: UTM Zone projection parameters to pass to pj_transform()

Ed McNierney-4
In reply to this post by Jacques, David - Fort Worth, TX
David -

Those output numbers look like radians, not degrees.

        - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
[hidden email]
(978) 251-4242  

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Jacques, David -
Fort Worth, TX
Sent: Monday, November 28, 2005 3:13 PM
To: [hidden email]
Subject: [Proj] UTM Zone projection parameters to pass to pj_transform()

The output from listgeo is this...

Corner Coordinates:
Upper Left    ( 360427.280,3278421.510)
Lower Left    ( 360427.280,3270801.510)
Upper Right   ( 367182.280,3278421.510)
Lower Right   ( 367182.280,3270801.510)
Center        ( 363804.780,3274611.510)

The corner coordinates in Decimal Degrees should be

Upper Left    ( 29.628626,-94.441707)
Lower Left    ( 29.559135,-94.441707)
Upper Right   ( 29.628626,-94.371019)
Lower Right   ( 29.559135,-94.371019

What I get is...

-1.648319,0.517104
-1.648302,0.515904
-1.647101,0.517117
-1.647085,0.515917

This prompted me to look at the PJ structure in debug mode (watch) In my
Visual Studio 7 IDE. I saw the following string in the description...

+ descr 0x0043802c "Universal Transverse Mercator (UTM) Cyl, Sph
zone= south" const char *

Funny how I didn't specify "south".

This led me to believe I need to specify more parameters.


David

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

UTM Zone projection parameters to pass to pj_transform()

Jacques, David - Fort Worth, TX
In reply to this post by Jacques, David - Fort Worth, TX
Eric...

That did the trick.
Though I am puzzled that the output doesn't have staight edges.

-94.441707,29.627886
-94.440730,29.559136
-94.371949,29.628626
-94.371019,29.559874

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

UTM Zone projection parameters to pass to pj_transform()

Jacques, David - Fort Worth, TX
In reply to this post by Jacques, David - Fort Worth, TX
Actually now that I think about it it makes sense.
If it is square in UTM... It will be rotated somewhat.

So nix that last comment.

David




_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

RE: UTM Zone projection parameters to pass to pj_transform()

Ed McNierney-4
In reply to this post by Jacques, David - Fort Worth, TX
David -

You should expect that.  A rectangle in UTM coordinate space is NOT a
rectangle in lat/lon space.  Make sure you take that into account when
you use the reprojected data coordinates.

        - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
[hidden email]
(978) 251-4242

 

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Jacques, David -
Fort Worth, TX
Sent: Monday, November 28, 2005 3:53 PM
To: [hidden email]
Subject: [Proj] UTM Zone projection parameters to pass to pj_transform()

Eric...

That did the trick.
Though I am puzzled that the output doesn't have staight edges.

-94.441707,29.627886
-94.440730,29.559136
-94.371949,29.628626
-94.371019,29.559874

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

RE: UTM Zone projection parameters to pass to pj_transform()

Curt, WE7U
On Mon, 28 Nov 2005, Ed McNierney wrote:

> You should expect that.  A rectangle in UTM coordinate space is NOT a
> rectangle in lat/lon space.  Make sure you take that into account when
> you use the reprojected data coordinates.

The fun part is that straight lines ain't straight anymore either.
;-)

--
Curt, WE7U.   APRS Client Comparisons: http://www.eskimo.com/~archer
"Lotto:    A tax on people who are bad at math." -- unknown
"Windows:  Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me:  I picked the coordinate system!"
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

RE: UTM Zone projection parameters to pass to pj_transform()

Ed McNierney-4
In reply to this post by Jacques, David - Fort Worth, TX
David -

It is also possible to have a rectangle in UTM space contain points that
are NOT inside the quadrilateral formed by connecting the four
reprojected corner points into lat/lon space.  Conversely, there can be
points inside that lat/lon quadrilateral that were NOT inside the UTM
rectangle.  You might need to keep that in mind depending on how fussy
your application is.

        - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
[hidden email]
(978) 251-4242  

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Jacques, David -
Fort Worth, TX
Sent: Monday, November 28, 2005 4:01 PM
To: [hidden email]
Subject: [Proj] UTM Zone projection parameters to pass to pj_transform()

Actually now that I think about it it makes sense.
If it is square in UTM... It will be rotated somewhat.

So nix that last comment.

David




_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj