Announcement

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

  • New on SSC: Map Projections with -geo2xy-

    A few weeks ago, Luca Aguzzoni asked about creating a map that would show a point and a circle around it. My proposed solution evolved into geocircles (now on SSC, see the announcement here).

    At the time, I sidestepped the issue of how a polygon that accurately describes a circle on a sphere using geographic coordinates would appear on a map. When trying out examples for geocircles, it became apparent that when many circles are drawn on a map that covers a large area, my go-to solution of simply adjusting the map's aspect ratio just does not work well enough.

    The solution was to bring map projections to the Stata community. With geo2xy, now available from SSC (many thanks to Kit Baum), you can easily convert geographic latitude and longitude to cartesian coordinates using map projection transformations. If you don't choose a projection, geo2xy will use a Web Mercator projection, which is used by Google Maps and many other web mapping applications.

    When I started to compare projections using geo2xy, I found that using circles is an excellent way to visualize the inevitable distortions inherent to map projections. So geo2xy includes an option to generate Tissot's Indicatrix, which is a fancy way to say: overlay a bunch of circles arranged on a lat/lon grid over a map.

    It's tempting to think that if it's good enough for Google Maps, it's good enough for my map. The good thing about Google Maps' projection is that it is conformal, which preserves the shape of small circles. The bad thing is that a circle appears larger and larger as you move it towards the pole. For maps that cover vast east-west extents like the conterminous USA or anything at a high latitude like the state of Alaska, geo2xy provides the Albers projection, an equal-area conic projection that keeps the area of small objects constant.

    geo2xy supports only a small subset of well-known map projections. By design, geo2xy is modular and it should be relatively easy to add more projections. Suggestions are welcome (even better if code is provided) but you should know that your suggestion may reveal something about you; apparently I've been a closeted Plate Carrée type for years.

    To install geo2xy, type in Stata's command window

    Code:
    ssc install geo2xy
    Last edited by Robert Picard; 02 Apr 2015, 08:54.

  • #2
    The geographer inside me just woke up. As often happens, it is scary, or salutary, how an xkcd cartoon can say more than many papers by people who've been working in a field for a long time. (See Robert's link.)

    On map projections, Snyder's account is authoritative and more fun than might be guessed:

    http://www.amazon.com/Flattening-Ear...dp/0226767477/

    Monmonier's account is very light, although anyone at all technical would prefer Snyder:

    http://www.amazon.com/Rhumb-Lines-Ma...dp/0226534316/

    Comment


    • #3
      Looks pretty interesting! Thanks

      Comment

      Working...
      X