AnsweredAssumed Answered

ArcGIS API for Python >= 1.5.1: arcgis.geometry.Polygon.is_valid() method for polygons does not work

Question asked by buglukas on Dec 14, 2018
Latest reply on Jan 18, 2019 by bixb0012

Hello,
we use ArcGIS API for Python in a project and encountered the following problem:

In ArcGIS API for Python 1.5.1 the boolean type property "is_valid" of geometries of type Polygon was removed and replaced by a method. This method is_valid() does not work like the boolean property in the previous versions. It throws an error for valid Polygon geometries as shown below:
image

In ArcGIS API for Python 1.5.0 the boolean type attribute worked well:
image

Do you have an idea how to work around this problem ?

Link to the github issue: API for Python 1.5.1 & 1.5.2: arcgis.geometry.Polygon.is_valid() method for polygons does not work · Issue #335 · Esri/a… 

Best regards,
Lukas Bug
Student assistant at Esri Deutschland

 

P.S.

I prepared two Jupyter Notebooks to be able to reproduce this issue. You will find them in the attached zip file.

 

Documentation mentions it in the GeoSeriesAccessor section and return type should be the boolean types True or False:

arcgis.features module — arcgis 1.5.2 documentation 

 

Rohit Singh

Attachments

Outcomes