2 Replies Latest reply on Mar 24, 2018 8:03 AM by Christopher Jenkins

    Formatting Latitude and Longitude

    Christopher Jenkins

      Good evening. I am trying to map latitude and longitude data which comes from a live connection to SQL server however the latitude and longitude data is stored as whole numbers IE no decimal points and the longitude is negative but stored as a positive. Is there an easy way to format the data or a calculation to get the data to a place where I can use it on a spatial map? I am using Tableau Desktop 10.4. I cannot scrub potentially protected data from the packaged workbook and therefore am unable to post at this time however will update if I can. Thank you in advance for the help.

        • 1. Re: Formatting Latitude and Longitude
          nikher verma

          Hi Christopher ,

           

          Where you are using this data, I mean you have mentioned - "the longitude is negative but stored as a positive" .

           

          But Longitude designates East and West of the Prime Meridian.

          A negative latitude means South of the Equator, and a negative longitude means West of the Prime Meridian.

          Location data is often represented in the form of latitude and longitude pairs like below:

          38.427619, 102.166972 :: Its some where in china .

          38.427619, - 102.166972 :: Its some where in US

          So look just because you have stored data where negative longitude  is stored as positive ,you are in china instead of USA.

           

          The simple framework below can help you decode the location pairs.

          + + : North and East
          + -  : North and West
          - -   : South and West
          - +  : South and East

          Please check your data table again this cant be possible if its a real data .

          -Nikher

          • 2. Re: Formatting Latitude and Longitude
            Christopher Jenkins

            Since all of my location data is from the same geographical area I was able to multiply to move the decimal points and it is working just fine. Thank you.