GEONEAR: Stata module to find nearest neighbors using geodetic distances
Robert Picard
Statistical Software Components from Boston College Department of Economics
Abstract:
geonear finds the nearest neighbors using geodetic distances, i.e. the length of the shortest curve between two points along the surface of a mathematical model of the earth. Both great-circle and ellipsoid distances are available. geonear returns a specific count of nearest neighbors and/or all neighbors within a specified distance. geonear uses a divide and conquer strategy to significantly reduce the number of distances that must be computed. The approach involves splitting the initial set of locations into progressively smaller geographic regions while at the same time safely reducing the set of potential neighbors for each region. Generally, geonear will predictably find the nearest neighbors in a linear time even though the size of the overall problem increases exponentially. In other words doubling the size of both location sets simply doubles the number of regions and thus doubles the run time.
Language: Stata
Requires: Stata version 9.2
Keywords: geodetic; geodesic; vincenty; great-circle; ellipsoid; distance; radius; closest; nearest; neighbor (search for similar items in EconPapers)
Date: 2010-04-25, Revised 2019-09-14
Note: This module should be installed from within Stata by typing "ssc install geonear". The module is made available under terms of the GPL v3 (https://www.gnu.org/licenses/gpl-3.0.txt). Windows users should not attempt to download these files with a web browser.
References: Add references at CitEc
Citations: View citations in EconPapers (16)
Downloads: (external link)
http://fmwww.bc.edu/repec/bocode/g/geonear.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/g/geonear.hlp help file (text/plain)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:boc:bocode:s457146
Ordering information: This software item can be ordered from
http://repec.org/docs/ssc.php
Access Statistics for this software item
More software in Statistical Software Components from Boston College Department of Economics Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA. Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().