pombreda / pysal

Automatically exported from code.google.com/p/pysal
Other
0 stars 0 forks source link

inconsistency in threshold distances between pysal and geodaspac #224

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
just noticed a slight discrepancy between geodaspace and pysal.
computing a threshold distance in geodaspace for NAT.shp, setting
arc distance to miles, yields: 90.8765250783
in pysal, the same command yields 90.865247381472884.
there is a slight discrepancy, although both are essentially the same
up to a 1/100th of a mile: 90.88 vs 90.87, about 16 meters difference.
basically nothing substantially to worry about, but why would it
be different? presumably both call
pysal.min_threshold_dist_from_shapefile("NAT.shp",
       radius=pysal.cg.sphere.RADIUS_EARTH_MILES)
so any rounding errors should be the same. did that function somehow
change and geodaspace is using an old one?
any ideas?
(same NAT.shp, btw)

Original issue reported on code.google.com by sjsrey on 19 Oct 2012 at 7:39

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Non-pysal Issue, problem is in GeoSpace GUI....

This is a side effect of the GUI. The control used in the GUI is a wx.Slider 
which only allows 100 values. The min_threshold value use used to calculate the 
Slider value of the Slider position (int(math.ceil((rec_dist/max_dist) *100)), 
where max_dist is the diagonal of the shapefile's bounding box.  The position 
of the slider is rounded up to ensure the min_threshold is met.

Original comment by schmi...@gmail.com on 19 Oct 2012 at 9:06