Just like the title, I am extracting OSM riverbank and a lot of riverbanks in OSM is in 'unclosed' linestring.
In order to polygonize the linestring, I tried to use ST_MakePolygon (or Polygonize); yet, it says the linestrings are not closed and it cannot make polygons in some areas.
select st_makepolygon(st_makevalid(shape)) as shape from asia_waterway_line where waterway ='riverbank' and st_isclosed(shape)
However, I just ran with QGIS Polygonize tool in vector tool and it gives me a polygon that I want to make.
Because all my data are stored in postgresql, I really do want to make them working using PostGIS Spatial Query. I tried with someone's ST_ForceClosed function but it didn't work either. Is there any ways that I can solve this issue?
I extraxcted waterway using osmosis tag info and imported them using ogr2ogr.