Closed GeeFernando closed 1 year ago
Hello we will take a look at this
Hello we will take a look at this
Thanks so much 🙏
@GeeFernando We have been looking at this and it seems to be an issue with Shapely itself. I don't think it is adept to handling self-intersecting polygons. When done through arcpy there is no issue since that package handles this case.
We will look at what can be done on our end and post any updates here.
@GeeFernando We have been looking at this and it seems to be an issue with Shapely itself. I don't think it is adept to handling self-intersecting polygons. When done through arcpy there is no issue since that package handles this case.
We will look at what can be done on our end and post any updates here.
@nanaeaubry Thanks so much for looking into this 🙏
Also - is there a way to identify which features are self intersecting? If I'm able to do that, I could potentially fix those features (if I have edit access to them). I already tried https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html#arcgis.features.GeoSeriesAccessor.is_valid and https://developers.arcgis.com/python/api-reference/arcgis.features.html#arcgis.features.GeoAccessor.validate - but self-intersecting are determined to be valid when using these functions.
Thanks again for the help 🙏
You can pass a geometry filter to a feature layer query to find where the intersections occur.
Take a look at this, there is some example code below the table: https://developers.arcgis.com/python/api-reference/arcgis.geometry.filters.html#intersects
Otherwise you can try within
: https://developers.arcgis.com/python/api-reference/arcgis.features.html#arcgis.features.GeoSeriesAccessor.within
Hope this can help 👍🏻 I am going to close the issue since we cannot fix but if you have more feel free to post.
Describe the bug Not all layers are perfect 😅 Especially, those layers that are drawn quickly due to time pressures (e.g. US wild-fire polygons). I've found it impossible to spatially join these layers to State boundaries or Census tracts using the ArcGIS Online Notebook's Standard runtime (and Spatially Enabled Data-frames). But the same code works fine in the Advanced runtime or on a machine that has ArcPy installed.
For this example I created a self-intersecting polygon layer (to mimic a typical wild-fire layer) - https://arcgis.com/home/item.html?id=ddf439207b444843aeb29969276f2728
To Reproduce Steps to reproduce the behavior:
error:
The error states it is due to Multipolygons. But, I can confirm it's actually due to self intersecting features (and not multipolygns). For example - the following script works in the Standard runtime - despite states such as California being mulipolygons.
My assumption is it is something to do with whether arcpy or shapely is being used for Spatially Joining. It'll be great to get a fix for Mac users and AGOL Standard Runtime users.
Thanks so much, Gee
Expected behavior Same output as the Advanced runtime (ArcPy).
Platform (please complete the following information):
2.1.0
and Fiona1.8.20
on MacOSAdditional context This bug occurs in AGOL Standard runtime and MacOS with the above package versions.