and after using this ogr2ogr call:
ogr2ogr -dialect sqlite -sql "select st_union(geometry) from tmpem122" -explodecollections dissolved.shp tmpem122.shp
The problem is to remove those small/thin lines that remain in the new polygon.
Is there a way to include/expand the above ogr2ogr call to do this or what other OGR add-on can I use to remove those?
Instead, to try to solve this, I tested this call without sucess (this would solve this issue, if it works):
ogr2ogr -dialect sqlite -sql "select st_makepolygon(st_exteriorring(st_union(geometry))) from tmpem122" -explodecollections OnlyExteriorRing.shp tmpem122.shp