ITRF96/UTM 36N conversion

7 messages Options
Embed this post
Permalink
fernandohoze

ITRF96/UTM 36N conversion

Reply Threaded More More options
Print post
Permalink
Hello,

I would like to convert coordinates in ITRF96 / UTM-36N format (measured with DGPS) to latitude and longitude values that I can use with Google Maps. I tried to do the conversion using proj but I couldn't do it. What command should I use for this?

This is what my coordinates file looks like:

2   4415699.244828   482321.027219   950.950000   5 | 2 | 1.400
3   4415697.320372   482321.307750   951.050000   5 | 2 | 1.400
4   4415696.356924   482321.975236   951.050000   4 | 2 | 1.000

This is what I want:

2   39.8911748   32.7932165
3   39.8911574   32.7932198
4   39.8911488   32.7932277

I also would like to find the distance (in meters) between two points whose ITRF96 / UTM-36N coordinates are known. I googled it but I didn't find anything about it. Can you please help me with this?

Thanks.
José Alberto Gonçalves

Re: ITRF96/UTM 36N conversion

Reply Threaded More More options
Print post
Permalink
In order to convert UTM-36N to long-lat with output in decimal degrees you can use the following PROJ command line:

proj -I -f "%.9f" +ellps=WGS84 +proj=utm +zone=36

You must reformat your file so that each line starts with Easting (E) and Northing (N), in this order (your file has ID N E ...) and then the rest of the data.

To calculate distance you can use program GEOD (manpage http://proj.maptools.org/man_geod.html), which receives coordinates in lat-long.
Depending on the accuracy you need, it may be acceptable to calculate the euclidean distance in UTM.

Regards 

Jose' Gonçalves





2009/8/7 fernandohoze <[hidden email]>

Hello,

I would like to convert coordinates in ITRF96 / UTM-36N format (measured
with DGPS) to latitude and longitude values that I can use with Google Maps.
I tried to do the conversion using proj but I couldn't do it. What command
should I use for this?

This is what my coordinates file looks like:

2   4415699.244828   482321.027219   950.950000   5 | 2 | 1.400
3   4415697.320372   482321.307750   951.050000   5 | 2 | 1.400
4   4415696.356924   482321.975236   951.050000   4 | 2 | 1.000

This is what I want:

2   39.8911748   32.7932165
3   39.8911574   32.7932198
4   39.8911488   32.7932277

I also would like to find the distance (in meters) between two points whose
ITRF96 / UTM-36N coordinates are known. I googled it but I didn't find
anything about it. Can you please help me with this?

Thanks.
--
View this message in context: http://n2.nabble.com/ITRF96-UTM-36N-conversion-tp3404575p3404575.html
Sent from the PROJ.4 mailing list archive at Nabble.com.
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj


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

Re: ITRF96/UTM 36N conversion

Reply Threaded More More options
Print post
Permalink
In reply to this post by fernandohoze
On Friday 07 August 2009 10:07:19 am fernandohoze wrote:

> Hello,
>
> I would like to convert coordinates in ITRF96 / UTM-36N format (measured
> with DGPS) to latitude and longitude values that I can use with Google
> Maps. I tried to do the conversion using proj but I couldn't do it. What
> command should I use for this?
>
> This is what my coordinates file looks like:
>
> 2   4415699.244828   482321.027219   950.950000   5 | 2 | 1.400
> 3   4415697.320372   482321.307750   951.050000   5 | 2 | 1.400
> 4   4415696.356924   482321.975236   951.050000   4 | 2 | 1.000
>
> This is what I want:
>
> 2   39.8911748   32.7932165
> 3   39.8911574   32.7932198
> 4   39.8911488   32.7932277
>
> I also would like to find the distance (in meters) between two points whose
> ITRF96 / UTM-36N coordinates are known. I googled it but I didn't find
> anything about it. Can you please help me with this?
>
> Thanks.

Using the script:

#!/bin/bash
lproj +proj=utm +ellps=WGS84 +lon_0=-39.1 -I -r -f %.7f <<EOF
4415699.244828   482321.027219   950.950000   5 | 2 | 1.400
4415697.320372   482321.307750   951.050000   5 | 2 | 1.400
4415696.356924   482321.975236
EOF

This is what I get:

-39.2067835     39.8911747   950.950000   5 | 2 | 1.400
-39.2067802     39.8911573   951.050000   5 | 2 | 1.400
-39.2067723     39.8911487

Note: the true CM gets automatically set in this case to 39W.  Note that the
program had to be told that the x-y input was in reverse order (-r option).  
I also had to guess that the longitude you gave was west as the output would
not have agreed.

The longitude seems to agree reasonably well but the latitude is real strange!

--
The whole religious complexion of the modern world is due
to the absence from Jerusalem of a lunatic asylum.
-- Havelock Ellis (1859-1939) British psychologist
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Gerald I. Evenden

Re: ITRF96/UTM 36N conversion

Reply Threaded More More options
Print post
Permalink
In reply to this post by José Alberto Gonçalves
On Friday 07 August 2009 10:38:20 am Jose Gonçalves wrote:
> In order to convert UTM-36N to long-lat with output in decimal degrees you
> can use the following PROJ command line:
> proj -I -f "%.9f" +ellps=WGS84 +proj=utm +zone=36
>
> You must reformat your file so that each line starts with Easting
> (E) and Northing (N), in this order (your file has ID N E ...) and then the
> rest of the data.

As I indicated in my previous email, use [l]proj -r option to reverse meaning
of input sequence.   NO need to reformat input!

--
The whole religious complexion of the modern world is due
to the absence from Jerusalem of a lunatic asylum.
-- Havelock Ellis (1859-1939) British psychologist
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
support.mn

Re: ITRF96/UTM 36N conversion

Reply Threaded More More options
Print post
Permalink
In reply to this post by fernandohoze
Hello,

if you have wrong false easting / northing values?

Wikipedia tells:

"A position on the Earth is referenced in the UTM system by the UTM zone, and the easting and northing coordinate pair. The easting is the projected distance of the position from the central meridian, while the northing is the projected distance of the point from the equator. The point of origin of each UTM zone is the intersection of the equator and the zone's central meridian. In order to avoid dealing with negative numbers, the central meridian of each zone is given a "false easting" value of 500,000 meters. Thus, anything west of the central meridian will have an easting less than 500,000 meters. For example, UTM eastings range from 167,000 meters to 833,000 meters at the equator (these ranges narrow towards the poles). In the northern hemisphere, positions are measured northward from the equator, which has an initial "northing" value of 0 meters and a maximum "northing" value of approximately 9,328,000 meters at the 84th parallel — the maximum northern extent of the UTM zones. In the southern hemisphere, northings decrease as you go southward from the equator, which is given a "false northing" of 10,000,000 meters so that no point within the zone has a negative northing value."

http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system

Janne. / MNS Support

-----------------------------------------------

"Gerald I. Evenden" [[hidden email]] kirjoitti:

> >
> > This is what I want:
> >
> > 2   39.8911748   32.7932165
> > 3   39.8911574   32.7932198
> > 4   39.8911488   32.7932277
> >
>
> This is what I get:
>
> -39.2067835     39.8911747   950.950000   5 | 2 | 1.400
> -39.2067802     39.8911573   951.050000   5 | 2 | 1.400
> -39.2067723     39.8911487
>
> The longitude seems to agree reasonably well but the latitude is real strange!



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

Re: ITRF96/UTM 36N conversion

Reply Threaded More More options
Print post
Permalink
In reply to this post by José Alberto Gonçalves
José Alberto Gonçalves wrote:
In order to convert UTM-36N to long-lat with output in decimal degrees you
can use the following PROJ command line:
proj -I -f "%.9f" +ellps=WGS84 +proj=utm +zone=36
Thank you all for your replies. I tried the command José wrote (with -r flag - thanks Gerald) and it worked well. The command also works without reformatting the input.

About calculating distance between two points... José, I examined the program you recommended and I have some results but I need to make sure that they are correct. Here is what I did:

First of all, here are the input points:

4415488.923061 481668.789218
4415490.272973 481668.977703


I found latitude and longtitude using the following command:

proj -r -I -f "%.9f" +ellps=WGS84 +proj=utm +zone=36

Results:

32.785593500    39.889265833
32.785595667    39.889278000


So, when I wrote these into Google Maps (in reverse order,) it correctly showed the points:

39.889265833   32.785593500
39.889278000   32.785595667


Then, I executed the following geod command:

geod +ellps=WGS84

As input I wrote the above numbers. As output I received the latitude and longtitude in degree/minute/second format:

39d53'21.357"N  32d47'8.137"E   180d
39d53'21.401"N  32d47'8.144"E   180d

Then, I executed this command for distance calculation:

geod +ellps=WGS84 -I +units=km

And entered the above coordinates as input:

39d53'21.357"N  32d47'8.137"E   39d53'21.401"N  32d47'8.144"E

The result was:

6d59'12.829"    -173d0'47.167"  0.001

0.001 at the end of the result tells that the distance is around 0.001 km that is 1 meters. So, I tried the command with +units=m and the result was

6d59'12.829"    -173d0'47.167"  1.368

That is 1.368 meters, which seems to be correct. I did the same calculation using this web page and the result was 0.001369 km. So, I guess I used the correct commands. The inputs I used for the web page were like that:

Lat 1: 39 53 21.357N
Long 1: 32 47 8.137E
Lat 2: 39 53 21.401N
Long 2: 32 47 8.144E


There is one problem here that I don't get. When I use cm or dm for +units option, I still get 1.368 insted of 136.8 for cm and 13.86 for dm. Actually, if I don't use any +units option, I still get 1.368 as the result. Is there something wrong with the command I use or am I missing something?

I also tried everything above with the following inputs:

4415475.022910 481656.729116 918.850000
4415473.636002 481656.540539 918.850000


And in the end I got 1.195 as the results, which is reasonable. The web site gave 0.001194 km.

I tried to write everything I did step by step. Could you please tell me if above calculations are correct or not. Also I would appreciate if you tell me a command that would do all the computation above.
José Alberto Gonçalves

Re: ITRF96/UTM 36N conversion

Reply Threaded More More options
Print post
Permalink

Mr. Gerald Evenden can clear your doubts about GEOD, since he is the author of the program. I have used it only occasionally.

Anyway some comments on your experiments: If you are comparing distances at millimetre level be aware that when you round your geographic coordinates with 3 decimal places in seconds you are introducing an error of up to 1.5 cm, so your distance can be affected by a few centimetres. You can increase the decimal places of the proj output (-W5, for 5 decimal places in seconds or use decimal degrees).

If your distances are that small, i.e., just a few meters, then you can calculate the distance in UTM just as the Euclidean distance (sqrt((x2-x1)^2+(y2-y1)^2)). The deformation in UTM projection (within one zone) is most of the times smaller than 40 cm per km, and you can calculate it and apply it if needed.

Regards


Jose Gonçalves

 


2009/8/8 fernandohoze <[hidden email]>


José Alberto Gonçalves wrote:
>
> In order to convert UTM-36N to long-lat with output in decimal degrees you
> can use the following PROJ command line:
> proj -I -f "%.9f" +ellps=WGS84 +proj=utm +zone=36

Thank you all for your replies. I tried the command José wrote (with -r flag
- thanks Gerald) and it worked well. The command also works without
reformatting the input.

About calculating distance between two points... José, I examined the
program you recommended but and I have some results but I need to make sure
that they are correct. Here is what I did:

First of all, here are the input points:

4415488.923061 481668.789218
4415490.272973 481668.977703

I found latitude and longtitude using the following command:

proj -r -I -f "%.9f" +ellps=WGS84 +proj=utm +zone=36

Results:

32.785593500    39.889265833
32.785595667    39.889278000

So, when I wrote these into Google Maps (in reverse order,) it correctly
showed the points:

39.889265833   32.785593500
39.889278000   32.785595667

Then, I executed the following geod command:

geod +ellps=WGS84

As input I wrote the above numbers. As output I received the latitude and
longtitude in degree/minute/second format:

39d53'21.357"N  32d47'8.137"E   180d
39d53'21.401"N  32d47'8.144"E   180d

Then, I executed this command for distance calculation:

geod +ellps=WGS84 -I +units=km

And entered the above coordinates as input:

39d53'21.357"N  32d47'8.137"E   39d53'21.401"N  32d47'8.144"E

The result was:

6d59'12.829"    -173d0'47.167"  0.001

0.001 at the end of the result tells that the distance is around 0.001 km
that is 1 meters. So, I tried the command with +units=m and the result was

6d59'12.829"    -173d0'47.167"  1.368

That is 1.368 meters, which seems to be correct. I did the same calculation
using  http://www.movable-type.co.uk/scripts/latlong.html this web page  and
the result was 0.001369 km. So, I guess I used the correct commands. The
inputs I used for the web page were like that:

Lat 1: 39 53 21.357N
Long 1: 32 47 8.137E
Lat 2: 39 53 21.401N
Long 2: 32 47 8.144E

There is one problem here that I don't get. When I use cm or dm for +units
option, I still get 1.368 insted of 136.8 for cm and 13.86 for dm. Actually,
if I don't use any +units option, I still get 1.368 as the result. Is there
something wrong with the command I use or am I missing something?

I also tried everything above with the following inputs:

4415475.022910  481656.729116   918.850000
4415473.636002  481656.540539   918.850000

And in the end I got 1.195 as the results, which is reasonable. The web site
gave 0.001194 km.

I tried to write everything I did step by step. Could you please tell me if
above calculations are correct or not. Also I would appreciate if you tell
me a command that would do all the computation above.
--
View this message in context: http://n2.nabble.com/ITRF96-UTM-36N-conversion-tp3404575p3409993.html
Sent from the PROJ.4 mailing list archive at Nabble.com.
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj


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