public static String DDtoDMS(Double d){

         String[] array=d.toString().split("[.]");
         String degrees=array[0];//得到度

         Double m=Double.parseDouble("0."+array[1])*60;
         String[] array1=m.toString().split("[.]");
         String minutes=array1[0];//得到分

         Double s=Double.parseDouble("0."+array1[1])*60;
         String[] array2=s.toString().split("[.]");
         String seconds=array2[0];//得到秒
         return degrees+"-"+minutes+"-"+seconds;
   }
	
	@Test
	public void h(){
		Double longi = new Double(33.14898745000000000000);
		System.out.println(Test2.DDtoDMS(longi));
	}

  

相关文章:

  • 2022-02-24
  • 2022-12-23
  • 2022-02-28
  • 2021-05-04
  • 2021-11-29
  • 2022-12-23
  • 2021-12-31
  • 2021-12-10
猜你喜欢
  • 2022-12-23
  • 2021-08-09
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案