Gaia3D / mago-3d-tiler

This is the official repository of mago-3d-tiler.
https://seoul.gaia3d.com:10903/
Mozilla Public License 2.0
149 stars 16 forks source link

Filtering the tiles based on attribute. #26

Open SadhakAkshay opened 2 weeks ago

SadhakAkshay commented 2 weeks ago

Hello, I want to know if we can filter the generated b3dm tiles from shapefile based on certain attribute values of shp. Thank you.

znkim commented 1 week ago

Hello, @SadhakAkshay

Unfortunately, we do not plan to support the feature of filtering attributes in the b3dm generate step. I'm not sure why it's needed, as it's not an action to optimize visibility.

Thank you.

shire75 commented 1 week ago

Hi, @SadhakAkshay .

I recommend to divide the original shp file into multiple shp files along attributes which you want to use in filtering geometries and to convert each created shp files to individual 3D Tiles layers.

Then, you can implement filtering 3D objects by simple layer on/off.

SadhakAkshay commented 1 week ago

Hi, @SadhakAkshay .

I recommend to divide the original shp file into multiple shp files along attributes which you want to use in filtering geometries and to convert each created shp files to individual 3D Tiles layers.

Then, you can implement filtering 3D objects by simple layer on/off.

ok sir, thanks for suggestion, I will give it a try.

SadhakAkshay commented 1 week ago

Hello, @SadhakAkshay

Unfortunately, we do not plan to support the feature of filtering attributes in the b3dm generate step. I'm not sure why it's needed, as it's not an action to optimize visibility.

Thank you.

ok

SadhakAkshay commented 1 week ago

Hello, Currently I am trying to generate 3d tiles from single attribute as suggeted earlier, for that I am using following command java -jar /home/rachit/Desktop/trail1/mago-3d-tiler-1.8.1-natives-linux.jar --input "/home/rachit/Desktop/anantu_op/$table/xyz.shp" --inputType shp -c 32643 -hc PIPE_DEPTH -rc PIPE_DIA_I --output "/home/rachit/Desktop/mago_3d_tiler/PCMC/data/

WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.

┳┳┓┏┓┏┓┏┓ ┏┓┳┓ ┏┳┓┳┓ ┏┓┳┓ ┃┃┃┣┫┃┓┃┃ ┫┃┃ ┃ ┃┃ ┣ ┣┫ ┛ ┗┛┗┗┛┗┛ ┗┛┻┛ ┻ ┻┗┛┗┛┛┗ 3d-tiler(1.8.1) by Gaia3d, Inc.

[INFO][12:19:25][mago.OptionsCorrector(isExistOutput:33)]::Created new output directory. /home/rachit/Desktop/trail1/3d_data/9

[DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:331)]::Input Path: /home/rachit/Desktop/trail1/final_data/9_z.shp [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:332)]::Output Path: /home/rachit/Desktop/trail1/3d_data/9 [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:333)]::Input Format: SHP [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:334)]::Output Format: B3DM [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:335)]::Terrain File Path: null [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:336)]::Instance File Path: /home/rachit/Desktop/trail1/final_data/9_z.shp/instance.dae [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:337)]::Log Path: null [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:338)]::Recursive Path Search: false

[DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:341)]::Coordinate Reference System: EPSG:32643 [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:342)]::Proj4 Code: null [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:343)]::Minimum LOD: 0 [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:344)]::Maximum LOD: 3 [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:345)]::Minimum GeometricError: 16 [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:346)]::Maximum GeometricError: 2147483647 [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:347)]::PointCloud Point Limit: 65536 [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:348)]::PointCloud Scale: 2 [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:349)]::PointCloud Skip Interval: 4 [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:350)]::Debug Mode: true [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:351)]::Debug LOD: false [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:352)]::Debug GLB: false [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:353)]::classicTransformMatrix: false [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:354)]::Multi-Thread Count: 2

[DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:358)]::Swap Up-Axis: false [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:359)]::Flip Up-Axis: false [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:360)]::RefineAdd: true [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:361)]::Flip Coordinate: false [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:362)]::Zero Origin: false [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:363)]::Auto Up-Axis: false [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:364)]::Ignore Textures: false [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:365)]::Max Triangles: 524288 [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:366)]::Max Instance Size: 512 [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:367)]::Max Node Depth: 32 [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:368)]::LargeMesh: false

[DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:372)]::Name Column: name [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:373)]::Height Column: PIPE_DEPTH [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:374)]::Altitude Column: altitude [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:375)]::Absolute Altitude: 0.0 [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:376)]::Minimum Height: 1.0 [DEBUG][12:19:25][mago.GlobalOptions(printDebugOptions:377)]::Skirt Height: 4.0

[INFO][12:19:25][mago.Mago3DTiler(execute:26)]::Starting process flow: BatchedProcessModel [INFO][12:19:25][process.TilingPipeline(createTemp:158)]::[Pre] Created temp directory in /home/rachit/Desktop/trail1/3d_data/9/temp [INFO][12:19:25][process.TilingPipeline(startPreProcesses:63)]::[Pre] Start the pre-processing. [INFO][12:19:25][process.TilingPipeline(startPreProcesses:67)]::[Pre] Loading all files. ^CShapefile with Z values generated for ID: 9 Initializing... Done (postgis major version: 3). Output shape: PolyLineZ Dumping: X [1 rows]. WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.

10_z.zip Demo data I am using this

sdson commented 1 week ago

Hello @SadhakAkshay !

We converted 10_z data (diameter exaggered and z += 3m) 👍 image

all is correct.

SadhakAkshay commented 6 days ago

Hello @SadhakAkshay !

We converted 10_z data (diameter exaggered and z += 3m) 👍 image

all is correct.

ok sir thank you.

SadhakAkshay commented 6 days ago

Hello @SadhakAkshay !

We converted 10_z data (diameter exaggered and z += 3m) 👍 image

all is correct.

sir can you please share the command used or any modifications in data

sdson commented 5 days ago

We does not added any modifications, only exaggered the diameter value in the shp file. The diameter is very small. Remember that in the *.shp file, must contain "diameter" parameter and this is in "millimeters".

SadhakAkshay commented 5 days ago

We does not added any modifications, only exaggered the diameter value in the shp file. The diameter is very small. Remember that in the *.shp file, must contain "diameter" parameter and this is in "millimeters".

ok sir.

SadhakAkshay commented 5 days ago

We does not added any modifications, only exaggered the diameter value in the shp file. The diameter is very small. Remember that in the *.shp file, must contain "diameter" parameter and this is in "millimeters".

Hello sir, I increase the diameter size of the pipes and use following command, it gives me this error

akshay@admin1-B250M-DS3H:~$ java -jar /home/akshay/Desktop/mago_1.8/mago-3d-tiler-1.8.1-natives-linux.jar --input "/home/akshay/Desktop/final_data/6_z.shp" --inputType shp -c 32643 -hc PIPE_DEPTH -dc PIPE_DIA_I --output "/home/akshay/Desktop/final_data/" -d WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.

┳┳┓┏┓┏┓┏┓ ┏┓┳┓ ┏┳┓┳┓ ┏┓┳┓ ┃┃┃┣┫┃┓┃┃ ┫┃┃ ┃ ┃┃ ┣ ┣┫ ┛ ┗┛┗┗┛┗┛ ┗┛┻┛ ┻ ┻┗┛┗┛┛┗ 3d-tiler(1.8.1) by Gaia3d, Inc.

[DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:331)]::Input Path: /home/akshay/Desktop/final_data/6_z.shp [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:332)]::Output Path: /home/akshay/Desktop/final_data/ [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:333)]::Input Format: SHP [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:334)]::Output Format: B3DM [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:335)]::Terrain File Path: null [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:336)]::Instance File Path: /home/akshay/Desktop/final_data/6_z.shp/instance.dae [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:337)]::Log Path: null [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:338)]::Recursive Path Search: false

[DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:341)]::Coordinate Reference System: EPSG:32643 [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:342)]::Proj4 Code: null [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:343)]::Minimum LOD: 0 [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:344)]::Maximum LOD: 3 [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:345)]::Minimum GeometricError: 16 [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:346)]::Maximum GeometricError: 2147483647 [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:347)]::PointCloud Point Limit: 65536 [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:348)]::PointCloud Scale: 2 [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:349)]::PointCloud Skip Interval: 4 [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:350)]::Debug Mode: true [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:351)]::Debug LOD: false [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:352)]::Debug GLB: false [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:353)]::classicTransformMatrix: false [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:354)]::Multi-Thread Count: 2

[DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:358)]::Swap Up-Axis: false [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:359)]::Flip Up-Axis: false [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:360)]::RefineAdd: true [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:361)]::Flip Coordinate: false [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:362)]::Zero Origin: false [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:363)]::Auto Up-Axis: false [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:364)]::Ignore Textures: false [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:365)]::Max Triangles: 524288 [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:366)]::Max Instance Size: 512 [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:367)]::Max Node Depth: 32 [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:368)]::LargeMesh: false

[DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:372)]::Name Column: name [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:373)]::Height Column: PIPE_DEPTH [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:374)]::Altitude Column: altitude [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:375)]::Absolute Altitude: 0.0 [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:376)]::Minimum Height: 1.0 [DEBUG][12:04:10][mago.GlobalOptions(printDebugOptions:377)]::Skirt Height: 4.0

[INFO][12:04:10][mago.Mago3DTiler(execute:26)]::Starting process flow: BatchedProcessModel [INFO][12:04:10][process.TilingPipeline(createTemp:158)]::[Pre] Created temp directory in /home/akshay/Desktop/final_data/temp [INFO][12:04:10][process.TilingPipeline(startPreProcesses:63)]::[Pre] Start the pre-processing. [INFO][12:04:10][process.TilingPipeline(startPreProcesses:67)]::[Pre] Loading all files. [INFO][12:04:10][process.TilingPipeline(startPreProcesses:69)]::[Pre] Finished loading all files [INFO][12:04:11][shape.ShapeConverter(convert:94)]:: - Total Shape Feature Count : 1 [ERROR][12:04:11][process.TilingPipeline(executeThread:179)]::Failed to execute thread. java.util.concurrent.ExecutionException: java.lang.ArithmeticException: / by zero at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:?] at java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[?:?] at com.gaia3d.process.TilingPipeline.executeThread(TilingPipeline.java:175) [mago-3d-tiler-1.8.1-natives-linux.jar:1.8.1] at com.gaia3d.process.TilingPipeline.startPreProcesses(TilingPipeline.java:101) [mago-3d-tiler-1.8.1-natives-linux.jar:1.8.1] at com.gaia3d.process.TilingPipeline.process(TilingPipeline.java:49) [mago-3d-tiler-1.8.1-natives-linux.jar:1.8.1] at com.gaia3d.command.model.BatchedProcessModel.run(BatchedProcessModel.java:78) [mago-3d-tiler-1.8.1-natives-linux.jar:1.8.1] at com.gaia3d.command.mago.Mago3DTiler.execute(Mago3DTiler.java:27) [mago-3d-tiler-1.8.1-natives-linux.jar:1.8.1] at com.gaia3d.command.mago.Mago3DTilerMain.main(Mago3DTilerMain.java:55) [mago-3d-tiler-1.8.1-natives-linux.jar:1.8.1] Caused by: java.lang.ArithmeticException: / by zero at com.gaia3d.converter.geometry.shape.ShapeConverter.convert(ShapeConverter.java:101) ~[mago-3d-tiler-1.8.1-natives-linux.jar:1.8.1] at com.gaia3d.converter.geometry.shape.ShapeConverter.load(ShapeConverter.java:58) ~[mago-3d-tiler-1.8.1-natives-linux.jar:1.8.1] at com.gaia3d.converter.loader.BatchedFileLoader.loadScene(BatchedFileLoader.java:36) ~[mago-3d-tiler-1.8.1-natives-linux.jar:1.8.1] at com.gaia3d.converter.loader.BatchedFileLoader.loadTileInfo(BatchedFileLoader.java:113) ~[mago-3d-tiler-1.8.1-natives-linux.jar:1.8.1] at com.gaia3d.process.TilingPipeline.lambda$startPreProcesses$0(TilingPipeline.java:79) ~[mago-3d-tiler-1.8.1-natives-linux.jar:1.8.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:840) ~[?:?] Exception in thread "main" java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ArithmeticException: / by zero at com.gaia3d.process.TilingPipeline.executeThread(TilingPipeline.java:180) at com.gaia3d.process.TilingPipeline.startPreProcesses(TilingPipeline.java:101) at com.gaia3d.process.TilingPipeline.process(TilingPipeline.java:49) at com.gaia3d.command.model.BatchedProcessModel.run(BatchedProcessModel.java:78) at com.gaia3d.command.mago.Mago3DTiler.execute(Mago3DTiler.java:27) at com.gaia3d.command.mago.Mago3DTilerMain.main(Mago3DTilerMain.java:55) Caused by: java.util.concurrent.ExecutionException: java.lang.ArithmeticException: / by zero at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) at com.gaia3d.process.TilingPipeline.executeThread(TilingPipeline.java:175) ... 5 more Caused by: java.lang.ArithmeticException: / by zero at com.gaia3d.converter.geometry.shape.ShapeConverter.convert(ShapeConverter.java:101) at com.gaia3d.converter.geometry.shape.ShapeConverter.load(ShapeConverter.java:58) at com.gaia3d.converter.loader.BatchedFileLoader.loadScene(BatchedFileLoader.java:36) at com.gaia3d.converter.loader.BatchedFileLoader.loadTileInfo(BatchedFileLoader.java:113) at com.gaia3d.process.TilingPipeline.lambda$startPreProcesses$0(TilingPipeline.java:79) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840)

sdson commented 5 days ago

In your shp file, are there more than 100 pipe-lines?

SadhakAkshay commented 5 days ago

In your shp file, are there more than 100 pipe-lines?

no sir only one

sdson commented 5 days ago

Then wait few days please. We are testing a lot of data conversion before to update the release version. In the updated version this error will be corrected (in current version there are an error when pipe-lines count is less than 100).

Sorry for this error.

SadhakAkshay commented 5 days ago

ok sir no problem, waiting for new release as it will be really helpful having such functionality.