#87525R: refactoring and minor changes
#8725R: fix collapsed polygons by ST_simplify in postgis
#8725R: fix invalid LineStrings
Merge pull request #1099 from ahuarte47/Issue_8725R-ST_simplify

Fix bug #8725R: fix collapsed geometries by ST_simplify function of postgis