|
BLOG
|
Triangulating geometry was a "thing" at one time. It can be done if you have the 3D Analyst extension, but if you don't and you need to know the principles and can work NumPy and python... here goes. 1 make an array out of the geometry (FeatureClassToNumPyArray is a starter. I have posted code before on how to do this 2 triangulate it (I use scipy) 3 get the centroid of each triangle. (again, I have posted code for this.) 4 check if the centroids are within the original shape. Now to complicate this, polygons are either convex or concave, with or without holes and they can consist of more than one part. So sometimes, you need to devolve your geometry to its simplest form and cycle through. Convex shapes are boring, so I will ignore them. Here are 3 shapes, C, D, A. C is a concave shape with no holes. D is convex but it has a hole. A is concave and has a hole. C.png D0.png A0.png Their triangulated versions. 5f2d4ccd-904f-4aa5-aaf1-4334ecbfeeb4.png D0_triangulation.png A0_triangulation.png And the constrained triangulation. That is, the triangulation with the triangles not in the original outer hull or in a hole. C_constrained_triangulation.png D0_constrained_triangulation.png A0_constrained_triangulation.png Looks like all is good. To perform the triangulation, you can use from scipy.spatial import Delaunay
def triangulate_pnts(pnts):
"""Triangulate the points and return the triangles.
Parameters
----------
pnts : array
Points for a shape or a group of points in array format.
Either geo.shapes or np.ndarray.
out : array
An array of triangle points.
.. note::
The simplices are ordered counterclockwise, this is reversed in this
implementation.
"""
pnts = np.unique(pnts, axis=0) # get the unique points only
avg = np.mean(pnts, axis=0)
p = pnts - avg
tri = Delaunay(p)
simps = tri.simplices
# -- indices holder, fill with indices, repeat first and roll CL
# translate the points back
z = np.zeros((len(simps), 4), dtype='int32')
z[:, :3] = simps
z[:, 3] = simps[:, 0]
tmp_ = p[z] + avg
new_pnts= []
for i in tmp_: # reorder clockwise
if _bit_area_(i) < 0.0: # -- 2025_10_27
i = i[::-1]
new_pnts.append(i)
return new_pnts
def _bit_area_(a):
"""Mini e_area, used by `areas` and `centroids`.
Negative areas are holes. This is intentionally reversed from
the `shoelace` formula.
"""
a = _base_(a)
x0, y1 = (a.T)[:, 1:] # cross set up as follows
x1, y0 = (a.T)[:, :-1]
e0 = np.einsum('...i,...i->...i', x0, y0) # 2024-03-28 modified
e1 = np.einsum('...i,...i->...i', x1, y1)
return np.sum((e0 - e1) * 0.5)
def _area_centroid_(a):
r"""Calculate area and centroid for a singlepart polygon, `a`.
This is also used to calculate area and centroid for a Geo array's parts.
Notes
-----
For multipart shapes, just use this syntax:
>>> # rectangle with hole
>>> a0 = np.array([[[0., 0.], [0., 10.], [10., 10.], [10., 0.], [0., 0.]],
[[2., 2.], [8., 2.], [8., 8.], [2., 8.], [2., 2.]]])
>>> [_area_centroid_(i) for i in a0]
>>> [(100.0, array([ 5.00, 5.00])), (-36.0, array([ 5.00, 5.00]))]
"""
a = _base_(a)
x0, y1 = (a.T)[:, 1:]
x1, y0 = (a.T)[:, :-1]
e0 = np.einsum('...i,...i->...i', x0, y0)
e1 = np.einsum('...i,...i->...i', x1, y1)
t = e1 - e0
area = np.sum((e0 - e1) * 0.5)
x_c = np.sum((x1 + x0) * t, axis=0) / (area * 6.0)
y_c = np.sum((y1 + y0) * t, axis=0) / (area * 6.0)
return area, np.asarray([-x_c, -y_c]) Here is C C
array([[ 0.00, 0.00],
[ 0.00, 10.00],
[ 10.00, 10.00],
[ 10.00, 8.00],
[ 2.00, 8.00],
[ 2.00, 2.00],
[ 10.00, 2.00],
[ 10.00, 0.00],
[ 0.00, 0.00]]) The centroids and areas and triangulations can be determined using the above. Testing which triangles are part of the original geometry entails using a points-in-polygon search. I did this way back in my previous incarnation. Point in Polygon ... Geometry Mysteries - Esri Community It uses the winding number approach. So if you have a need for a constrained Delaunay triangulation of your geometry objects... give it a try. Note: If you want to see more python, NumPy and ArcPy stuff see my github site. Dan Patterson on github
... View more
11-09-2025
03:28 PM
|
2
|
0
|
1828
|
|
POST
|
There is all kinds of stuff online regarding webgl2 not being supported Scene Viewer requirements—ArcGIS Online Help | Documentation the above link isn't specific to your case, but the root cause seems to point to settings or the actual graphics card itself, have a look at it, then google specifics to your browser settings and installation
... View more
11-09-2025
02:37 AM
|
0
|
0
|
2951
|
|
POST
|
Did you get any feedback on the link on this page ArcGIS Pro 3.5 system requirements—ArcGIS Pro | Documentation Verify your computer's ability to run ArcGIS Pro. Then there is the list of software requirements and hardware requirements. Anything out of the ordinary in those links?
... View more
11-08-2025
05:47 PM
|
0
|
0
|
2981
|
|
POST
|
If it isn't the data (source and location), the location of Pro (local install vs other options), then Tech Support is your remaining option. Good luck
... View more
11-06-2025
05:12 PM
|
0
|
0
|
1062
|
|
POST
|
If it happens in a new project with a different dataset and you are working with locally stored data then you can try one of two things before contacting tech support How To: Perform an ArcGIS pro Soft Reset How To: Perform a Clean Uninstall and Reinstall of ArcGIS Pro
... View more
11-06-2025
11:28 AM
|
0
|
2
|
1086
|
|
POST
|
If you have the spatial analyst extension, why not look at the Neighborhood Statistics toolset An overview of the Neighborhood toolset—ArcGIS Pro | Documentation Maybe one of the various options will mitigate the need to get the absolute values of the 9 core cells
... View more
11-06-2025
09:07 AM
|
0
|
0
|
574
|
|
POST
|
Polygons in esri geometry will have an equal first and last point, hence a triangle requires 4 points to define its border with the first and last point being equal, and you can't omit either
... View more
11-03-2025
06:24 PM
|
0
|
3
|
2668
|
|
POST
|
related? Solved: ArcGIS Pro 3.3.5 Edits not saved with Calculate Ge... - Esri Community
... View more
11-03-2025
11:20 AM
|
0
|
1
|
3537
|
|
POST
|
from What’s New in AI Assistants (October 2025) see the section Get started with AI assistants!
... View more
11-03-2025
11:14 AM
|
0
|
1
|
1103
|
|
POST
|
are you trying to export vector data? raster data can't be exported to shapefile
... View more
11-03-2025
07:10 AM
|
0
|
0
|
740
|
|
POST
|
They would need the Data Interoperability extension then if they want to keep within the ArcGIS Pro environment. All other suggestions involve working outside it. Conversion of existing e00 files to a geodatabase would be necessary if they want to continue to use that data
... View more
11-03-2025
02:35 AM
|
0
|
0
|
990
|
|
POST
|
untested An overview of the Text Analysis toolset—ArcGIS Pro | Documentation perhaps Extract Entities Using Deep Learning (GeoAI)—ArcGIS Pro | Documentation and the arcgis website has a load of deep learning examples which may be of interest arcgis-python-api/guide/14-deep-learning at master · Esri/arcgis-python-api
... View more
10-31-2025
03:08 AM
|
1
|
0
|
637
|
|
POST
|
I see no explanation as to the differences in the documentation or on the public facing support site Esri Support Search Results It could be raised in the Beta site if it isn't closed yet, or put in a request to Tech Support would be your best option.
... View more
10-31-2025
02:39 AM
|
0
|
0
|
1144
|
|
POST
|
Supported formats with the Data Interoperability extension—ArcGIS Pro | Documentation is recommended unless you have access to ArcMap or the often recommended conversion utility or other GIS software
... View more
10-31-2025
02:35 AM
|
0
|
0
|
1041
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a week ago | |
| 1 | 4 weeks ago | |
| 1 | 2 weeks ago | |
| 1 | 2 weeks ago | |
| 1 | 2 weeks ago |