Good morning,
I'm fighting a problem with the shapely polygon function in a python script generating invalid geometry polygon objects from a list of coordinate points within Spotfire. The attached file has a sample data set of X,Y coordinates and a script that creates a Voronoi tesselation, sorts and QC's the results and then generates polygon objects. This same code works correctly in Jupyter Notebooks. I've gone as far as taking the Python packages from the directory where Jupyter calls them and moving them into the Spotfire location so I don't think it's package related. The issue with the polygons generated is that every other one seems to swap the x and y coordinates in the extents (XMin, XMax, YMin, YMax) while the XCenter and YCenter stay correct. So alternating polygons generated are valid or not valid. I'm at a loss for what to do except take this function outside of Spotfire but would appreciate any other suggestions.
Best regards,
Jon Orth.
SubseaVoronoiPortalOption.dxp