5

When I do dissolve:

With this specific shapefile happens with other similar it is working fine. Also I checked for null values in the geometry and there weren't any.

data2 = pst[pst['PROP_TYPE'].str.startswith(('01'))]
dslvd=data2.dissolve(by='PROP_TYPE')



TopologyException: Input geom 1 is invalid: Ring Self-intersection at or near point 223630.72975008655 4405823.482638143 at 223630.72975008655 4405823.482638143
TopologyException: Input geom 1 is invalid: Ring Self-intersection at or near point 223630.72975008655 4405823.482638143 at 223630.72975008655 4405823.482638143
TopologyException: Input geom 1 is invalid: Ring Self-intersection at or near point 223630.72975008655 4405823.482638143 at 223630.72975008655 4405823.482638143


 No Shapely geometry can be created from null value

During handling of the above exception, another exception occurred:

What could be wrong?

4

the Error says that your polygons do have a self intersection at the given coordinates, to avoid it you will have to reconstruct your polygons with a buffer.

data2['geometry'] = data2.buffer(0.01) # a small value that could be neglected only to create a non self intersecting polygon

and then run your dissolve function

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.