Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Geodist command

    Dear Statalist experts

    I want to use the command geodist to calculate the distance from each individual's domicile area to his employment area. I have longitudes and latitudes for each area and the command I use is: "geodist dlat dlong elat elong, gen(distance)". I get the error r(198): latitude 1 must be between -90 and 90.

    My longitudes and latitudes are in the following format: "435187.565". Is this a format that geodist does not support?

    Your help will be appreciated a lot.

    Konstantina

  • #2
    -help geodist- says "Coordinates must be in signed decimal degrees, positive for north and east, and negative for south and west. Latitudes range from -90 to 90 and longitudes from -180 to 180." You'll need to translate your data to this system. I'm not familiar with lat/long represented as you show, but perhaps someone else is.

    Comment


    • #3
      Thanks a lot for your quick response. Indeed I was using lat/long in km rather than decimal degrees. Now that I converted it works perfectly.

      Comment

      Working...
      X