Gaia3D / mago-3d-tiler

This is the official repository of mago-3d-tiler.
https://seoul.gaia3d.com:10903/
Mozilla Public License 2.0
165 stars 20 forks source link
3d-tiles 3dtiles assimp bim citygml4j digital-twin geospatial geotools gis gltf ifc jgltf joml laszip4 laz lwjgl3 mago mago3d opengl proj4j

mago_3DTiler_256

mago 3DTiler: The Premier OGC 3D Tiles Solution!

Unlock the potential of your geospatial projects with mago 3DTiler
the robust, versatile tool designed to elevate your 3D data into the realm of OGC 3D Tiles with unprecedented ease.

Why mago 3DTiler?

mago 3DTiler isn’t just a converter;
developed with Java, this open-source marvel stands as a beacon for flexibility and performance in the world of 3D data conversion.

Key Features:​

How to Use:

Basically, when you modify source, you can generate a runnable jar via shadowjar, the tiler project's gradle script.
There are pre-built jars in the /tiler/dist/ directory.

The JAVA version used when building is JDK 17.
Below is an example of running the Help code.

java -jar mago-3d-tiler-x.x.x-natives-windows.jar --help

console output:

┳┳┓┏┓┏┓┏┓  ┏┓┳┓  ┏┳┓┳┓ ┏┓┳┓
┃┃┃┣┫┃┓┃┃   ┫┃┃   ┃ ┃┃ ┣ ┣┫
┛ ┗┛┗┗┛┗┛  ┗┛┻┛   ┻ ┻┗┛┗┛┛┗
3d-tiler(dev) by Gaia3D, Inc.
----------------------------------------
usage: Gaia3D Tiler
 -aa,--absoluteAltitude <arg>    Absolute altitude value for extrusion
                                 model
 -ac,--altitudeColumn <arg>      Altitude Column setting for extrusion
                                 model ((Default Column: altitude)
 -c,--crs <arg>                  Coordinate Reference Systems, EPSG
                                 Code(4326, 3857, 32652, 5186...)
 -d,--debug                      More detailed log output and stops on
                                 Multi-Thread bugs.
 -dc,--diameterColumn <arg>      Diameter column setting for extrusion
                                 model, Specify a length unit for Diameter
                                 in millimeters(mm) (Default Column:
                                 diameter)
 -fc,--flipCoordinate            Flip x, y coordinate for 2D Original
                                 Data. (Default: false)
 -glb,--glb                      Create glb file with B3DM.
 -h,--help                       Print Gelp
 -hc,--heightColumn <arg>        Height column setting for extrusion model
                                 ((Default Column: height)
 -i,--input <arg>                Input directory path
 -if,--instance <arg>            Instance file path for I3DM (Default:
                                 {OUTPUT}/instance.dae)
 -igtx,--ignoreTextures          Ignore diffuse textures.
 -it,--inputType <arg>           Input files type (kml, 3ds, fbx, obj,
                                 gltf, glb, las, laz, citygml, indoorgml,
                                 shp, geojson)(Default: kml)
 -l,--log <arg>                  Output log file path.
 -lm,--largeMesh                 [Experimental] Large Mesh Splitting Mode
                                 (Default: false)
 -mc,--multiThreadCount <arg>    set Multi-Thread count
 -mg,--maxGeometricError <arg>   Maximum geometric error (Default: Integer
                                 max value)
 -mh,--minimumHeight <arg>       Minimum height value for extrusion model
                                 (Default: 1.0)
 -mp,--maxPoints <arg>           Maximum number of points per a tile
                                 (Default: 100000)
 -mx,--maxCount <arg>            Maximum number of triangles per node.
 -nc,--nameColumn <arg>          Name column setting for extrusion model
                                 (Default Column: name)
 -ng,--minGeometricError <arg>   Minimum geometric error (Default: 16.0)
 -nl,--minLod <arg>              min level of detail (Default: 0)
 -o,--output <arg>               Output directory file path
 -ot,--outputType <arg>          Output 3DTiles Type (b3dm, i3dm,
                                 pnts)(Default : b3dm)
 -p,--proj <arg>                 Proj4 parameters (ex: +proj=tmerc +la...)
 -pr,--photorealistic            [Experimental] Photorealistic mode for
                                 b3dm (Default: false)
 -q,--quiet                      Quiet mode/Silent mode
 -r,--recursive                  Tree directory deep navigation.
 -ra,--refineAdd                 Set 3D Tiles Refine 'ADD' mode
 -ru,--flipUpAxis                Rotate the matrix 180 degrees about the
                                 X-axis. (Default: false)
 -rx,--rotateXAxis <arg>         Rotate the X-Axis in degrees (Unit:
                                 degrees)(Default: 0.0)
 -sh,--skirtHeight <arg>         Building Skirt height setting for
                                 extrusion model (Default: 4.0)
 -sp,--sourcePrecision           Create pointscloud tile with original
                                 precision. (Slow)
 -su,--swapUpAxis                Rotate the matrix -90 degrees about the
                                 X-axis. (Default: false)
 -te,--terrain <arg>             GeoTiff Terrain file path, 3D Object
                                 applied as clampToGround (Supports
                                 geotiff format)
 -v,--version                    Print Version Info
 -vl,--voxelLod                  [Experimental] Voxel Level Of Detail
                                 setting for i3dm (Default: false)
 -xl,--maxLod <arg>              Max Level of detail (Default: 3)
 -xo,--xOffset <arg>             X Offset value for coordinate
                                 transformation
 -yo,--yOffset <arg>             Y Offset value for coordinate
                                 transformation
 -zo,--zeroOrigin                [Experimental] fix 3d root transformed
                                 matrix origin to zero point.

This is a simple kml/collada -> 3dTiles conversion code with the mandatory argument values.

java -jar mago-3d-tiler-x.x.x-natives-windows.jar --input C:\data\kml-input-dir --inputType kml --output C:\data\kml-output-dir

or

java -jar mago-3d-tiler-x.x.x-natives-windows.jar -i C:\data\kml-input-dir -o C:\data\kml-output-dir

How to use Docker version:

Alternatively, you can easily use mago3dtiler with docker.

Example usage :

docker pull gaia3d/mago-3d-tiler
docker run --rm -v "/workspace:/workspace" gaia3d/mago-3d-tiler -it 3ds -i /workspace/3ds-samples -o /workspace/sample-3d-tiles -crs 5186

Supported Java versions:

It supports compatibility with long-term support (LTS) versions of the JDK, such as JDK11, JDK17 and JDK21.
JDK21 has been found to be partially available.

Experience the mago 3DTiler:

image
https://seoul.gaia3d.com:10903

Explore and Experience:

Library Dependencies:


mago_3DTiler_256

mago 3DTiler: The Premier OGC 3D Tiles Solution!

개요

mago 3DTiler는 오픈소스 기반의 OGC 3D Tiles 변환기입니다.
다양한 공간정보 데이터를 디지털트윈 서비스의 근간이 되는 OGC 3D Tiles로 변환해 줍니다.
mago 3DTiler는 Java 기반으로 뛰어난 이식성, 유연함과 함께 빠른 속도를 자랑합니다.

주요 기능:

사용법:

기본적으로 코드 수정 시 tiler프로젝트의 gradle script인 shadowjar를 통해 runnable jar를 생성할 수 있습니다.
/tiler/dist/ 디렉토리에는 미리 빌드된 jar가 준비 되어있습니다.

아래는 Help 코드를 실행시킨 예시입니다.

java -jar mago-3d-tiler-x.x.x-natives-windows.jar -h

출력 결과물:

┳┳┓┏┓┏┓┏┓  ┏┓┳┓  ┏┳┓┳┓ ┏┓┳┓
┃┃┃┣┫┃┓┃┃   ┫┃┃   ┃ ┃┃ ┣ ┣┫
┛ ┗┛┗┗┛┗┛  ┗┛┻┛   ┻ ┻┗┛┗┛┛┗
3d-tiler(dev) by Gaia3D, Inc.
----------------------------------------
usage: Gaia3D Tiler
 -aa,--absoluteAltitude <arg>    Absolute altitude value for extrusion
                                 model
 -ac,--altitudeColumn <arg>      Altitude Column setting for extrusion
                                 model ((Default Column: altitude)
 -c,--crs <arg>                  Coordinate Reference Systems, EPSG
                                 Code(4326, 3857, 32652, 5186...)
 -d,--debug                      More detailed log output and stops on
                                 Multi-Thread bugs.
 -dc,--diameterColumn <arg>      Diameter column setting for extrusion
                                 model, Specify a length unit for Diameter
                                 in millimeters(mm) (Default Column:
                                 diameter)
 -fc,--flipCoordinate            Flip x, y coordinate for 2D Original
                                 Data. (Default: false)
 -glb,--glb                      Create glb file with B3DM.
 -h,--help                       Print Gelp
 -hc,--heightColumn <arg>        Height column setting for extrusion model
                                 ((Default Column: height)
 -i,--input <arg>                Input directory path
 -if,--instance <arg>            Instance file path for I3DM (Default:
                                 {OUTPUT}/instance.dae)
 -igtx,--ignoreTextures          Ignore diffuse textures.
 -it,--inputType <arg>           Input files type (kml, 3ds, fbx, obj,
                                 gltf, glb, las, laz, citygml, indoorgml,
                                 shp, geojson)(Default: kml)
 -l,--log <arg>                  Output log file path.
 -lm,--largeMesh                 [Experimental] Large Mesh Splitting Mode
                                 (Default: false)
 -mc,--multiThreadCount <arg>    set Multi-Thread count
 -mg,--maxGeometricError <arg>   Maximum geometric error (Default: Integer
                                 max value)
 -mh,--minimumHeight <arg>       Minimum height value for extrusion model
                                 (Default: 1.0)
 -mp,--maxPoints <arg>           Maximum number of points per a tile
                                 (Default: 100000)
 -mx,--maxCount <arg>            Maximum number of triangles per node.
 -nc,--nameColumn <arg>          Name column setting for extrusion model
                                 (Default Column: name)
 -ng,--minGeometricError <arg>   Minimum geometric error (Default: 16.0)
 -nl,--minLod <arg>              min level of detail (Default: 0)
 -o,--output <arg>               Output directory file path
 -ot,--outputType <arg>          Output 3DTiles Type (b3dm, i3dm,
                                 pnts)(Default : b3dm)
 -p,--proj <arg>                 Proj4 parameters (ex: +proj=tmerc +la...)
 -pr,--photorealistic            [Experimental] Photorealistic mode for
                                 b3dm (Default: false)
 -q,--quiet                      Quiet mode/Silent mode
 -r,--recursive                  Tree directory deep navigation.
 -ra,--refineAdd                 Set 3D Tiles Refine 'ADD' mode
 -ru,--flipUpAxis                Rotate the matrix 180 degrees about the
                                 X-axis. (Default: false)
 -rx,--rotateXAxis <arg>         Rotate the X-Axis in degrees (Unit:
                                 degrees)(Default: 0.0)
 -sh,--skirtHeight <arg>         Building Skirt height setting for
                                 extrusion model (Default: 4.0)
 -sp,--sourcePrecision           Create pointscloud tile with original
                                 precision. (Slow)
 -su,--swapUpAxis                Rotate the matrix -90 degrees about the
                                 X-axis. (Default: false)
 -te,--terrain <arg>             GeoTiff Terrain file path, 3D Object
                                 applied as clampToGround (Supports
                                 geotiff format)
 -v,--version                    Print Version Info
 -vl,--voxelLod                  [Experimental] Voxel Level Of Detail
                                 setting for i3dm (Default: false)
 -xl,--maxLod <arg>              Max Level of detail (Default: 3)
 -xo,--xOffset <arg>             X Offset value for coordinate
                                 transformation
 -yo,--yOffset <arg>             Y Offset value for coordinate
                                 transformation
 -zo,--zeroOrigin                [Experimental] fix 3d root transformed
                                 matrix origin to zero point.

필수 인자 값으로 작성한 간단한 kml/collada -> 3dTiles 변환코드 입니다.

java -jar mago-3d-tiler-x.x.x-natives-windows.jar --input C:\data\kml-input-dir --inputType kml --output C:\data\kml-output-dir

또는

java -jar mago-3d-tiler-x.x.x-natives-windows.jar -i C:\data\kml-input-dir -o C:\data\kml-output-dir

도커 버전 사용법:

mago 3DTiler 1.3.1 버전부터 도커 버전으로 손쉽게 사용할 수 있습니다.

사용 예시:

docker pull gaia3d/mago-3d-tiler
docker run --rm -v "/workspace:/workspace" gaia3d/mago-3d-tiler -it 3ds -i /workspace/3ds-samples -o /workspace/sample-3d-tiles -crs 5186

지원하는 자바 버전:

JDK11, JDK17, JDK21 등 JDK의 LTS(Long-term support) 버전의 호환을 지원합니다.
JDK21는 부분적으로 사용이 가능한 것을 확인했습니다.

샘플 사이트:

image
https://seoul.gaia3d.com:10903

라이선스:

라이브러리 의존성: