Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Choosing the best set of longitude/latitude coordinates from three choices
From
Matthew Krauchunas <[email protected]>
To
[email protected]
Subject
st: Choosing the best set of longitude/latitude coordinates from three choices
Date
Wed, 14 Jul 2010 11:19:44 -0400
Hello,
The data management process for my dissertation is fraught with
obstacles beyond my current Stata abilities, so I am returning to the
"well" where everyone has been extremely helpful.
I have some geocoded data from three sources and I need to figure out
a way to choose the best set of coordinates. The source of the
coordinates are Intelligentsearch GIS (intel_lat & intel_long), USC
GIS (usc_lat & usc_long), and OSHPD provided GIS (oshpd_lat &
oshpd_long). The OSHPD GIS also has 71 missing longitudes and
latitudes. I have calculated the difference between these three sets
of coordinates: Intelligentsearch & USC
(intel_usc_lat_diff intel_usc_long_diff), OSHPD & USC
(oshpd_usc_lat_diff oshpd_usc_long_diff), and OSHPD &
Intelligentsearch (oshpd_intel_lat_diff oshpd_intel_long_diff). I
need to keep the best coordinates (i.e., from two datasources with the
smallest difference), name the new coordinates longitude and latitude,
and use the USC coordinates as the default (i.e., use the USC
coordinates when the smallest difference is between USC and
Intelligentsearch).
Let me provide an example: oshpd_fac_no 206194320 has a
oshpd_usc_lat_diff of -3.372433, oshpd_intel_lat_diff of -3.372299,
and a intel_usc_lat_diff of 0.000134. Obviously the OSHPD gis is the
problem and the USC latitude needs to be kept as it is my default.
Does anyone have any ideas for this?
Here is some sample data if it helps:
oshpd_fac_no intel_usc_lat_diff intel_usc_long_diff oshpd_usc_lat_diff oshpd_usc_long_diff oshpd_intel_lat_diff oshpd_intel_long_diff oshpd_long oshpd_lat usc_lat usc_long intel_lat intel_long
206271717 -2.928555 4.037598 2.928555 -4.037582 0.000000 0.000015 -121.9128 36.56206 33.63351 -117.8752 36.56206 -121.9128
206100833 -0.124664 0.399834 0.123066 -0.401627 -0.001598 -0.001793 -119.4988 37.10662 36.98355 -119.0972 37.10822 -119.497
206491017 -0.086819 0.052116 0.024086 -0.007385 -0.062733 0.044731 -122.4599 38.27798 38.25389 -122.4525 38.34071 -122.5046
206044001 -0.058876 -0.041939 0.058018 0.040482 -0.000858 -0.001457 -121.598 39.78528 39.72726 -121.6385 39.78614 -121.5965
206190123 -0.056854 -0.162796 0.054424 0.182648 -0.002430 0.019852 -118.2801 34.05378 33.99936 -118.4627 34.05621 -118.2999
206281040 -0.050270 -0.041695 0.000572 0.000282 -0.049698 -0.041412 -122.3058 38.31432 38.31374 -122.3061 38.36401 -122.2644
206040974 -0.039154 -0.023483 0.043438 0.026169 0.004284 0.002686 -121.6123 39.7707 39.72726 -121.6385 39.76641 -121.615
206070948 -0.038231 -0.044518 -0.001057 -0.000832 -0.039288 -0.045349 -122.132 37.88853 37.88959 -122.1312 37.92782 -122.0867
206374019 -0.036625 -0.008965 -0.001068 -0.000153 -0.037693 -0.009117 -116.984 32.83546 32.83652 -116.9839 32.87315 -116.9749
206301202 -0.033604 -0.016846 -0.000050 -0.001251 -0.033653 -0.018097 -117.836 33.74546 33.74551 -117.8347 33.77912 -117.8179
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/