Thanks to Kit Baum, a new command called geocircles is now available from SSC.
geocircles creates polygons that approximate the shape of circles drawn on a sphere. Each polygon point is at a great-circle distance from the center point, defined by its latitude and longitude. A great-circle distance is the shortest distance between two points measured along the surface of a sphere.
geocircles generates two datasets that follow the model used by shp2dta (from SSC) when converting shapefiles to Stata datasets.
Circles generated by geocircles will appear deformed if plotted using unprojected coordinates. Use geo2xy (from SSC, see announcement here) to apply a map projection to geographic coordinates before creating a map in Stata.
Thanks to Luca Aguzzoni who asked a question a few weeks ago about creating a map that would show a point and a circle around it. My proposed solution evolved into geocircles.
To install geocircles, type in Stata's command window
geocircles creates polygons that approximate the shape of circles drawn on a sphere. Each polygon point is at a great-circle distance from the center point, defined by its latitude and longitude. A great-circle distance is the shortest distance between two points measured along the surface of a sphere.
geocircles generates two datasets that follow the model used by shp2dta (from SSC) when converting shapefiles to Stata datasets.
Circles generated by geocircles will appear deformed if plotted using unprojected coordinates. Use geo2xy (from SSC, see announcement here) to apply a map projection to geographic coordinates before creating a map in Stata.
Thanks to Luca Aguzzoni who asked a question a few weeks ago about creating a map that would show a point and a circle around it. My proposed solution evolved into geocircles.
To install geocircles, type in Stata's command window
Code:
ssc install geocircles
Comment