Browse Source

드론교통관리 uam노선 및 송전선로 표출

pull/1/head
junh_eee(이준희) 9 months ago
parent
commit
027f2b8cc3
  1. BIN
      src/assets/images/transmission_tower_icon.png
  2. 639
      src/components/map/geojson/uamRouteArea.json
  3. 1076
      src/components/map/geojson/uamTowerArea.json
  4. 137
      src/components/map/mapbox/feature/FeatureAirZone.js
  5. 19
      src/modules/basis/flight/actions/basisFlightAction.ts
  6. 5
      src/modules/basis/flight/apis/basisFlightApi.ts
  7. 19
      src/modules/basis/flight/models/basisFlightModel.ts
  8. 8
      src/modules/basis/flight/reducers/basisFlightReducer.ts
  9. 26
      src/modules/basis/flight/sagas/basisFlightSaga.ts

BIN
src/assets/images/transmission_tower_icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

639
src/components/map/geojson/uamRouteArea.json

@ -0,0 +1,639 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[126.6243464, 37.5642352],
[126.627865, 37.57291277777778],
[126.63130833333331, 37.574488333333335],
[126.64792694444445, 37.57170861111112],
[126.66070861111113, 37.57284000000001],
[126.71217305555557, 37.571181388888895],
[126.72323666666666, 37.55760305555555],
[126.74221777777778, 37.551310277777766],
[126.75231583333333, 37.552930555555555],
[126.75556138888886, 37.5517675],
[126.76711666666668, 37.53592416666667],
[126.76253555555556, 37.53282305555555],
[126.74099055555556, 37.54691583333333],
[126.7212813888889, 37.55372722222222],
[126.71090916666664, 37.57002333333334],
[126.66086972222223, 37.57148361111111],
[126.64985499999999, 37.57053277777778],
[126.63398138888893, 37.55547861111111],
[126.62887638888888, 37.55600555555555],
[126.6243464, 37.5642352]
]
},
"properties": {
"type": "routeLine",
"name": "AR",
"description": "UAM 아라뱃길 노선"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.6243464, 37.5642352]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "드론시험 인증센터"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.627865, 37.57291277777778]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "001"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.63130833333331, 37.574488333333335]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "002"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.64792694444445, 37.57170861111112]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "003"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.66070861111113, 37.57284000000001]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "004"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.71217305555557, 37.571181388888895]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "005"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.72323666666666, 37.55760305555555]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "006"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.74221777777778, 37.551310277777766]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "007"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.75231583333333, 37.552930555555555]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "008"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.75556138888886, 37.5517675]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "009"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.76711666666668, 37.53592416666667]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "010"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.76253555555556, 37.53282305555555]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "011"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.74099055555556, 37.54691583333333]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "012"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.7212813888889, 37.55372722222222]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "013"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.71090916666664, 37.57002333333334]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "014"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.66086972222223, 37.57148361111111]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "015"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.64985499999999, 37.57053277777778]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "016"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.63398138888893, 37.55547861111111]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "017"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.62887638888888, 37.55600555555555]
},
"properties": {
"type": "routePoint",
"name": "AR",
"description": "018"
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[126.72420416666667, 37.66822861111111],
[126.72130583333335, 37.66335111111111],
[126.79702611111112, 37.61767361111111],
[126.74079222222223, 37.65721194444444],
[126.72420416666667, 37.66822861111111]
]
},
"properties": {
"type": "routeLine",
"name": "HG",
"description": "UAM 한강 노선1"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.72420416666667, 37.66822861111111]
},
"properties": {
"type": "routePoint",
"name": "HG",
"description": "001"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.72130583333335, 37.66335111111111]
},
"properties": {
"type": "routePoint",
"name": "HG",
"description": "002"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.79702611111112, 37.61767361111111]
},
"properties": {
"type": "routePoint",
"name": "HG",
"description": "003"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.74079222222223, 37.65721194444444]
},
"properties": {
"type": "routePoint",
"name": "HG",
"description": "004"
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[126.79702611111112, 37.61767361111111],
[126.80453805555555, 37.572388333333336],
[126.80991500000003, 37.555640555555556],
[126.81530555555557, 37.554041388888876],
[126.91214388888889, 37.52405611111111]
]
},
"properties": {
"type": "routeLine",
"name": "HG",
"description": "UAM 한강 노선2"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.80453805555555, 37.572388333333336]
},
"properties": {
"type": "routePoint",
"name": "HG",
"description": "005"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.80991500000003, 37.555640555555556]
},
"properties": {
"type": "routePoint",
"name": "HG",
"description": "006"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.81530555555557, 37.554041388888876]
},
"properties": {
"type": "routePoint",
"name": "HG",
"description": "007"
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[126.92951111111113, 37.535757499999995],
[126.93060138888889, 37.53156861111111],
[126.91713111111112, 37.52255194444444],
[126.91214388888889, 37.52405611111111],
[126.92951111111113, 37.535757499999995]
]
},
"properties": {
"type": "routeLine",
"name": "HG",
"description": "UAM 한강 노선3"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.92951111111113, 37.535757499999995]
},
"properties": {
"type": "routePoint",
"name": "HG",
"description": "008"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.93060138888889, 37.53156861111111]
},
"properties": {
"type": "routePoint",
"name": "HG",
"description": "009"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.91214388888889, 37.52405611111111]
},
"properties": {
"type": "routePoint",
"name": "HG",
"description": "010"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [126.91713111111112, 37.52255194444444]
},
"properties": {
"type": "routePoint",
"name": "HG",
"description": "011"
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[127.08605444444446, 37.519884166666664],
[127.0841361111111, 37.51934638888889],
[127.07263527777779, 37.51935388888888],
[127.05694444444444, 37.53],
[127.06211527777776, 37.53232277777778],
[127.0720008333333, 37.50237972222222],
[127.09528527777779, 37.49509166666667],
[127.09718083333335, 37.49339055555556],
[127.09813527777777, 37.490587777777776],
[127.1054336111111, 37.48388333333334],
[127.10976999999998, 37.48730472222222],
[127.10070555555555, 37.494905555555555],
[127.07244999999999, 37.50371194444445]
]
},
"properties": {
"type": "routeLine",
"name": "TC",
"description": "UAM 탄천 노선"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [127.08605444444446, 37.519884166666664]
},
"properties": {
"type": "routePoint",
"name": "TC",
"description": "001"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [127.0841361111111, 37.51934638888889]
},
"properties": {
"type": "routePoint",
"name": "TC",
"description": "002"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [127.07263527777779, 37.51935388888888]
},
"properties": {
"type": "routePoint",
"name": "TC",
"description": "003"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [127.05694444444444, 37.53]
},
"properties": {
"type": "routePoint",
"name": "TC",
"description": "004"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [127.06211527777776, 37.53232277777778]
},
"properties": {
"type": "routePoint",
"name": "TC",
"description": "005"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [127.0720008333333, 37.50237972222222]
},
"properties": {
"type": "routePoint",
"name": "TC",
"description": "006"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [127.09528527777779, 37.49509166666667]
},
"properties": {
"type": "routePoint",
"name": "TC",
"description": "007"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [127.09718083333335, 37.49339055555556]
},
"properties": {
"type": "routePoint",
"name": "TC",
"description": "008"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [127.09813527777777, 37.490587777777776]
},
"properties": {
"type": "routePoint",
"name": "TC",
"description": "009"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [127.1054336111111, 37.48388333333334]
},
"properties": {
"type": "routePoint",
"name": "TC",
"description": "010"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [127.10976999999998, 37.48730472222222]
},
"properties": {
"type": "routePoint",
"name": "TC",
"description": "011"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [127.10070555555555, 37.494905555555555]
},
"properties": {
"type": "routePoint",
"name": "TC",
"description": "012"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [127.07244999999999, 37.50371194444445]
},
"properties": {
"type": "routePoint",
"name": "TC",
"description": "013"
}
}
]
}

1076
src/components/map/geojson/uamTowerArea.json

File diff suppressed because it is too large Load Diff

137
src/components/map/mapbox/feature/FeatureAirZone.js

@ -1,7 +1,12 @@
import { useEffect } from 'react';
import { useEffect, useState } from 'react';
import * as turf from '@turf/turf';
import geoJson from '../../../../components/map/geojson/airArea.json';
import geoJson from '../../geojson/airArea.json';
import uamRouteArea from '../../geojson/uamRouteArea.json';
import uamTowerArea from '../../geojson/uamTowerArea.json';
import '../../../../assets/css/custom.css';
import { useDispatch, useSelector } from 'react-redux';
import { FLIGHT_UAM_BUFFER_LIST } from '../../../../modules/basis/flight/actions/basisFlightAction';
import towerImg from '../../../../assets/images/transmission_tower_icon.png';
// 격자 공역 Source
const airPort = [
@ -26,12 +31,52 @@ const airPort = [
];
export const FeatureAirZone = props => {
const dispatch = useDispatch();
const { uamBufferList } = useSelector(state => state.flightState);
const [uamGeoJson, setUamGeoJson] = useState({
...uamRouteArea,
...uamTowerArea,
features: [...uamRouteArea.features, ...uamTowerArea.features]
});
const [number, setNumber] = useState(0);
let popup;
useEffect(() => {
featureAirZoneInit();
uamAirAreaInit();
}, []);
// 얻은 버퍼 좌표로 버퍼 도형 생성 후 지도에 반영
useEffect(() => {
if (uamBufferList.length > 0) {
const paths = [];
uamBufferList.map(buffer => {
const path = [buffer.x, buffer.y];
paths.push(path);
});
const bufferObj = {
type: 'Feature',
geometry: {
type: 'LineString',
coordinates: paths
},
properties: {
type: 'routeBuffer'
}
};
const obj = {
...uamGeoJson,
features: [...uamGeoJson.features, bufferObj]
};
setUamGeoJson(obj);
props.map.getSource('uam').setData(obj);
}
}, [uamBufferList]);
// 공역 정보 표출 window 생성
const infowindowOpen = data => {
const content =
@ -318,5 +363,93 @@ export const FeatureAirZone = props => {
});
};
// uam 셋팅 함수
const uamAirAreaInit = () => {
if (number === 0) {
const routeFeatures = uamRouteArea.features;
const routeLine = routeFeatures
.filter(route => route.geometry.type === 'LineString')
.map(line => {
return line.geometry.coordinates.map(p => {
return { x: p[0], y: p[1] };
});
});
// uam노선 버퍼 좌표 요청
routeLine.forEach(coords => {
dispatch(
FLIGHT_UAM_BUFFER_LIST.request({
buffer: 50,
coordinates: coords
})
);
});
props.map.addSource('uam', {
type: 'geojson',
data: uamGeoJson
});
props.map.addLayer({
id: 'routeLine',
type: 'line',
source: 'uam',
layout: {
'line-cap': 'butt',
'line-join': 'round'
},
paint: {
'line-color': '#FF1493',
'line-width': 3,
'line-dasharray': [1, 1]
},
filter: ['==', ['get', 'type'], 'routeLine']
});
props.map.addLayer({
id: 'routeBuffer',
type: 'line',
source: 'uam',
layout: {
'line-cap': 'round',
'line-join': 'round'
},
paint: {
'line-color': '#000000',
'line-width': 1,
'line-dasharray': [3, 3]
},
filter: ['==', ['get', 'type'], 'routeBuffer']
});
props.map.addLayer({
id: 'routePoint',
type: 'circle',
source: 'uam',
paint: {
'circle-radius': 5,
'circle-color': '#ffffff',
'circle-stroke-color': '#000000',
'circle-stroke-width': 1
},
filter: ['==', ['get', 'type'], 'routePoint']
});
props.map.addLayer({
id: 'towerLine',
type: 'line',
source: 'uam',
layout: {
'line-cap': 'round',
'line-join': 'round'
},
paint: {
'line-color': '#960018',
'line-width': 1,
'line-dasharray': [5, 5]
},
filter: ['==', ['get', 'type'], 'towerLine']
});
}
setNumber(number + 1);
};
return null;
};

19
src/modules/basis/flight/actions/basisFlightAction.ts

@ -13,7 +13,9 @@ import {
BasFlightAprovData,
BasFlightScheduleList,
weatherData,
resweatherData
resweatherData,
FlightUamBufferRq,
FlightUamBufferList
} from '../models/basisFlightModel';
// 공역 조회
@ -134,6 +136,11 @@ const FLIGHT_SCHEDULE_SUCCESS =
const FLIGHT_SCHEDULE_FAILURE =
'basis/flight/schedule/list/FLIGHT_SCHEDULE_FAILURE';
// 버퍼 좌표 가져오기
const UAM_BUFFER_LIST_REQUEST = 'basis/flight/adex/BUFFER_LIST_REQUEST';
const UAM_BUFFER_LIST_SUCCESS = 'basis/flight/adex/BUFFER_LIST_SUCCESS';
const UAM_BUFFER_LIST_FAILURE = 'basis/flight/adex/BUFFER_LIST_FAILURE';
export const SEARCH_AREA = createAsyncAction(
FLIGHT_SEARCH_AREA_REQUEST,
FLIGHT_SEARCH_AREA_SUCCESS,
@ -292,6 +299,13 @@ export const FlightweatherAction = createAsyncAction(
FLIGHT_WEATHER_FAILURE
)<weatherData, resweatherData, AxiosError>();
// UAM 버퍼 좌표 가져오기
export const FLIGHT_UAM_BUFFER_LIST = createAsyncAction(
UAM_BUFFER_LIST_REQUEST,
UAM_BUFFER_LIST_SUCCESS,
UAM_BUFFER_LIST_FAILURE
)<FlightUamBufferRq, FlightUamBufferList[], AxiosError>();
const actions = {
PUBLIC_AREA_LIST,
// FLIGHT_PLAN_AREA,
@ -318,7 +332,8 @@ const actions = {
SEARCH_AREA,
FLIGHT_SCHEDULE_LIST,
FlightweatherAction,
FLIGHT_PLAN_AREA_INAIRAREA
FLIGHT_PLAN_AREA_INAIRAREA,
FLIGHT_UAM_BUFFER_LIST
};
export type FlightAction = ActionType<typeof actions>;

5
src/modules/basis/flight/apis/basisFlightApi.ts

@ -6,6 +6,7 @@ import {
FlightPlanAreaDataList,
FlightPlanData,
FlightPlanListRqData,
FlightUamBufferRq,
weatherData
} from '../models/basisFlightModel';
@ -87,5 +88,9 @@ export const flightPlanAPI = {
inAirArea: async (data: FlightPlanAreaDataList) => {
const res = await axios.post(`api/bas/flight/airspace/contains`, data);
return res.data.result;
},
uamBufferList: async (data: FlightUamBufferRq) => {
return await axios.post('/api/bas/flight/adex/buffer', data);
}
};

19
src/modules/basis/flight/models/basisFlightModel.ts

@ -22,6 +22,7 @@ export interface FlightState {
listSelect: ListGroupData | undefined;
aprvSelect: ListGroupData | undefined;
inAirArea: boolean | undefined;
uamBufferList: FlightUamBufferList[] | undefined;
}
export interface weatherData {
serviceKey: string;
@ -244,6 +245,21 @@ export interface BasFlightScheduleData {
list: [BasFlightScheduleList];
}
export interface FlightUamBufferRq {
buffer: number;
coordinates: {
x: number;
y: number;
}[];
}
export interface FlightUamBufferList {
x: number;
y: number;
m: number | string;
z: number | string;
}
export const initFlight = {
weather: undefined,
page: 1,
@ -389,7 +405,8 @@ export const initFlight = {
areaList: undefined,
aprvList: undefined,
aprvProc: undefined,
scheduleList: []
scheduleList: [],
uamBufferList: []
};
export const initFlightBas = {

8
src/modules/basis/flight/reducers/basisFlightReducer.ts

@ -164,11 +164,17 @@ export const flightReducer = createReducer<FlightState, Actions.FlightAction>(
draft.scheduleList = data;
})
)
// 관제권 포함 유무
.handleAction(Actions.FLIGHT_PLAN_AREA_INAIRAREA.success, (state, action) =>
produce(state, draft => {
const data = action.payload;
draft.inAirArea = data;
})
)
// uam 노선 버퍼 영역 조회
.handleAction(Actions.FLIGHT_UAM_BUFFER_LIST.success, (state, action) =>
produce(state, draft => {
const data = action.payload;
draft.uamBufferList = data;
})
);

26
src/modules/basis/flight/sagas/basisFlightSaga.ts

@ -446,6 +446,31 @@ function* inAirAreaSaga(
}
}
// get uam buffer list
function* uamBufferListSaga(
action: ActionType<typeof Actions.FLIGHT_UAM_BUFFER_LIST.request>
) {
try {
const data = action.payload;
const response = yield call(Apis.flightPlanAPI.uamBufferList, data);
if (response.errorCode) {
yield put(
MessageActions.IS_ERROR({
errorCode: response.errorCode,
errorMessage: response.errorMessage,
isHistoryBack: false,
isRefresh: false
})
);
return;
}
yield put(Actions.FLIGHT_UAM_BUFFER_LIST.success(response));
} catch (error: any) {
yield put(Actions.FLIGHT_UAM_BUFFER_LIST.failure(error));
}
}
export function* flightSaga() {
yield takeEvery(Actions.PUBLIC_AREA_LIST.request, listAreaSaga);
// yield takeEvery(Actions.FLIGHT_PLAN_AREA.request, createFlightPlanArea);
@ -463,4 +488,5 @@ export function* flightSaga() {
yield takeEvery(Actions.FLIGHT_SCHEDULE_LIST.request, scheduleListSaga);
yield takeEvery(Actions.FlightweatherAction.request, WeatherSaga);
yield takeEvery(Actions.FLIGHT_PLAN_AREA_INAIRAREA.request, inAirAreaSaga);
yield takeEvery(Actions.FLIGHT_UAM_BUFFER_LIST.request, uamBufferListSaga);
}

Loading…
Cancel
Save