Use this function to optimize a vector layer.
PhotoLine tries to make some long lines and curves of many small line pieces.
You can setup the precision of the optimization.