Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 'Invalid PROJ string syntax' #61

Open
mghildiy opened this issue Dec 9, 2024 · 5 comments
Open

Error 'Invalid PROJ string syntax' #61

mghildiy opened this issue Dec 9, 2024 · 5 comments

Comments

@mghildiy
Copy link

mghildiy commented Dec 9, 2024

Hi,

When I try to run program for a las file on my windows system, I get error.

Command:

.\gocesiumtiler-win-x64.exe folder -out D:\cesiumoutput\gocesiumtiler\output -crs EPSG:32643 -resolution 10 -min-points-per-tile 1000 -depth 12 D:\cesiumoutput\gocesiumtiler\input

Output:

*** Mode: Folder, process all files in D:\cesiumoutput\gocesiumtiler\input
*** Execution settings:
- Source CRS: EPSG:32643,
- Max Depth: 12,
- Resolution: 10.000000 meters,
- Min Points per tile: 1000
- Z-Offset: 0.000000 meters,
- 8Bit Color: false
- Join Clouds: false
- Tileset Version: 1.0


[2024-12-09 03:19:26.040] [D:\cesiumoutput\gocesiumtiler\input\Pu000155.las] start reading las
[2024-12-09 03:19:26.040] [D:\cesiumoutput\gocesiumtiler\input\Pu000155.las] las header read completed: found 2313912 points
[2024-12-09 03:19:26.040] [D:\cesiumoutput\gocesiumtiler\input\Pu000155.las] crs: EPSG:32643
[2024-12-09 03:19:26.040] [D:\cesiumoutput\gocesiumtiler\input\Pu000155.las] point loading started
proj_create: C:\Program Files\PostgreSQL\16\share\contrib\postgis-3.4\proj\proj.db contains DATABASE.LAYOUT.VERSION.MINOR = 2 whereas a number >= 4 is expected. It comes from another PROJ installation.
[2024-12-09 03:19:26.068] [D:\cesiumoutput\gocesiumtiler\input\Pu000155.las] load error: Invalid PROJ string syntax
2024/12/09 08:49:26 Invalid PROJ string syntax

What mistake am I making here?

@mghildiy
Copy link
Author

mghildiy commented Dec 9, 2024

I tried command without input crs this time on another file(input las file is version 1.4, and has CRS information included). But I still get same error 'Invalid PROJ string syntax'.

@mfbonfigli
Copy link
Owner

I think the error message is misleading (taking a note to improve that in future releases), I'm suspecting this issue is caused by the tool using the postgresql proj files instead of its own ones.

In theory this should not happen, as long as the share folder is stored in the same parent folder of the gocesiumtiler executable.

Can you check if that's the case? The folderlayout should look something like:

[Parent folder]
|- gocesiumtiler-win-x64.exe
|- share

If this is the case can you try to see if the same happens following these steps:

  1. Open a new command prompt windows
  2. Run set PROJ_DATA=
  3. Run gocesiumtiler as usual

This will temporarily unset the PROJ_DATA variable in the command shell and prevent the code from reading from the Postgresql proj version.

@mghildiy
Copy link
Author

mghildiy commented Dec 9, 2024

So I see a difference here. In my case gocesiumtiler is inside share folder. Seems I misunderstood following line from README, and hence copied it in share folder.

Make sure the executable is in the same folder where the share folder is.

Woud put it back in parent folder and try again.

Thanks a lot.

@mghildiy
Copy link
Author

mghildiy commented Dec 10, 2024

Now it works. Moving exe to root folder did the trick.

I have a question though. Cesium viewer displays the point cloud for a while and then it disappears. Seems its related to CRS. In gocesiumtiler command, we can provide input CRS, but not output CRS. Is is possible to provide output CRS too? Cesium renderer uses EPSG:4978 as far as I know, so I guess projecting point cloud to it would solve the issue.

@mfbonfigli
Copy link
Owner

mfbonfigli commented Dec 13, 2024

All points written by gocesiumtiler are effectively in EPSG 4978. They are stored in a local CRS but then cesium is instructed in the root tileset.json file to apply a transformation matrix that converts them back to EPSG:4978

Did you try to play with the maximumScreenSpaceError setting?

Else if you can send me an example privately I can try to take a look as soon as I have some time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants