Consider the following script, the polygon is a simple one with a hole inside:
import arcpy
poly1 = arcpy.FromWKT("POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30))")
print(poly1.isMultipart)
print(poly1.partCount)
The result I get is
>>> True 1
So is a polygon "multipart" if it has holes? ArcGIS Data Reviewer does not agree.
Thanks
ArcGIS Desktop 10.5.1
Just wondering... how would you create a "PointGeometry with value of None"?
If I try:
pntg = arcpy.PointGeometry()
or
pntg = arcpy.PointGeometry(None)
it will throw:
RuntimeError: Object: CreateObject cannot create geometry from inputs
If I provide a "Nominal Point" it will be valid:
pntg = arcpy.PointGeometry(arcpy.Point())
print pntg.firstPoint
# 0 0 NaN NaN
buf = pntg.buffer(1)
print buf.area
# 3.14159265359
You wouldn't. But if you query a table with null geometries, a None would be returned for the row's array element where the PointGeometry would result.
- V
My preference would be for an empty point:
>>> import arcpy
>>>
>>> # if I could wave a wand
>>> pt = arcpy.Point()
>>> pt.WKT
'POINT EMPTY'
It is possible though
a = np.array([np.nan, np.nan, np.nan, np.nan])
p = arcpy.Point()
<Point (0.0, 0.0, #, #)>
p.X, p.Y, p.Z, p.M = a
p
<Point (nan, nan, nan, nan)>
I think you mean that is one of your ST point geometries
pt = arcpy.Point()
pg = arcpy.PointGeometry(pt)
pg.WKT'POINT (0 0)'
# because
pt.WKT()
Traceback (most recent call last):
File "<ipython-input-30-6f7eed26629f>", line 1, in <module>
pt.WKT()
AttributeError: 'Point' object has no attribute 'WKT'
You are right, I am interested in point geometry and not point. What most of the world calls "point", Esri calls "point geometry" because Esri calls vertices points.