1
我使用JTS拓撲套件從大量點(座標)生成voronoi多邊形。使用VoronoiDiagramBuilder.setClipEnvelope代替矩形的多邊形
VoronoiDiagramBuilder voronoi=new VoronoiDiagramBuilder();
voronoi.setTolerance(0.001);
voronoi.setSites(coordinates);
voronoi.setClipEnvelope(...);
Geometry geo =voronoi.getDiagram(new GeometryFactory());
方法voronoi.setClipEnvelope只接受矩形(boundingBox的),然而我想所以沒有Voronoi圖生成自定義的多邊形,而不是一個邊界框是比自定義多邊形大。
這可能嗎?使用這個API或者其他組件。
的「多邊形」 ...是我的'自定義'多邊形? –
是的,它是裁剪多邊形 –