Failing to convert XYZ to DMS

  • Failing to convert XYZ to DMS

    Posted by Adi17 on October 30, 2021 at 2:10 am

    Hi reader,

    Could someone please help to just explain how to do the conversion, any link or formula? I am happy to study and do the rest, just need to be pointed in the right direction

    The situation is:-

    I work in Railway as a track maintainer and have very little knowledge of GPS coordinates and surveying.

    I am trying to make a KML file to use in google earth to easily navigate along the track for locating signalling assets.

    I have a list of locations(Melbourne, Australia) in a spreadsheet whose coordinates are in geometry(XYZ) format and I am trying to convert it to Lat Lon in DMS so I can make KML file. I checked the majority of converters online available but I am struggling to understand how to do the conversion. By using google map I extracted Lat and Lon in DMS. Can some please help?

    For example, in the spreadsheet, I have the following XYZ data:-

    X: 16151807.3405 Y: -4566010.7186 Z: NaN

    When I track the location on google map I found the value in Lat Lon is

    Lat: 37?ø 54′ 17.91383″ S
    Lon: 145?ø 5′ 38.94994″ E

    .Thank you 

    Adi

     

    mathteacher replied 2 years, 3 months ago 7 Members · 25 Replies
  • 25 Replies
  • john-nolton

    john-nolton

    Member
    October 30, 2021 at 3:19 am

    Adi   one thing I see right off is you have something wrong with your X coord. Please check you data.

    I have one question for you;  for the Z coord. what is   NaN

    I am sure that Australia has some transformation software but you can get up on the internet and go to NGS web site and use their software.

    JOHN NOLTON

  • bill93

    bill93

    Member
    October 30, 2021 at 3:29 am

    @john-nolton 

    NaN is computerese for Not a Number, meaning it has no usable value.

    Someone should be along eventually who can tell how to convert what appears to be a projection grid system used there.

    Perhaps this will help with an overview

    https://parametricmonkey.com/2020/04/08/understanding-australias-coordinate-systems/


    .
  • john-nolton

    john-nolton

    Member
    October 30, 2021 at 3:33 am

    @bill93   They use Lat, Long and elev. just like we do he in the good old USA; except their Lat. is -(minus) and their Long. is East.

    JOHN NOLTON

  • bill93

    bill93

    Member
    October 30, 2021 at 3:39 am

    @john-nolton 

    His X and Y look like their version of USA State Plane systems or UTM. He needs to get from whichever system that is to lat-lon of its datum, and if that isn’t close enough then to whatever datum Google uses.


    .
  • dave-karoly

    dave-karoly

    Member
    October 30, 2021 at 3:52 am

    The lat/long goes to a RR near Melbourne

    UTM Zone 55 South

    X=332448.39

    Y=5803015.65

     

  • dave-karoly

    dave-karoly

    Member
    October 30, 2021 at 4:03 am
    Posted by: @bill93

    @john-nolton 

    His X and Y look like their version of USA State Plane systems or UTM. He needs to get from whichever system that is to lat-lon of its datum, and if that isn’t close enough then to whatever datum Google uses.

    They arenƒ??t UTM. Australia seems to use UTM according to their version of NGS.

  • john-nolton

    john-nolton

    Member
    October 30, 2021 at 4:07 am

    @dave-karoly  Don’t know what is going on yet with his Coord. He has to come back with more information and then I am sure we can help him. Instead of getting more white hair I will let him tell us what system he is on. The first thing I thought of , in this modern day of GPS was ECEF  XYZ coord. There is plenty of information on whatever system he has. It sounds like he is just getting started and wants to learn more (GOOD FOR HIM).

    JOHN NOLTON

  • dave-karoly

    dave-karoly

    Member
    October 30, 2021 at 4:17 am

    This is from the NGS Lat Long to ECEF converter (XYZ):

    =============================================================
               Latitude           Longitude      Ellip_Ht   Ellipsoid
     INPUT =   S375417.91383      E1450538.94994 1.000      GRS80    
     =============================================================
    
    
      X (Meters)    Y (Meters)    Z (Meters)    ELLIPSOID
      ------------- ------------- ------------- ---------
    
      -4132382.7775  2883417.1605 -3897127.8659 GRS80
  • dave-karoly

    dave-karoly

    Member
    October 30, 2021 at 4:20 am
    Posted by: @john-nolton

    @dave-karoly  Don’t know what is going on yet with his Coord. He has to come back with more information and then I am sure we can help him. Instead of getting more white hair I will let him tell us what system he is on. The first thing I thought of , in this modern day of GPS was ECEF  XYZ coord. There is plenty of information on whatever system he has. It sounds like he is just getting started and wants to learn more (GOOD FOR HIM).

    JOHN NOLTON

    It doesnƒ??t look like either UTM or ECEF (which requires a Y).

  • bill93

    bill93

    Member
    October 30, 2021 at 4:22 am

    The lat-lon at zero ellipsoid height converts to WGS84 or similar systems meters

    -4,132,382.130
    2,883,416.709
    -3,897,127.252
    so we can rule out that he has world coordinates with the Z missing.

    .
  • dave-karoly

    dave-karoly

    Member
    October 30, 2021 at 4:43 am
    Posted by: @bill93

    The lat-lon at zero ellipsoid height converts to WGS84 or similar systems meters

    -4,132,382.130
    2,883,416.709
    -3,897,127.252
    so we can rule out that he has world coordinates with the Z missing.

    TBC has a bunch of choices for Australia.  I tried VICGRID but it doesn’t look the same:

     

    12508280.0982399567.190-4.694RR
  • dave-karoly

    dave-karoly

    Member
    October 30, 2021 at 4:52 am

    I tried a bunch of different choices for Australia but none of them fit in TBC.  I even tried UTM Zone 54.

    Maybe the RR has their own map projection.  The source of the XY data hopefully has information about the source.

  • john-nolton

    john-nolton

    Member
    October 30, 2021 at 5:12 am

    @dave-karoly   Dave, give your self a rest. Let Ari give us the details of the projection. Also remember that the UTM south of the equator has a + 10 000 000 meter added to the North Coord.(x (small x, not large X used in ECEF coord.)).

    I am sure we will hear back from Adi17

    JOHN NOLTON

  • geeoddmike

    geeoddmike

    Member
    October 30, 2021 at 6:44 am

    Once you resolve what Cartesian system your coordinates are in you can use tools at the following site:

    https://www.icsm.gov.au/datum/gda-transformation-products-and-tools

    In your post you refer to converting XYZ to DMS. You further explain you mean latitude and longitude. You provide an XY coordinate but not a Z. Likewise the geographic coordinate you provide are only latitude and longitude but no (ellipsoid height).

    Earth Centered Earth Fixed XYZ coordinates can be readily transformed into Latitude, Longitude and ellipsoid height with a number of web-based tools like this one:

    https://geodesy.noaa.gov/TOOLS/XYZ/xyz.shtml

    BTW doing the computations by hand yields decimal degrees which are easily converted to degrees, minutes and seconds. 

    This leads me (and other posters) to believe your Cartesian coordinates are plane coordinates in some system. What was the source of your coordinates?

     

  • Adi17

    Adi17

    Member
    October 30, 2021 at 12:26 pm
    Posted by: @john-nolton

    @dave-karoly  Don’t know what is going on yet with his Coord. He has to come back with more information and then I am sure we can help him. Instead of getting more white hair I will let him tell us what system he is on. The first thing I thought of , in this modern day of GPS was ECEF  XYZ coord. There is plenty of information on whatever system he has. It sounds like he is just getting started and wants to learn more (GOOD FOR HIM).

    JOHN NOLTON

    Thank you, @dave-karoly, @@john-nolton, @bill93, @geeoddmike very much appreciate your time.

    And indeed I am just getting started with the coordinates system and found out that Google earth can be a game-changer for my for me and my colleague. It will help us not to carry drawings always with us when we walk across track in night.

    To provide you guys with more information, I did a bit of digging and found the below information.

    On the webpage, it says this application uses the ArcGIS Platform and Geocortex Essential.

    When I point the cursor on the location to show more info, I get 4 options to show the coordinates. It says Lat Long in DD, Lat Long in DMS, MGA Zone 55 (GDA 1194) and MGA Zone 55 (GDA 2020). The values are as follow( I have attached a few screenshots of what I saw on the webpage)

    Address for that coordinate is: Haughton Rd, Oakleigh, Melbourne, Victoria, 3166

    Lat Long in DD

    X: 145.09417

    Y: -37.90497

     

    Lat Long in DMS

    Lat: 37?ø 54′ 17.91172″ S

    Lon: 145?ø 5′ 38.95825″ E

     

    MGA Zone 55 (GDA 1994)

    X: 332449.49908

    Y: 5803016.67281

     

    MGA Zone 55 (GDA 2020)

    X: 332447.58846

    Y: 5803017.80855

    The above values I extracted manually. 

    Now when I  export data as a CSV spreadsheet for some reason it shows geometry in XYZ.

     

    Please let me know if can assist you with any further information. Let me know if the screenshot is blurry, will send again.

    I am truly overwhelmed with the support I recieved, can’t thank you enough guys.

  • dave-karoly

    dave-karoly

    Member
    October 30, 2021 at 2:26 pm

    The MGA coordinates are in the UTM map projection. UTM (Universal Transverse Mercator) is a set of projections which cover the entire earth. You are in Zone 55 South. A map projection converts coordinates on a spherical earth to a flat plane (more convenient for calculations) so there is distortion in direction and distances.

    ECEF (Earth Centered Earth Fixed) is a system of spherical coordinates in XYZ format.

    The coordinates in your Excel worksheet donƒ??t look like either of those. You would need to try to find out how they were derived.

  • john-nolton

    john-nolton

    Member
    October 30, 2021 at 4:05 pm

    Adi17 thanks for your last post. It clears things up.

    MGA = Map Grid Australia

    GDA = Geocentric Datum Australia

    Now with  geeoddmike post above and Bill93 post on the 1st page you can now work through your problem. Use geeoddmike

    1st link. Read both his 1st link and Bill93 post on page 1.

    Taking your post of the Lat, Long of Lat. = 37 54 17.91383S and Long. of  145 05 38.94994E you will get the ;

    Zone 55, Hemisphere South, Easting  332448.373 and Northing of 5803015.645 

    Please Note the program print-out does not specify the units of the coord. but it metre

    Does this help?

    JOHN NOLTON

  • dave-karoly

    dave-karoly

    Member
    October 30, 2021 at 4:48 pm

    @john-nolton Adi17 is trying to convert a grid coordinate to lat/long. A grid coordinate that doesnƒ??t look like any of the Australian projections published on the internet. The coordinates on the left side of his screenshot from Excel are the ones he is trying to convert. Without more information it is impossible to do.

  • brad-ott

    brad-ott

    Member
    October 30, 2021 at 4:55 pm

    Excellent work here, good folks all.

  • john-nolton

    john-nolton

    Member
    October 30, 2021 at 5:53 pm
    Posted by: @dave-karoly

    @john-nolton Adi17 is trying to convert a grid coordinate to lat/long. A grid coordinate that doesnƒ??t look like any of the Australian projections published on the internet. The coordinates on the left side of his screenshot from Excel are the ones he is trying to convert. Without more information it is impossible to do.

    Dave K.  Adi17 has some coord. that came from someplace which he did not understand (his very 1st post); The X value did not look good to me and I asked for more information.This Adi17 gave us. Now on page 2 (just above) he gives us 4 sets of coord. that he is trying to understand. His first is X: 145.09417 and Y: -37.90497 (This he calls Lat long in DD) (here I thing it should not be X and Y but label them as Lat. and Long). We can convert that set to deg. min. sec. as;

    Lat -37.90497 D.D = -37d 54m 17.892 s  and Long. 145.09417 D.D = 145d 05m 39.012 s.  Now this is close to his value he gives on the next entry below of Lat Long in DMS he has Lat: 37d 54m 17.91172s South and Lon: 145d 5m 38.95825s E.

    Ok now I took his Lat/Long of his very 1st post of 37-54-17.91383 South and 145-05-38.94994 E and transformed them to Zone 55 south and got Easting of 332448.373 and a Northing of 5803015.645. I did this for 2 reasons; 1st to show that in his very 1st post he gave us some wrong coord. and 2nd to show Ari17 that if you convert (transform) from Lat/Long what the coord. will be. Which just happen to be close to his MGA zone 55 (GDA 1994) and his MGA zone 55 (GDA 2020). If you transform from Lat/Long to x/y coord. you sure can transform from from x & y to Lat/Long by using   geeoddmike 1st link. Since he is trying to learn I am leaving it up to Adi17 to do this and get back to us if he needs anymore help.

    JOHN NOLTON

Page 1 of 2

Log in to reply.