[使用make_solid()PostGIS从顶点表创建多面体Z]]

问题描述 投票:-2回答:1

我正在尝试使用PostGIS中的ST_MakeSolid()sfcgal函数获得3D多边形。

我的桌子看起来像这样:

 id_geom| xmin | xmax    |  ymin   |   ymax  | zmin  | zmax
--------+------+---------+---------+---------+-------+-------
   1 | 12.3235 | 12.3239 | 45.4339 | 45.4341 |    -7 |   -14
   2 | 12.3234 | 12.3238 | 45.4338 | 45.4339 |    -2 |    -7

我想要具有实体几何形状的另一列,但是我不知道如何使用存储在表中的顶点坐标而不是原始坐标。

我阅读了问题"ST_MakeSolid() creating an invalid solid from closed polyhedralsurfaceZ",并且工作:

SELECT ST_MakeSolid('POLYHEDRALSURFACE Z (
((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),
((0 0 1,1 0 1,1 1 1,0 1 1,0 0 1)),
((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)),
((0 1 0,0 1 1,1 1 1,1 1 0,0 1 0)),
((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)),
((1 0 0,1 0 1,0 0 1,0 0 0,1 0 0)))')

但是我想使用“ xmin”,“ xmax”等代替12.3235、12.3239等。

我该怎么做?

我正在尝试使用PostGIS中的ST_MakeSolid()sfcgal函数获得3D多边形。我的表如下所示:id_geom | xmin | xmax | ymin | ymax | zmin | zmax -------- + ------ + --------- + -------...

postgresql 3d geometry postgis qgis
1个回答
0
投票

感谢吉姆·琼斯,我解决了这个问题:

© www.soinside.com 2019 - 2024. All rights reserved.