-
Notifications
You must be signed in to change notification settings - Fork 72
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
Issue with 3D Transformation of Pipeline Data #162
Comments
Hi, I can reproduce this when all the z values are the same. Is that the case? Workaround for now is to use some different z values. |
I've created a PR to fix this, it will be in next release #164 |
Hi bert,
For now it is ST_lineString that shows up.
Also i have the same z value on all the vertices.
I will correct these two issues and let you know
Thanks a lot for your time
Le mer. 15 mai 2024 à 23:49, Bert Temme ***@***.***> a écrit :
… Hi, I expect it's something with the input geometries.
What does 'select distinct (st_geometrytype(geom)) from pipeline_3d' give?
In my case it's ST_MultiLineString for line data.
The program does 'select st_AsText(st_3dextent(geom)) from pipeline_3d' it
should give a Polyhedralsurface not a Polygon.
—
Reply to this email directly, view it on GitHub
<#162 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXRM4FFW7T5XWG5DBQE2LGLZCPKAHAVCNFSM6AAAAABHLDUKGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJTGUYTCMRVGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
it works perfectly. thanks a lot |
nice, closing this issue |
no I'll create a new release 2.8.2 |
2.8.2 is released |
That's great, thanks. 🙏 Meanwhile, I've added random small values to z, to make it work. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem Description
I am currently experiencing an issue when transforming pipeline data into 3D using the pg2b3dm tool. Initially, my data is stored in a 2D format in a GeoPackage (gpkg) file. I import this data into a PostgreSQL database following your tutorial, then transform it into 3D using the ST_Force3D function of PostGIS. However, when I try to convert these 3D data into 3D tiles with pg2b3dm, I encounter an error that I cannot resolve.
Steps to Reproduce the Problem
Import pipeline data stored in a GeoPackage file into a PostgreSQL database.
Transform this data into 3D using the ST_Force3D function of PostGIS with the following query:
DROP TABLE IF EXISTS a_collec_line_3D;
CREATE TABLE pipeline_3D AS
SELECT id, codinsee, zaval, zamont, hauteur, ST_Force3D (geom, 2) as geom
FROM pipeline;
Add a radius field to the a_collec_line_3D table.
Use the pg2b3dm tool to convert the 3D data into 3D tiles with the following command:
docker run -ti geodan/pg2b3dm -U postgres -h 172.17.0.1 -d adl -c geom -t pipeline_3d -p 4555 -o /var/lib/postgresql/data --radiuscolumn radius
Expected Behavior
I expect the 3D pipeline data to be successfully converted into 3D tiles, ready to be visualized in applications compatible with 3D tiles, such as CesiumJS.
Observed Behavior
When I try to convert the 3D data into 3D tiles with pg2b3dm, I encounter an "Unhandled exception" error with the following message:
Unhandled exception. System.InvalidCastException: Unable to cast object of type 'Wkx.Polygon' to type 'Wkx.PolyhedralSurface'.
at B3dm.Tileset.GeometryRepository.GetGeometriesBoundingBox(NpgsqlConnection conn, String geometry_table, String geometry_column, Int32 epsg, Tile t, String query) in /src/b3dm.tileset/GeometryRepository.cs:line 30
at pg2b3dm.QuadtreeTiler.GenerateTiles(BoundingBox bbox, Tile tile, List
1 tiles, Int32 lod, Boolean addOutlines, String defaultColor, String defaultMetallicRoughness, Boolean doubleSided, Boolean createGltf) in /src/b3dm.tileset/QuadtreeTiler.cs:line 132 at pg2b3dm.Program.<>c__DisplayClass2_0.<Main>b__0(Options o) in /src/pg2b3dm/Program.cs:line 187 at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult
1 result, Action`1 action)at pg2b3dm.Program.Main(String[] args) in /src/pg2b3dm/Program.cs:line 25
What i don't understand is that, i only have linestring Z geometries. So why the error concerne polygone???
I am aware that I am a novice in the field of 3D transformation and may be missing something trivial. Any help or suggestions to solve this problem would be greatly appreciated.
Is it possible to have an input example to compare with mine?
Thank you very much for your assistance!
The text was updated successfully, but these errors were encountered: