Usage geodist (dat, inf.replaceInf, count.pathsTRUE, predecessorsFALSE, ignore.evalTRUE, na.omitTRUE) Arguments dat one or more input graphs. Where geodesics do not exist, the value in inf.replace is substituted for the distance in question. Note that I kept things simple and did not address how to define a range of bearings that cross over the 360/0 degrees. Description geodist uses a BFS to find the number and lengths of geodesics between all nodes of dat. ![]() To illustrate what's going on, I project the coordinates and create a map. From there, you can decide that points that are within a certain range of bearings around the wind direction (and within a certain distance) fall within the plume. The first step to a solution is to form all pairwise combinations of polluters with points of interests and then calculate the distance and initial bearing. Save "points.dta", replaceNeither geodist nor geonear (both from SSC) calculate bearings between points but the formula for the initial bearing can be found on this excellent web site by Chris Veness. Input byte pid str16 pname double(plat plon) int windĢ "Lurie Bell Tower" 42.291988 -83.71621 180 The second contains random points around these two "polluters". The first includes two "polluter" locations and a wind direction (in degrees, north is 0) for each. You can then use basic trig to calculate distances and slopes.īefore trying to formulate a solution using geographic coordinates, I will create two demonstration datasets. The package provides data on countries and their main city or agglomeration and the different distance measures and dummy variables indicating whether two countries are contiguous, share a common language or a. If you use the default projection (Web Mercator), you will be working with a map where lines of constant bearing are represented as straight lines. The goal of geodist is to provide the same data from GeoDist ready to be used in R (i.e. You can sidestep the issue by converting geographic coordinates (latitude and longitude) to planar coordinates using geo2xy (from SSC). Conversely, if you travel in a straight line using the shortest path between two points, your bearing will constantly change as you make progress towards your destination. You can follow a line of constant bearing (using a compass) but that's not the shortest path unless you are headed due North or South. The concept of direction is a also a bit difficult to grasp when it relates to geographic coordinates. The names are correct in the sense that, for instance, the (1,1) element is the sum across the observations of squares of weight and the (2,1) element is the sum of the product of weight and foreign. This sounds pretty complicated to achieve and I have no suggestion on how to go about creating such polygons. matrix accum forms X0X matrices from data and sets the row and column names to the variable names used. 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. You would then use geoinpoly (from SSC) to identify points of interest that fall within these plume polygons. Presumably, time affects the progression and expansion of pollution plumes so intuitively, a solution would most likely require forming polygons that define the borders of each plume. ![]() ![]() I'm a bit reluctant to give advice because the vagueness on what should be considered downwind from the pollution source.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |