Coder Social home page Coder Social logo

gocesiumtiler's People

Contributors

kinotus avatar metalefty avatar mfbonfigli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gocesiumtiler's Issues

Error during conversion of las file

I am trying to get 3d tiles for rendering these files in cesium

Screenshot 2024-07-03 at 2 56 47 PM

Seeing this issue while converting a las file I see a similar issue raised for compatibility #16

Any help would be much appreciated.

Thank You.

Project as a starting point for a mesh tiler?

Hello Massimo,

First, thank you for a great tool / library. This isn't really an issue, more of a question for you.

I have several huge obj files I'd like to tile without using cesium ion / 3rd party tools I have to pay for. There's really nothing great out there for this... so here I am exploring options for building my own. This project seems like a decent starting off point for such a tool, as it already outputs 3d tilesets, includes relevant libraries / math for reprojection, and seems to be well written / modular.

My questions for you:

  1. Are my assumptions correct or am I totally off-base considering this tool as a starting off point?
  2. How would you go about implementing mesh tiling? As much detail here as possible would be great.

Same error with all LAS files. DeallocateProjection

Hello!
I have the same error with all my las files.
Do you have any working las file?
Best regards!!

Preparing list of files to process...
Processing file 1/1

reading data from las file... stadium_all.las
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x4d135d]

goroutine 1 [running]:
github.com/xeonx/proj4.(*Proj).Close(0x0)
C:/Users/user1/go/src/github.com/xeonx/proj4/proj.go:70 +0x2d
github.com/mfbonfigli/gocesiumtiler/converters.DeallocateProjection(...)
C:/Users/user1/go/src/github.com/mfbonfigli/gocesiumtiler/converters/converters.go:133
github.com/mfbonfigli/gocesiumtiler/lasread.(*LasFile).readPointsOctElem(0xc00008ac80, 0xc000042370, 0x10e6, 0x5d21e0, 0xc000448060, 0x0, 0x0)
C:/Users/user1/go/src/github.com/mfbonfigli/gocesiumtiler/lasread/tiler_las_reader.go:178 +0x45d
github.com/mfbonfigli/gocesiumtiler/lasread.(*LasFile).readForOctree(0xc00008ac80, 0xc000042370, 0x10e6, 0x5d21e0, 0xc000448060, 0x0, 0x0)
C:/Users/user1/go/src/github.com/mfbonfigli/gocesiumtiler/lasread/tiler_las_reader.go:61 +0x21c
github.com/mfbonfigli/gocesiumtiler/lasread.NewLasFileForTiler(0xc00000e367, 0x21, 0xc000042370, 0x10e6, 0x5d21e0, 0xc000448060, 0xc000006018, 0xc00007dd68, 0x2)
C:/Users/user1/go/src/github.com/mfbonfigli/gocesiumtiler/lasread/tiler_las_reader.go:26 +0x12f
main.readLas(0xc00000e367, 0x21, 0xc000042370, 0xc000018380, 0x5d21e0, 0xc000448060, 0x0, 0x0)
C:/Users/user1/go/src/github.com/mfbonfigli/gocesiumtiler/tiler.go:125 +0x97
main.loadLasInOctree(...)
C:/Users/user1/go/src/github.com/mfbonfigli/gocesiumtiler/tiler.go:114
main.RunTiler(0xc000018380, 0x0, 0x0)
C:/Users/user1/go/src/github.com/mfbonfigli/gocesiumtiler/tiler.go:84 +0x56e
main.main()
C:/Users/user1/go/src/github.com/mfbonfigli/gocesiumtiler/main.go:99 +0x8f9

epsg code not found

What EPSG does this project support? My data is EPSG4545. What should I do? I need your help

Strange rendering of gocesiumtiler tiles with custom Cesium JS shader

I am rendering a point cloud in Cesium JS with a custom shader, it’s displaying perfectly in the sandcastle with the demo point cloud, and with the PNTS tiles that are automatically exported out of DJI Terra, but if I generate tiles from the LAS with gocesiumtiler, it renders fine and in-position with the standard shader/style as simple RGB, but renders complete noise with the custom shader.

The end goal is to change colour based on height in Cesium JS (I had no luck styling based on POSITION_ABSOLUTE so I looked to custom shaders)

Is there something wrong with my gocesiumtiler settings, or is this a bug? Can you offer any improvements to my gocesiumtiler parameters for a 3GB LAS?

Sandcastle with custom shader: ✅

image

DJI Terra generated tiles: ✅

image

Same dataset exported as LAS from DJI Terra and tiled with gocesiumtiler: 👎

gocesiumtiler file \
  --epsg 32756 \
  --resolution 1 \
  --depth 8 \
  --min-points-per-tile 5000 \
  --out "tiles-gocesiumtiler" \
  "my-point-cloud.las"

image

Note that the positions of both tilesets are the same, I have used this method of generating tiles for quite a while but I’ve only ran into problems now that I am using a custom shader.

Question about the implementation of `ConvertToWGS84Cartesian`

Why does the function ConvertToWGS84Cartesian not directly convert the source coordinates to EPSG:4978?

BTW, I think this comment should refer to EPSG:4978 instead of EPSG:4326:

// Converts the input coordinate from the given srid to EPSG:4326 srid
func (cc *proj4CoordinateConverter) ConvertToWGS84Cartesian(coord geometry.Coordinate, sourceSrid int) (geometry.Coordinate, error) {

Run Time Error

image
The input point cloud can be loaded and displayed using CloudCompare, but a runtime error occurs when using gocesiumtiler, as shown in the picture above.

Tileset disappears when zooming out due to low geometric error on root tile

I'm trying to display the Point Cloud when zooming out without having to use maximumScreenSpaceError (=0) feature from Cesium. When using the grid algorithm I notice that the conversion has a very low geometric error on the root. My problem is that if I zoom out a small amount the tileset disappears. I do not want to use maximumScreenSpaceError = 0 otherwise all the tiles load which defeats the purpose of having LODs . I can manually edit the tileset.json but is there a way in which I could convert a .las file and produce a specific geometric error on the root?

message: #warning "localeconv not available"

I have tried to implement numerous times but the message is always the same. How can I solve this problem? Apparently it has to do with the proj4 library

root@MSI:/home/rvp/gocesiumtiler# export CGO_LDFLAGS="-g -O2 -lm"
root@MSI:/home/rvp/gocesiumtiler# go build
go: downloading github.com/xeonx/proj4 v0.0.0-20151223112312-c52078bad901
go: extracting github.com/xeonx/proj4 v0.0.0-20151223112312-c52078bad901
go: downloading github.com/xeonx/geom v0.0.0-20151223130215-76a21efc1ce4
go: extracting github.com/xeonx/geom v0.0.0-20151223130215-76a21efc1ce4
go: finding github.com/xeonx/proj4 v0.0.0-20151223112312-c52078bad901
go: finding github.com/xeonx/geom v0.0.0-20151223130215-76a21efc1ce4
github.com/xeonx/proj4
pj_strtod.c: In function ‘pj_replace_point_by_locale_point’:
pj_strtod.c:79:2: warning: #warning "localeconv not available" [-Wcpp]
79 | #warning "localeconv not available"
| ^~~~~~~

The projection caused the height offset ?(My input is EPSG:2326)

image
According to the above image:

The point cloud at the bottom was transformed using gocesiumtiler

The mesh at the top is a gltf file which was generated from the same point cloud file
I use pyproj(proj==9.0.0) to transform the coordinates from EPSG:2326 to EPSG:4978

The final display on Cesium shows that the gltf is correct in position and height, while the point cloud is correct in position but incorrect in height. What causes it?

My conversion command is as follows:

gocesiumtiler -i ./ hk.las -o ./ cesium -e 2326 -n 1.5

What can I do on "epsg code not found" error?

Hi
I ran geocesiumtiler on Windows, like this:

F:\challenge>F:\challenge\gocesiumtiler.exe -i F:\challenge -o F:\challenge\3dtiles -e 7415 -g -f -r

                           _                 _   _ _
  __ _  ___   ___ ___  ___(_)_   _ _ __ ___ | |_(_) | ___ _ __
 / _  |/ _ \ / __/ _ \/ __| | | | | '_   _ \| __| | |/ _ \ '__|
| (_| | (_) | (_|  __/\__ \ | |_| | | | | | | |_| | |  __/ |
 \__, |\___/ \___\___||___/_|\__,_|_| |_| |_|\__|_|_|\___|_|
  __| | A Cesium Point Cloud tile generator written in golang
 |___/  Copyright 2022 - Massimo Federico Bonfigli

Preparing list of files to process...
Processing file 1/2
> reading data from las file... C_37EZ1.LAS
2022/04/26 11:34:08 epsg code not found
2022/04/26 11:34:08 epsg code not found
2022/04/26 11:34:08 epsg code not found

It said "epsg code not found".
How can I define new CRS? Is it OK to write proj text just after -e switch?

Tilesets generate has too deep folder structure and unable to change the location of the point clouds

Hello,
Thanks for developing such an amazing tool for conversion las to 3d tiles conversion.

I am facing some trouble because of the depth of the folder structure, for example a 183 MB Tileset has 33,012 items with too many recursive folders, Is there any way where I can reduce the recursive folder count?

I am also not able to use transforms on the Tileset as the points itself is transformed based on the EPSG provided. Adding transforms to the tileset is resulting in taking the point clouds to unknown coordinates. Is there a way to not transorm the las coordinates with ESPG as some las file do not have their geo location information in their VLRS.

Sometims when the las file do not have EPSG information I tried to pass Default EPSG which throws an error "latitude or longitude exceeded limits".

"Octree Already Built" Error on Folder Mode

Hello, having an issue when running on MacOS Monterey (ARM).

Individual .LAS files are tiled perfectly, but getting a "octree already built" error on the second file, no matter the file, when run on a folder of .LAS files. I've tried changing the various algorithms and other flags and with different sets of files. It always crashes this same way on the second file. Is this a bug? or am I missing a flag or option?

example command gocesiumtiler -i ../smaller/ -o ../output/ -folder -r -b

example output:

image

out of memory

首先感谢你提供的程序。
由于我的点云数据太大,内存跑不下,能否提供一个基于硬盘内存的程序,再次感谢您!

las 1.4 compatibility

I'm running into errors while reading a las with version 1.2.0:

image

After some consideration, I'm attributing this to the input file being las 1.4 and not las 1.2. I'm curious if there is any compatibility with las 1.4? And if so, if you could help guide me in the right direction?

Thanks for all the help!

Where are the Windows binaries?

In the README it says - Along with the source code a prebuilt binary for Windows x64 is provided for each release of the tool in the github page.

What github page are you referring to here. Can you put a useful link to these Windows binaries?

Large PNTS files cause slow loading

First, thanks for providing such a powerful tool. It's great!

A few minor problems were found after the conversion, as follows:

  1. Many PNT files are over 20M in size,I found Google Draco compression in my search, but I don't know how to get started. I'm not familiar with Go.
  2. Path directory is too deep, can you use it like '01_01/02_02/1.pnts', so that I can understand the directory index faster?
  3. Or can you offer some ideas?

I'm sorry for my poor english, Looking forward to your reply!

window10 go build not success

  1. gcc-64: mingw64(64)、branch: decoupling_tree_data_structure
  2. go mod tidy
  3. go mod vendor
  4. go build, it will have some problems and not succeed. as follow:
PS D:\Work\GoWork\gocesiumtiler> go build                                                                               # runtime
textflag.h:1: '#' must be first item on line
# runtime/cgo
gcc_freebsd_sigaction.c:19:25: error: '_SIG_WORDS' undeclared here (not in a function); did you mean 'SIG_ERR'?
         uint32_t __bits[_SIG_WORDS];
                         ^~~~~~~~~~
                         SIG_ERR
gcc_freebsd_sigaction.c: In function 'x_cgo_sigaction':
gcc_freebsd_sigaction.c:30:19: error: storage size of 'act' isn't known
  struct sigaction act;
                   ^~~
gcc_freebsd_sigaction.c:31:19: error: storage size of 'oldact' isn't known
  struct sigaction oldact;
                   ^~~~~~
gcc_freebsd_sigaction.c:40:22: error: 'SA_SIGINFO' undeclared (first use in this function); did you mean 'SIGINT'?
   if (goact->flags & SA_SIGINFO) {
                      ^~~~~~~~~~
                      SIGINT
gcc_freebsd_sigaction.c:40:22: note: each undeclared identifier is reported only once for each function it appears in
gcc_freebsd_sigaction.c:41:37: error: unknown type name 'siginfo_t'
    act.sa_sigaction = (void(*)(int, siginfo_t*, void*))(goact->handler);
                                     ^~~~~~~~~
gcc_freebsd_sigaction.c:41:56: error: expected ';' before '(' token
    act.sa_sigaction = (void(*)(int, siginfo_t*, void*))(goact->handler);
                                                        ^
                                                        ;
gcc_freebsd_sigaction.c:45:3: error: implicit declaration of function 'sigemptyset' [-Werror=implicit-function-declaration]
   sigemptyset(&act.sa_mask);
   ^~~~~~~~~~~
gcc_freebsd_sigaction.c:48:5: error: implicit declaration of function 'sigaddset' [-Werror=implicit-function-declaration]
     sigaddset(&act.sa_mask, i+1);
     ^~~~~~~~~
gcc_freebsd_sigaction.c:54:8: error: implicit declaration of function 'sigaction'; did you mean 'x_cgo_sigaction'? [-Werror=implicit-function-declaration]
  ret = sigaction(signum, goact ? &act : NULL, oldgoact ? &oldact : NULL);
        ^~~~~~~~~
        x_cgo_sigaction
gcc_freebsd_sigaction.c:71:8: error: implicit declaration of function 'sigismember' [-Werror=implicit-function-declaration]
    if (sigismember(&oldact.sa_mask, i+1) == 1) {
        ^~~~~~~~~~~
gcc_freebsd_sigaction.c:31:19: error: unused variable 'oldact' [-Werror=unused-variable]
  struct sigaction oldact;
                   ^~~~~~
gcc_freebsd_sigaction.c:30:19: error: unused variable 'act' [-Werror=unused-variable]
  struct sigaction act;
                   ^~~
cc1.exe: all warnings being treated as errors

Looking forward to your reply!

tileset.json not created if only a single .pnts file is created

If we are processing a las file that contains a number of points less than the value of maxpts setting, then no las file is generated.

This can be reproduced using the las file from this comment:
#1 (comment)
and launching the executable as:
gocesiumtiler -input=D:\ripple.las -output=D:\out

We need to handle this special case properly.

v1.1.0 path problem?

@mfbonfigli
image

I found this error when I try it, as shown in the picture above.It looks like the path is fixed by error.

Please check it. thanks.

And i change the path like the picture, it run ok (a great feeling), I'm still try it.
image


I'll just rebuild it. the '.exe' file runs ok!Please provide a new '.exe' file!

Originally posted by @taozywu in #10 (comment)

Merging multiple

Hello,
I have several .LAS files that I want to merged in a single 3d tiles. I was wondering if it was possible in gocesiumtiler with some special flag in order to reduce the streaming in Cesium environment.

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.