Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API for Python 1.5.1 & 1.5.2: arcgis.geometry.Polygon.is_valid() method for polygons does not work #335

Closed
lukasbug opened this issue Dec 14, 2018 · 6 comments

Comments

@lukasbug
Copy link

@lukasbug lukasbug commented Dec 14, 2018

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 ?

Best regards,
Lukas Bug
Student assistant at Esri Deutschland

@lukasbug
Copy link
Author

@lukasbug lukasbug commented Dec 14, 2018

I prepared two jupyter notebooks to be able to reproduce this issue. You will find them in the following zip file (Unfortunately Jupyter Notebooks are not supported as a file type on Git):

is_valid_issue.zip

@lukasbug
Copy link
Author

@lukasbug lukasbug commented Dec 14, 2018

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

https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.toc.html?highlight=is_valid#arcgis.features.GeoSeriesAccessor.is_valid

@achapkowski
Copy link
Contributor

@achapkowski achapkowski commented Dec 17, 2018

@lukasbug I'll take a look today.

@lukasbug
Copy link
Author

@lukasbug lukasbug commented Jan 17, 2019

@achapkowski Have you any news on this issue ?

@bixb0012
Copy link

@bixb0012 bixb0012 commented Jan 18, 2019

@achapkowski , look at lines 22, 64, 79, and 80 in geometry/_types.py. Someone wrote bad type checks involving variables that are never defined in the module: list_types, number_type .

@achapkowski
Copy link
Contributor

@achapkowski achapkowski commented May 31, 2019

It will be fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.