We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
类似:
/** * 计算两点距离 */ public class GeoTool { /** * */ private static final double EARTH_RADIUS = 6378.137; /** * 计算两点之间距离 * @param lng1 * @param lat1 * @param lng2 * @param lat2 * @return */ public static double getPointDistance(double lng1, double lat1, double lng2, double lat2) { double result = 0; double radLat1 = radian(lat1); double ratlat2 = radian(lat2); double a = radian(lat1) - radian(lat2); double b = radian(lng1) - radian(lng2); result = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(ratlat2) * Math.pow(Math.sin(b / 2), 2))); result = result * EARTH_RADIUS; result = Math.round(result * 1000); return result; } // 转换为弧度 private static double radian(double d) { return (d * Math.PI) / 180.00; } }
The text was updated successfully, but these errors were encountered:
对gis相关的支持:https://pro.arcgis.com/zh-cn/pro-app/latest/arcpy/classes/geometry.htm
Sorry, something went wrong.
No branches or pull requests
类似:
The text was updated successfully, but these errors were encountered: