mago3D
mago3D ๋ Digital Twin Platform ์ ๋๋ค.
์ค์น ๋ฐ ๊ต์ก ์์ธ ์๋ฃ
Features
- 2์ฐจ์ ๊ณต๊ฐ์ ๋ณด ๊ด๋ฆฌ ๊ธฐ๋ฅ
- 3์ฐจ์ ๋ฐ์ดํฐ ํฌ๋งท ์ง์ ๊ธฐ๋ฅ
- 3์ฐจ์ ๋ฐ์ดํฐ ๊ด๋ฆฌ๊ธฐ๋ฅ
- ์๋ํ๋ 2์ฐจ์/3์ฐจ์ ๊ณต๊ฐ์ ๋ณด ๊ด๋ฆฌ ๊ธฐ๋ฅ
- 3์ฐจ์ ๊ฐ์ํ ๊ธฐ๋ฅ
- 3์ฐจ์ ๋ฐ์ดํฐ ์ด์ ๊ธฐ๋ฅ
- ์๋ฎฌ๋ ์ด์ ์๋น์ค ์ฐ๋
Development Environment
- JAVA(OpenJDK) 11.0.2
- Spring Boot 2.3.0
- PostgreSQL 12
- PostGIS 3.0
- Gradle 6.5.0
- Mybatis
- Lombok
- Thymeleaf
- F4d Converter
- Geoserver 2.17.x
- RabbitMQ 3.8.x
- Gdal 3.x
Project Composition
- mago3d-admin : ํ๋ซํผ(mago3D) ๊ด๋ฆฌ์
- mago3d-converter : 3์ฐจ์ ๊ณต๊ฐ์ ๋ณด ์๋ํ ๊ด๋ฆฌ
- mago3d-user : 2์ฐจ์/3์ฐจ์ ๊ณต๊ฐ๋ฐ์ดํฐ ์กฐํ, ์๋ฎฌ๋ ์ด์ ์ฐ๋ ๋ฑ
- common : ์ํธํ(๋ณด์), ํต๊ณ๋ชจ๋ ๋ฑ ๊ณตํต ๊ธฐ๋ฅ ๊ด๋ฆฌ
- doc : database schema, ๊ฐ๋ฐ ๋ฌธ์
- html : html ๋์์ธ ํ์ผ (npm init์ผ๋ก ์์ฑ)
Quick Started
- mago3D-CE(mago3D js, mago3D converter)
docker-compose -f docker-compose-ce.yml up -d
- TOBE...mago3D-EE(mago3Djs, mago3D converter, mago3D CMS)
Getting Started
1. Install
1.1 ๊ณตํต
java
- OpenJDK 11.0.2 (build 11.0.2+9) : 11๋ฒ์ ์ค์น
GDAL
- GDAL์ ์ค์นํ๊ธฐ ์ํด์ OSGeo4W(FOSSGIS for Windows)๋ฅผ ์ค์น
- ์์คํ
๋ณ์ ์ถ๊ฐ
Path) C:\OSGeo4W64\bin
F4D Converter
- ์ค์น๊ฒฝ๋ก : C:\F4DConverterConsole
- ๋ด๋ ค ๋ฐ์ ํ์ผ์ ์คํํ์ฌ, Converter ๋ฅผ ์ค์นํฉ๋๋ค.
1.2 docker ํ๊ฒฝ
- docker-compose ๋ฅผ ์ฌ์ฉํ๊ธฐ ์ํด์๋ ์ฌ์ ์ docker ๊ฐ ์ค์น๋์ด ์์ด์ผ ํฉ๋๋ค.
- checkout ๋ฐ์ ํ๋ก์ ํธ์ root ๊ฒฝ๋ก์์ ์๋์ ๋ช ๋ น์ด๋ฅผ ์คํํฉ๋๋ค.
docker-compose up -d
- docker-compose ํ์ผ์ ์ ์๋ ๋ด์ฉ์ ๋ฐ๋ผ database, geoserver, rabbitmq ๊ฐ container ๋ก ์์ฑ๋ฉ๋๋ค.
1.3 ์ผ๋ฐ ํ๊ฒฝ
- 1.2 ์ docker ํ๊ฒฝ์์ docker-compose ๋ก ๊ฐ๋ฐํ๊ฒฝ์ ๊ตฌ์ฑํ์๋ค๋ฉด 1.3 ๊ณผ์ ์ ์๋ตํด๋ ๋ฉ๋๋ค.
PostgreSQL
- PostgreSQL12 ๋ฒ์ ์ผ๋ก ์ค์
- ์ค์น๊ฒฝ๋ก C:/PostgreSQL/12
doc/database/doc/database/ ์ฐธ์กฐ - PostGIS ์ต์ SQL ๋ฒ์ ์ผ๋ก ์ค์
Erlang
- rabbit mq ๋ฅผ ์ค์นํ๊ธฐ ์ํด์๋ erlang ์ด ํ์ํ๊ธฐ ๋๋ฌธ์ ๋จผ์ erlang๋ฅผ ์ค์นํ๋๋ก ํฉ๋๋ค.
- Download OTP 23.1 ํญ๋ชฉ์์ โOTP 23.1 Windows 64-bit Binary Fileโ์ ํด๋ฆญํ์ฌ ํ์ผ์ ๋ด๋ ค ๋ฐ๊ณ ์คํํฉ๋๋ค.
- ๊ตฌ์ฑ์์ ์ค์ ์ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ํ ๊ฒ์ด๋ฏ๋ก next๋ฅผ ํด๋ฆญํ์ฌ ์ค์น ํฉ๋๋ค.
- Visual C++ ๊ตฌ์ฑ์์ ์ค์น ์ฐฝ์ด ๋ฐ ๊ฒฝ์ฐ ์ฒดํฌ๋ฐ์ค๋ฅผ ์ฒดํฌํ๊ณ ์ค์นํฉ๋๋ค.
RabbitMQ
- ์ต์ ๋ฒ์ ์ ํ์ธํ๊ณ ์ด์์ฒด์ ํ๊ฒฝ์ ๋ง์ถฐ ์ค์น ํ์ผ์ ๋ด๋ ค ๋ฐ๊ณ ์ค์น ํฉ๋๋ค.
- ํ๊ฒฝ๋ณ์ ์ค์
- [์ ์ดํ] โ [์์คํ ๋ฐ ๋ณด์] โ [์์คํ ] ๋๋ [๋ด PC]์ [์์ฑ]์ ํด๋ฆญ ํ ํ, [๊ณ ๊ธ ์์คํ ์ค์ ]์ ํด๋ฆญํฉ๋๋ค.
- [์์คํ ์์ฑ]์ [๊ณ ๊ธ]ํญ ํ๋ฉด์์ [ํ๊ฒฝ ๋ณ์]๋ฅผ ํด๋ฆญํฉ๋๋ค.
- [ํ๊ฒฝ๋ณ์] ํ๋ฉด์์ [์๋ก ๋ง๋ค๊ธฐ]๋ฅผ ํด๋ฆญํ์ฌ, ๋ณ์ ์ด๋ฆ๊ณผ ๋ณ์ ๊ฐ ์ ๋ ฅ๋์ RABBITMQ_HOME๊ณผ RabbitMQ ์ค์น ๊ฒฝ๋ก๋ฅผ ์ค์ ํฉ๋๋ค.
- RabbitMQ ์ค์น ๊ฒฝ๋ก๋ฅผ ์ค์ ํ ํ, ์์คํ ๋ณ์์ [Path] ๋ณ์๋ฅผ ์ ํํ๊ณ [ํธ์ง] ๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.
- [์๋ก ๋ง๋ค๊ธฐ] ๋ฒํผ์ ํด๋ฆญํ์ฌ, %RABBITMQ_HOME%\sbin ์ ์ ๋ ฅํฉ๋๋ค.
- ๊ด๋ฆฌ์ ํ๋ฌ๊ทธ์ธ ํ์ฑํ
- ๊ด๋ฆฌ์ ํ์ด์ง์ ์ ์ํ๊ธฐ ์ํด์๋ management plugin ์ด ํ์ฑํ ๋์ด์ผ ํฉ๋๋ค. (๋นํ์ฑํ ์ ์ ์ ๋ถ๊ฐ)
- RabbitMQ์ management plugin ์ ํ์ฑํํ๊ธฐ ์ํด ๋ช ๋ น ํ๋กฌํํธ ์ฐฝ์ โrabbitmq-plugins enable rabbitmq_managementโ๋ผ๊ณ ์ ๋ ฅํ์ฌ ํ์ฑํ ํฉ๋๋ค.
- ๋ช ๋ น ํ๋กฌํํธ๋ฅผ ์ฌ์์ํ๊ณ , โrabbitmq-plugins listโ๋ก ํ๋ฌ๊ทธ์ธ์ ํ์ฑํ ์ฌ๋ถ๋ฅผ ํ์ธํฉ๋๋ค.
- ๊ด๋ฆฌ์ ์ค์
- RabbitMQ ๊ด๋ฆฌ์ ํ์ด์ง(http://localhost:15672)์ ์ ์ํฉ๋๋ค.
- ์์ด๋์ ๋น๋ฐ๋ฒํธ๋ ๋ชจ๋ guest ๋ก ๋ก๊ทธ์ธ ํฉ๋๋ค.
- ์๋จ์ Exchange ํญ์ ํด๋ฆญํ๊ณ , ํ๋จ์ Add a new exchanges ๋ฅผ ํด๋ฆญํ์ฌ ์๋์ ๊ฐ์ด ์
๋ ฅํ ๋ค, Add exchange ๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.
- Name : f4d.converter
- Type : topic
- Durability : Durable
- ์๋จ์ Queues ํญ์ ๊ธ๋ฆญํ๊ณ , ํ๋จ์ Add a new queue ๋ฅผ ํด๋ฆญํ์ฌ ์๋์ ๊ฐ์ด ์
๋ ฅํ ๋ค, Add queue ๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.
- Type : Classic
- Name : f4d.converter.queue
- Durability : Durable
- ๋ค๋ฅธ ๊ด๋ฆฌ์ ๊ณ์ ์ ์์ฑํ๊ธฐ ์ํด Admin ๋ฉ๋ด ํ๋จ์ Add a user๋ฅผ ํด๋ฆญํ๊ณ ์๋์ ๊ฐ์ด ์
๋ ฅํ์ฌ ๊ด๋ฆฌ์ ๊ณ์ ์ ์์ฑํฉ๋๋ค.
- Username : mago3d
- Password : mago3d
- Tags : administrator
- guest ์๋์ ์๋ก ์์ฑ๋ mago3d ๊ณ์ ์ ํด๋ฆญํ๊ณ , ์๋์ ๊ฐ์ด Current permissions, Current topic permissions ์ ์์ฑํ๊ณ Update this user ์ ๋น๋ฐ๋ฒํธ(mago3d)๋ฅผ ์
๋ ฅํ ๋ค, ํ๋จ์ Update user ๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.
- Current permission
- Virtual Host : /
- Configure regexp : .*
- Write regexp : .*
- Read regexp : .*
- Topic permission
- Virtual Host : /
- Exchange : f4d.converter
- Write regexp : .*
- Read regexp : .*
- Current permission
- ํ๊ฒฝ๋ณ์ ์ค์
IDE ์ค์
eclipse
- Eclipse IDE 2019-12 (2019-12(4.14.0) ๋ฒ์ ์ด์ ์ค์น)
- Eclipse ์ค์ - STS(Spring Tools) ์ค์
Help โ Eclipse Marketplace โ 'STS' ๊ฒ์ํ, Spring Tools 4 ์ค์น - Eclipse๋ฅผ ์คํ ํ Project Import
File โ import โ Gradle โ Existing Gradle Project
intellij
- ๋ก์ปฌ ๊ฐ๋ฐํ๊ฒฝ์์ static resource ๋ค์ build ์์ด ๊ฐฑ์ ํ๊ธฐ ์ํ์ฌ resource ๊ฒฝ๋ก๋ฅผ file path ๋ก ์ก์ ์ฃผ๋๋ฐ, mago3d ์ ์คํ์ bootRun ์ผ๋ก ์คํํ๊ฑฐ๋
configuration ์ Working directory ๋ฅผ
$MODULE_WORKING_DIR$ ๋ก ์ค์ ํด ์ฃผ์ด์ผ ํฉ๋๋ค.
lombok
- eclipse ๋ฅผ ์ฌ์ฉํ๋ค๋ฉด ์๋์ ๊ณผ์ ์ ํตํด lombok ์ ์ค์นํด ์ฃผ์ด์ผ ํฉ๋๋ค.
- ๋ค์ด๋ก๋ ํด๋ ์ด๋ ํ ์คํ
- eclipse ์ค์น ์์น [Specify location..]๋ฅผ ๊ฒ์ํด์ 'eclipse.exe' ํ์ผ์ ์ ํํฉ๋๋ค.
- install/update ํด๋ฆญํฉ๋๋ค.
2. DB ์์ฑ ๋ฐ ์ด๊ธฐ ๋ฐ์ดํฐ ๋ฑ๋ก
- 1.2 ์ docker ํ๊ฒฝ์์ docker-compose ๋ก ๊ฐ๋ฐํ๊ฒฝ์ ๊ตฌ์ฑํ์๋ค๋ฉด ํด๋น ๊ณผ์ ์ ์๋ตํด๋ ๋ฉ๋๋ค.
- Database & Extensions
- mago3d ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ฅผ ์์ฑํฉ๋๋ค. ํ๊ธ ์ ๋ ฌ์ ์ํด ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ฅผ ๋ค์๊ณผ ๊ฐ์ด ์ค์ ํฉ๋๋ค.
CREATE DATABASE mago3d WITH OWNER = postgres ENCODING = 'UTF8' TEMPLATE = template0 TABLESPACE = pg_default LC_COLLATE = 'C' LC_CTYPE = 'C' CONNECTION LIMIT = -1;
- psql(SQL Shell) ํน์ pgAdmin์์ Extensions ๋ฅผ ์คํํฉ๋๋ค.
CREATE EXTENSION postgis
- sql ์คํ
- doc/database ๊ฒฝ๋ก์ ์๋ ddl/dml/index ํด๋์ sql ๋ค์ ์คํํด ์ค๋๋ค.
3. Execution
- mago3d-admin project spring boot ์คํ
url : http://localhost(:port)/
/mago3d-admin/src/main/java/gaia3d/Mago3DAdminApplication.java
License
mago3D
mago3D is a Digital Twin Platform
Installation and training details
Features
- 2D spatial information management function
- 3D data format support function
- 3D data management function
- Automated 2D/3D spatial information management function
- 3D visualization function
- 3D data operation function
- Interworking with simulation service
Development Environment
- JAVA (OpenJDK) 11.0.2
- Spring Boot 2.3.0
- PostgreSQL 12
- PostGIS 3.0
- Gradle 6.5.0
- Mybatis
- Lombok
- Thymeleaf
- F4d Converter
- Geoserver 2.17.x
- RabbitMQ 3.8.x
- Gdal 3.x
Project Composition
- mago3d-admin : Platform (mago3D) administrator
- mago3d-converter : 3D spatial information automation management
- mago3d-user: 2D/3D spatial data inquiry, simulation interlocking, etc.
- common : Management of common functions such as encryption (security) and statistics module
- doc : database schema, development documentation
- html: html design file (generated by npm init)
Quick Started
- mago3D-CE (mago3D js, mago3D converter)
docker-compose -f docker-compose-ce.yml up -d
- TOBE...mago3D-EE(mago3Djs, mago3D converter, mago3D CMS)
Getting Started
1. Install
1.1 Common
java
- OpenJDK 11.0.2 (build 11.0.2+9) : 11 version installed
GDAL
- Install OSGeo4W (FOSSGIS for Windows) to install GDAL
- Add system variable
Path) C:\OSGeo4W64\bin
F4D Converter
- Installation path: C:\F4DConverterConsole
- Execute the downloaded file to install Converter.
1.2 docker environment
- To use docker-compose, docker must be installed in advance.
- Execute the following command in the root path of the checkedout project.
docker-compose up -d
- According to the contents defined in the docker-compose file, database, geoserver, and rabbitmq are created as containers.
1.3 General Environment
- If you have configured the development environment with docker-compose in the docker environment of 1.2, you can skip step 1.3.
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads)
[PostgreSQL] (- Set to PostgreSQL12 version
- Installation path C:/PostgreSQL/12
See doc/database/doc/database/ - [PostGIS] (https://postgis.net/) set to the latest SQL version
https://www.erlang.org/downloads)
[Erlang] (- To install rabbit mq, erlang is required, so first install erlang.
- Click โOTP 23.1 Windows 64-bit Binary Fileโ in the Download OTP 23.1 section to download and run the file.
- Since the component settings will be defaulted, click next to install.
- If the Visual C++ component installation window appears, check the checkbox and install.
RabbitMQ
- Check the latest version, and download and install the installation file according to the operating system environment.
- Environment variable setting
- Click [Control Panel] โ [System and Security] โ [System] or [Properties] of [My PC], and then click [Advanced system settings].
- Click [Environment Variables] on the [Advanced] tab screen of [System Properties].
- Click [New] on the [Environment Variables] screen and set RABBITMQ_HOME and RabbitMQ installation path in the variable name and variable value fields.
- After setting the RabbitMQ installation path, select the [Path] variable in the system variables and click the [Edit] button.
- Click the [New] button and enter %RABBITMQ_HOME%\sbin.
- Activate the admin plugin
- To access the admin page, the management plugin must be activated. (Cannot connect when deactivated)
- To activate the management plugin of RabbitMQ, enter โrabbitmq-plugins enable rabbitmq_managementโ in the command prompt window to enable it.
- Restart the command prompt and check whether the plugin is activated with โrabbitmq-plugins listโ.
- Admin Settings
- Access the RabbitMQ admin page (http://localhost:15672).
- Both ID and password log in as guest.
- Click the Exchange tab at the top, click Add a new exchanges at the bottom, enter the following, and click the Add exchange button.
- Name : f4d.converter
- Type : topic
- Durability : Durable
- Click the Queues tab at the top, click Add a new queue at the bottom, enter the following, and click the Add queue button.
- Type : Classic
- Name : f4d.converter.queue
- Durability : Durable
- To create another administrator account, click Add a user at the bottom of the Admin menu and enter the following to create an administrator account.
- Username : mago3d
- Password : mago3d
- Tags : administrator
- Click the newly created mago3d account under guest, create Current permissions and Current topic permissions as shown below, enter the password (mago3d) in Update this user, and click the Update user button at the bottom.
- Current permission
- Virtual Host : /
- Configure regexp : .*
- Write regexp : .*
- Read regexp : .*
- Topic permission
- Virtual Host : /
- Exchange: f4d.converter
- Write regexp : .*
- Read regexp : .*
- Current permission
- Environment variable setting
IDE Settings
eclipse
- Eclipse IDE 2019-12 (2019-12(4.14.0) or higher installed)
- Eclipse Settings - STS (Spring Tools) Settings
Help โ Eclipse Marketplace โ Search 'STS' and install Spring Tools 4 - After running Eclipse, Project Import
File โ import โ Gradle โ Existing Gradle Project
intellij
- In order to update static resources without build in the local development environment, the resource path is set as a file path, and the execution of mago3d is executed as bootRun or
Working directory must be set to
$MODULE_WORKING_DIR$ in configuration.
lombok
- If you are using eclipse, you need to install lombok through the process below.
- Run after moving to the download folder
- Search the eclipse installation location [Specify location..] and select the 'eclipse.exe' file.
- install/update clickRick.
2. DB creation and initial data registration
- If you have configured the development environment with docker-compose in the docker environment of 1.2, you can skip this process.
- Database & Extensions
- Create a mago3d database. Set up the database for Korean sorting as follows.
CREATE DATABASE mago3d
WITH OWNER = postgres
ENCODING = 'UTF8'
TEMPLATE = template0
TABLESPACE = pg_default
LC_COLLATE = 'C'
LC_CTYPE = 'C'
CONNECTION LIMIT = -1;
- Execute Extensions in psql (SQL Shell) or pgAdmin.
CREATE EXTENSION postgis
- run sql
- Execute the sql files in the ddl/dml/index folder in the doc/database path.
3. Execution
- Run mago3d-admin project spring boot
url : http://localhost(:port)/
/mago3d-admin/src/main/java/gaia3d/Mago3DAdminApplication.java
License
[Apache License Version 2.0] (http://www.apache.org/licenses/LICENSE-2.0.html).