Shapely #1 bounding box 쉽게 만들기
shapely에서 bouding box 쉽게 만들기 # shapely 설치후 box 클래스 import from shapely.geometry import box b = box(0.0, 0.0, 200, 100) print(b.wkt) # print 결과 : POLYGON ((200 0, 200 100, 0 100, 0 0, 200 0)) list(b.exterior.coords) # 결과 : [(200.0, 0.0), (200.0, 100.0), (0.0, 100.0), (0.0, 0.0), (200.0, 0.0)] # 기타 도형의 bounding box로 shapely.geometry.box 폴리곤 만들기 pbox = box(*myPolygon.bounds, ccw=True) ※ shapely 설치 ..
2022. 11. 14.