Gaia3D / mago-3d-tiler

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

Cannot read field "R" because "rgbRecord" is null #3

Closed mmiler closed 6 months ago

mmiler commented 6 months ago

Hi, I have laz files with no RGB, only Intensity and Classification attribute. When I try to process the files I get this error:

Exception in thread "main" java.lang.NullPointerException: Cannot read field "R" because "rgbRecord" is null

Command that I am using is:

java -jar mago-3d-tiler-1.3.0-natives-linux.jar --input /in/RH_W15_fixed -it laz -c 3765 --output /out/RH_W15_fixed/mago_test

Thank you.

sdson commented 6 months ago

Hi, @mmiler .

First of all, thank you for your concern.

We do have plans to solve this issue, but not right away.

The reason for this issue is that the points cloud samples we have only have RGB values.

We will fix this issue as soon as we acquire samples that have "intensity" values.

Thank you.

znkim commented 6 months ago

Hello,

There are different record types in LAS data, and some record types do not contain RGB record. We have implemented a feature to change the "intensity" to Gray Scale to make it visible if the record in LAS data does not have RGB color. We pushed the feature to the develop branch.

Later, we will release the source and jar file when we release the main version.

Thank you.

mmiler commented 6 months ago

Great, thank you. I see the changes you made.

If I see the changes correctly, you have added Intensity value for all three (RGB) bands. Why not put it as a Intensity attribute without RGB value? 3Dtiles specifications allow it and you get much smaller tiles becouse you store one value, not three.

znkim commented 6 months ago

First, thanks for the comment. I was so focused on the visualization that I didn't take that into account.

I'll definitely consider that feature, though not right away.

The normalized intensity value will be converted to a float or double. When this value is stored as an attribute, it will be stored as text or float, but whether it will be smaller than the RGB(byte[3]) value is something I need to think about a bit more.

Thank you for your active feedback. I'll close this issue for now.