"I have polygons with holes of many diferent shapes, like buildings, esplanades, rivers, etc. And I need to split them in a coherent way (if the polygon is a river it should be splitted perpendiculary to his axis) and with less splits as possible."
You don't give anywhere near enough information as to your requirements for all cases; The desired result is non-obvious. I suggest making a question for each category of thing you'd like to do. Include a picture in each case.
For simple rivers that don't begin or end in the frame, at least, here is an algorithm for finding the center-line... is that what you're asking for?
- Draw end lines where you'd like to slice the river
- Where those ends intersect the river polygons, identify intersecting vertices.
- Split the river by end lines
- Eliminate topological holes in the river polygon
- Convert river polygon to polylines
- Split lines by intersecting vertices
- Select lines which touch each pair of intersecting vertices (your riverbanks)
- Depending on what you're able to do in your environment, either:
- Create thiessen polygons from those lines
or
- Mark each line with a different attribute (bankid=1,2)
- Feature vertices to point (all)
- Create thiessen polygons from points
- Dissolve thiessen polygons by attribute