Loading views...
GNSS3 Main Correction Implementation & Deployment

GNSS3 Main Correction Implementation & Deployment

Date
Date
2020 Feb 17 0:0
Created by
Created by
Seonglae ChoSeonglae Cho
Created time
Created time
2023 Feb 28 12:39
Last edited by
Last edited by
Seonglae ChoSeonglae Cho
Last edited time
Last edited time
2023 Apr 15 16:51
Refs
Refs

Object - GNSS3 Main Correction Implementation & Deployment

 
 

function correction(angle1, angle2, point1, point2){ /** * @summary - Real Correction Function */ // Compute LngLat let tan1 = Math.tan(angle1) let tan2 = Math.tan(angle2) let meetXY = meetPoint(tan1, tan2, point1, point2) if (meetXY === ERROR) return let newlnglat = ol.proj.transform(meetXY, 'EPSG:3857', 'EPSG:4326') // Move and Present movePvr(osm.startPvr, osm.startFeature, newlnglat) GetPvrRelationLocal() } function meetPoint(tan1, tan2, point1, point2){ /** * @summary - return Meet point by 2 Line */ let meetXY, meetX, meetY let [x1, y1] = proj4('EPSG:3857', 'EPSG:32652').forward(point1) let [x2, y2] = tm2 = proj4('EPSG:3857', 'EPSG:32652').forward(point2) meetX = - ((y1-y2) - (tan1*x1 - tan2*x2)) / (tan1 - tan2) meetY = tan1*(meetX - x1) + y1 // move pvr try { meetXY = proj4('EPSG:3857', 'EPSG:32652').inverse([meetX, meetY]) // todo - if not in extent - alert return meetXY } catch(error) { alert("좌표 오류입니다. 다시 보정 진행해주세요.") console.log(error) return ERROR } }
일단 리팩토링
비구조할당은 그때 let var 줘야함 안주면 오류
 
 
사용성 향상
layer 추가해서 1 2 하면 삭제 선 말고 점
enter 적용
점 옮기기좌표 변화
 
 
function correctionPoint(coor, count){ /** * @summary - reset Correction * @since - correction complete or restart */ osm.correction[count] = coor let loc = new ol.geom.Point(coor) let feature = new ol.Feature({ geometry: loc }) feature.setProperties({'correctionCount': count}) correctionLayer.getSource().addFeature(feature) }
How to add/remove a feature from a vector layer render
To add or remove a feature from a layer render, you must first make a layer render to a map with your data source. Read the How to make a layer render as a vector or add a vector layer to a map art...
How to add/remove a feature from a vector layer render
  • 이거 설명 잘대있음 proto 에 함수 다 나오는게 아니구나.. getsource() 좋다
 

 
 

Recommendations