Oracle operations via latitude conversion ____oracle

Source: Internet
Author: User

First, the degree of minutes and seconds turn point degree

Select T.lon,substr (T.lon,0,instr (T.lon, ' ° ')-1),
substr (T.lon,instr (T.lon, ' ° ') +1,instr (T.lon, ' ′ ')-instr (T.lon, ' ° ')-1),
substr (T.lon, ' T.lon,instr ') +1,instr (T.lon, ' ″ ')-instr (T.lon, ' ′ ')-1) from Mtr_wprd_station t;

Select T.lat,substr (T.lat,0,instr (T.lat, ' ° ')-1),
substr (T.lat,instr (T.lat, ' ° ') +1,instr (T.lat, ' ′ ')-instr (T.lat, ' ° ')-1),
substr (T.lat, ' T.lat,instr ') +1,instr (T.lat, ' ″ ')-instr (T.lat, ' ′ ')-1) from Mtr_wprd_station t;

Update Mtr_wprd_station t set t.lon_decimal= substr (T.lon,0,instr (T.lon, ' ° ')-1)
+substr (T.lon,instr (T.lon, ' ° ') +1,instr (T.lon, ' ′ ')-instr (T.lon, ' ° ')-1)/60
+substr (T.lon, ' T.lon,instr ') +1,instr (T.lon, ' ″ ')-instr (T.lon, ' ′ ')-1)/3600;

Update Mtr_wprd_station t set t.lat_decimal= substr (T.lat,0,instr (T.lat, ' ° ')-1)
+substr (T.lat,instr (T.lat, ' ° ') +1,instr (T.lat, ' ′ ')-instr (T.lat, ' ° ')-1)/60
+substr (T.lat, ' T.lat,instr ') +1,instr (T.lat, ' ″ ')-instr (T.lat, ' ′ ')-1)/3600;

Select T.lon_decimal from Mtr_wprd_station t;
Select T.lat_decimal from Mtr_wprd_station t;


Second, the degree of degree of change seconds

Update stt_asm_station_tmp_201503 t
   set t.lon1 = trunc (T.lon),
       t.lon2 = Trunc ((T.lon-trunc (T.lon)),
       t.lon3 = Trunc ((T.lon-trunc (T.lon)) * 60-TRUNC (t . Lon-trunc (T.lon)) * 60)) * 60);

Update stt_asm_station_tmp_201503 t
   set T.LAT1 = trunc (T.lat),
       t. LAT2 = Trunc (T.lat-trunc (T.lat)),
       T.LAT3 = Trunc ((T.lat-trunc (T.lat)) * 60-TR UNC ((T.lat-trunc (T.lat)) * 60)) * 60);








Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.