make_solid() PostGIS를 사용하여 꼭짓점 테이블에서 polyhedralsurfaceZ 생성 (Create polyhedralsurfaceZ from vertex table with make_solid() PostGIS)


문제 설명

make_solid() PostGIS를 사용하여 꼭짓점 테이블에서 polyhedralsurfaceZ 생성 (Create polyhedralsurfaceZ from vertex table with make_solid() PostGIS)

ST_MakeSolid() PostGIS의 sfcgal 함수.

내 테이블은 다음과 같습니다.

 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() 닫힌 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 등.

이 작업을 수행하려면 어떻게 해야 하나요?


참조 솔루션

방법 1:

Thanks to Jim Jones i solved the issue:

SELECT
ST_MakeSolid('POLYHEDRALSURFACE Z ('
'('||'('||xmin_ ||' '|| ymin_ ||' '||zmin_ ||','|| xmin_ ||' '|| ymax_ ||' '||zmin_ ||','|| xmax_ ||' '|| ymax_ ||' '||zmin_ ||','|| xmax_ ||' '|| ymin_ ||' '||zmin_ ||','|| xmin_ ||' '|| ymin_ ||' '||zmin_||')'||')'||','||
'('||'('||xmin_ ||' '|| ymin_ ||' '||zmax_ ||','|| xmax_ ||' '|| ymin_ ||' '||zmax_ ||','|| xmax_ ||' '|| ymax_ ||' '||zmax_ ||','|| xmin_ ||' '|| ymax_ ||' '||zmax_ ||','|| xmin_ ||' '|| ymin_ ||' '||zmax_||')'||')'||','||
'('||'('||xmin_ ||' '|| ymin_ ||' '||zmin_ ||','|| xmin_ ||' '|| ymin_ ||' '||zmax_ ||','|| xmin_ ||' '|| ymax_ ||' '||zmax_ ||','|| xmin_ ||' '|| ymax_ ||' '||zmin_ ||','|| xmin_ ||' '|| ymin_ ||' '||zmin_||')'||')'||','||    
'('||'('||xmin_ ||' '|| ymax_ ||' '||zmin_ ||','|| xmin_ ||' '|| ymax_ ||' '||zmax_ ||','|| xmax_ ||' '|| ymax_ ||' '||zmax_ ||','|| xmax_ ||' '|| ymax_ ||' '||zmin_ ||','|| xmin_ ||' '|| ymax_ ||' '||zmin_||')'||')'||','||        
'('||'('||xmax_ ||' '|| ymax_ ||' '||zmin_ ||','|| xmax_ ||' '|| ymax_ ||' '||zmax_ ||','|| xmax_ ||' '|| ymin_ ||' '||zmax_ ||','|| xmax_ ||' '|| ymin_ ||' '||zmin_ ||','|| xmax_ ||' '|| ymax_ ||' '||zmin_||')'||')'||','|| 
'('||'('||xmax_ ||' '|| ymin_ ||' '||zmin_ ||','|| xmax_ ||' '|| ymin_ ||' '||zmax_ ||','|| xmin_ ||' '|| ymin_ ||' '||zmax_ ||','|| xmin_ ||' '|| ymin_ ||' '||zmin_ ||','|| xmax_ ||' '|| ymin_ ||' '||zmin_||')'||')'||')'                        
)
FROM mytable

(by user2295796user2295796)

참조 문서

  1. Create polyhedralsurfaceZ from vertex table with make_solid() PostGIS (CC BY‑SA 2.5/3.0/4.0)

#geometry #postgresql #3d #qgis #postgis






관련 질문

이미지를 사용하지 않고 Nx2 행렬에서 원의 반지름을 어떻게 찾을 수 있습니까? (How could I find the radius of a circle in a Nx2 matrix, not using images)

d3.js의 궤도 유형 차트 (Orbit type chart in d3.js)

원의 둘레에 스프라이트 추가 (Add a sprite on circumference of a circle)

Java: 질량 중심을 중심으로 삼각형 회전 (Java: Rotate triangle around mass center)

값이 없는 경우 HTML5 로컬 저장소 개체는 무엇을 반환합니까? (What does the HTML5 Local Storage object return if there is no value?)

WordPress에서 Simple Jquery Click이 작동하지 않음 (Simple Jquery Click not working in WordPress)

직사각형 필드 내에서 다양한 크기의 직사각형을 효율적으로 배치 (Efficient placement of variable size rectangles within a rectangular field)

{'northeast': {'lat':}, 'southwest': {'lat': }}(Google 지도) Python에서 다각형을 만드는 방법 (How to create Polygon out of {'northeast': {'lat':}, 'southwest': {'lat': }} (google maps) Python)

실린더 슬라이스를 따라 두 점 사이의 SVG 경로 호를 계산하는 방법 (How to calculate SVG path arc between two points along the slice of a cylinder)

make_solid() PostGIS를 사용하여 꼭짓점 테이블에서 polyhedralsurfaceZ 생성 (Create polyhedralsurfaceZ from vertex table with make_solid() PostGIS)

시작/끝 각도 문제가 있는 OpenGL 타원 (OpenGL Ellipse with start/end angle issues)

2D 그리드의 두 선분이 인접하는지 테스트하는 알고리즘 (Algorithm to test if two line segments on a 2d grid are adjacent)







코멘트