![]() ![]() number of points needed to keep the segments at < 0. Make sure that the line segments are short. * We will need to measure the distance between points in Texas to the * Drop a point that is an obvious error in the data a new polygon starts with missing values for lat/lon GEODIST: Stata module to compute geographical distances Robert Picard ( ) Statistical Software Components from Boston College Department of Economics Abstract: geodist calculates geographical distances by measuring the length of the shortest path between two points along the surface of a mathematical model of the earth. Is there a way to take a shapefile (e.g., the Census TIGER/Line state shapefile) and create dataset with the set of points along the border of a state?Īny other suggestions on how to calculate the distance from a point to a border?Ĭode: * There are more than one polygon. I need to calculate the distance to the border of just one state, so it might be very feasible to create a set of points that are on the border of this state (say a point at each half-mile along the border) and use nearest.ado to find the nearest border point to each non-border point. I have seen the nearest.ado function, which is an efficient way to calculate the nearest point to another given a set of points. In ArcGIS, I see that there is a tool called “Near” that can determine the distance from a point to the nearest point on a polygon – this is exactly what I would like to do, however I cannot use ArcGIS and need to do the task in Stata (or SAS).Īfter much searching, I have not found a similar function in Stata to the ArcGIS “Near” function. My problem is that I do not know how to calculate the shortest distance from a point to a polygon. I am interested in using a geographic regression discontinuity design where there is a discontinuity at a U.S.
0 Comments
Leave a Reply. |