public Double change(String str){
str = str.trim();
String[] data= str
.replace("°", ";")
.replace("′", ";")
.replace("'", ";")
.replace("″", "")
.replace("\"", "")
.split(";");
Double res= 0d;
for (int i = data.length; i >0 ; i--) {
double sub = Double.parseDouble(data[i-1]);
if(i==1){
res=sub +res;
}else{
res=(res+sub)/60;
}
}
return res;
}
经纬度度分秒转化十进制
l-coder-dd2024-10-13 17:41
相关推荐
captain3762 小时前
MyBatis(入门5)其他查询操作jktantan3 小时前
Vue keep-alive 切标签后滚动位置回顶?因为 onDeactivated 里读到的 scrollTop 是 0Novproxy_Z3 小时前
商用代理避坑:如何识别商家拿机房 IP 冒充住宅 IP无足鸟ICT3 小时前
【RHCA+】vmstat命令(监控系统资源)垆边人似月.3 小时前
RDMA 文件传输踩坑(五):READY 发送成功后,为什么出现 Work Request Flushed Error?闪亮的路灯3 小时前
Linux 安装mqtt服务mosquittoHideF3 小时前
nmcli文丑颜不良啊4 小时前
LeetCode1481~1500题目解析2601_962885724 小时前
quotes 字段全解:涨跌幅、振幅、换手率的口径与单位excel4 小时前
encodeURI 和 encodeURIComponent 有什么区别?