If I misunderstand your question please let me know.
It looks you want to remove the polygon 1 covered part in layer 1 from the polygon 2 in layer 2, and then split the rest parts in layer 2 by a line in layer 1, does that right?
If so you can use can operate that by the follow steps:
- Get the line shape 0, get the polygon 1, get the polygon 2
- Polygon 2 remove polygon 1
- Polygon 2_rest split by line shape 0
You can do that by our spatial query API, if you want to directly operate them, you can try our GisEditor.
Wish that's helpful.