Open Helium314 opened 2 years ago
in https://github.com/n76/DejaVu/blob/e54aae2d9f3d4619065a258b431ace1911d1e931/app/src/main/java/org/fitchfamily/android/dejavu/BoundingBox.java#L91-L92 east-west size of the bounding box is set by converting meters to degrees and multiplying with cosLat. This results in narrower bouding boxes (in degrees) for high latitude. But actually the bouding boxes with the same e-w width in metes should get wider if we go towards the poles.
cosLat
Proposed solution: change to (radius_ew * BackendService.METER_TO_DEG) / cosLat; and change https://github.com/n76/DejaVu/blob/e54aae2d9f3d4619065a258b431ace1911d1e931/app/src/main/java/org/fitchfamily/android/dejavu/BoundingBox.java#L134 to ((east - center_lon) * BackendService.DEG_TO_METER) * cosLat
(radius_ew * BackendService.METER_TO_DEG) / cosLat;
((east - center_lon) * BackendService.DEG_TO_METER) * cosLat
in https://github.com/n76/DejaVu/blob/e54aae2d9f3d4619065a258b431ace1911d1e931/app/src/main/java/org/fitchfamily/android/dejavu/BoundingBox.java#L91-L92 east-west size of the bounding box is set by converting meters to degrees and multiplying with
cosLat
. This results in narrower bouding boxes (in degrees) for high latitude. But actually the bouding boxes with the same e-w width in metes should get wider if we go towards the poles.Proposed solution: change to
(radius_ew * BackendService.METER_TO_DEG) / cosLat;
and change https://github.com/n76/DejaVu/blob/e54aae2d9f3d4619065a258b431ace1911d1e931/app/src/main/java/org/fitchfamily/android/dejavu/BoundingBox.java#L134 to((east - center_lon) * BackendService.DEG_TO_METER) * cosLat