https://redmine.auroville.org.in/https://redmine.auroville.org.in/favicon.ico2019-06-28T11:08:04ZRedmineGIS - Task #8567: Delaunay 2D and 3D triangulation using catchment points and their elevationshttps://redmine.auroville.org.in/issues/8567?journal_id=520352019-06-28T11:08:04ZDebojyoti Mallickdebojyoti.mallick@outlook.com
<ul><li><strong>File</strong> <a href="/attachments/download/5630/Delaunay_QbBQt.png">Delaunay_QbBQt.png</a> <a class="icon-only icon-magnifier" title="View" href="/attachments/5630/Delaunay_QbBQt.png">View</a> added</li></ul> GIS - Task #8567: Delaunay 2D and 3D triangulation using catchment points and their elevationshttps://redmine.auroville.org.in/issues/8567?journal_id=521022019-07-01T06:08:16ZDebojyoti Mallickdebojyoti.mallick@outlook.com
<ul></ul><p>Debojyoti Mallick wrote:</p>
<blockquote>
<p>The purpose of this task is to understand the possibilities of Delaunay triangulation for vector outputs and to choose which method produces the least number of anomalies.</p>
</blockquote>
<p>Found a matching QHull method for Delaunay Triangulation:</p>
<p>Matches Delaunay Methods in GRASS 7.* GIS , scipy.spatial and Cloud Compare.</p>
<p>Script reference of tests done using Jupyter labs.</p>
<p>%matplotlib widget</p>
<p>import matplotlib as mpl<br />import matplotlib.pyplot as plt<br />import mpl_toolkits.mplot3d as a3<br />import numpy as np<br />import scipy as sp<br />from scipy import spatial as sp_spatial<br />from shapely.geometry import mapping</p>
<p>from scipy.spatial import Delaunay</p>
<p>import geopandas<br />gdf = geopandas.read_file('data/Catchment_points.gpkg').to_crs(epsg=3857)</p>
<p>gdf.head()</p>
<p>gdf.plot(figsize=(10, 5), alpha=0.3)</p>
<p>points = list(gdf.xy)</p>
<p>tri = Delaunay(points, qhull_options="QbB Qt")</p>
<p>plt.triplot(gdf.x, gdf.y, tri.simplices.copy())<br />plt.plot(gdf.x, gdf.y, 'o' )<br />plt.show()</p>
<p>Results using the script above :</p>
<p><img src="https://redmine.auroville.org.in/attachments/download/5630/Delaunay_QbBQt.png" title="Delaunay using Scipy with Qhull method QbB Qt" alt="Delaunay using Scipy with Qhull method QbB Qt" /></p>
<p>QHull method used:</p>
<p>QbB - scale the input to fit the unit cube<br />After scaling with option 'QbB', the lower bound will be -0.5 and the upper bound +0.5 in all dimensions. For different bounds change qh_DEFAULTbox in user.h (0.5 is best for Geomview).</p>
<p>For Delaunay and Voronoi diagrams, scaling happens after projection to the paraboloid. Under precise arithmetic, scaling does not change the topology of the convex hull. Scaling may reduce precision errors if coordinate values vary widely.</p>
<p>Qt - triangulated output<br />By default, qhull merges facets to handle precision errors. This produces non-simplicial facets (e.g., the convex hull of a cube has 6 square facets). Each facet is non-simplicial because it has four vertices.</p>
<p>Use option 'Qt' to triangulate all non-simplicial facets before generating results. Alternatively, use joggled input ('QJ') to prevent non-simplical facets. Unless 'Pp' is set, qhull produces a warning if 'QJ' and 'Qt' are used together.</p>
<p>For Delaunay triangulations (qdelaunay), triangulation occurs after lifting the input sites to a paraboloid and computing the convex hull.</p>
<p>Option 'Qt' is deprecated for Voronoi diagrams (qvoronoi). It triangulates cospherical points, leading to duplicated Voronoi vertices.</p>
<p>Option 'Qt' may produce degenerate facets with zero area.</p>
<p>Facet area and hull volumes may differ with and without 'Qt'. The triangulations are different and different triangles may be ignored due to precision errors.</p>
<p>With sufficient merging, the ridges of a non-simplicial facet may share more than two neighboring facets. If so, their triangulation ('Qt') will fail since two facets have the same vertex set.</p>
<p>You can refer to the following image for triangulation results using GRASS:</p>
<p><img src="https://redmine.auroville.org.in/attachments/download/5627/Delaunay_GRASS.png" title="Delaunay using GRASS" alt="Delaunay using GRASS" /></p> GIS - Task #8567: Delaunay 2D and 3D triangulation using catchment points and their elevationshttps://redmine.auroville.org.in/issues/8567?journal_id=521032019-07-01T06:08:51ZDebojyoti Mallickdebojyoti.mallick@outlook.com
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>30</i></li></ul> GIS - Task #8567: Delaunay 2D and 3D triangulation using catchment points and their elevationshttps://redmine.auroville.org.in/issues/8567?journal_id=522432019-07-03T06:14:55ZDebojyoti Mallickdebojyoti.mallick@outlook.com
<ul><li><strong>Assignee</strong> set to <i>Debojyoti Mallick</i></li></ul>