daeun

add address function

...@@ -501,6 +501,21 @@ imgtodata = function(dir) { ...@@ -501,6 +501,21 @@ imgtodata = function(dir) {
501 }); 501 });
502 } 502 }
503 503
504 +//좌표 변경
505 +const proj4 = require('proj4');
506 +function TMtoWGS(x,y){
507 + var to = 'WGS84'
508 + var from = 'TM128'
509 +
510 + proj4.defs('WGS84', "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs");
511 + proj4.defs('TM128', '+proj=tmerc +lat_0=38 +lon_0=128 +k=0.9999 +x_0=400000 +y_0=600000 +ellps=bessel +units=m +no_defs +towgs84=-115.80,474.99,674.11,1.16,-2.31,-1.63,6.43');
512 +
513 + var xy = [x, y];
514 + var result = proj4(from, to, xy);
515 +
516 + return(result);
517 +}
518 +
504 //사용자가 보낸 사진 저장 519 //사용자가 보낸 사진 저장
505 const config = ({ 520 const config = ({
506 channelAccessToken: `${TOKEN}`, 521 channelAccessToken: `${TOKEN}`,
......