<div dir="ltr">Hi,<div><div>I have gridded data for ocean/lake(that gives depth of water at equidistant intervals) and I am trying to extract polygon and multipolygons that represent different water depth range.</div><div>example of gridded data set is  <a href="http://www.gebco.net/data_and_products/gridded_bathymetry_data/">here</a> , and the polygons  I am trying to create are ST_Multipolygon approximation of different color areas in this <a href="https://www.soest.hawaii.edu/gmt/gmt/html/images/example_02.png">image</a>. </div><div><br></div><div>I tried the simple approach of st_union grid rectangles with st_snap_to_grid as mentioned <a href="http://gis.stackexchange.com/questions/31895/what-is-the-best-way-to-join-lots-of-small-polygons-to-form-a-larger-polygon">here</a>.</div><div>The problem is that the resulting polygons have zig-zag edges. If I do st_simplify or smoothening (grass v.generalize) I am left with polygons that are not touching anymore (there is a gap between polygons that were touching earlier).</div><div><br></div><div>Is there something in Postgis/Some other open source tool that I can use to avoid this problem: get smooth polygons that touch each other. I will appreciate any pointers.</div><div>There was some reference that "topology" may be able to help, but I am unable to find a tutorial/example that would load the data in postgis and extract smooth polygons.</div><div><br></div><div>Best,</div><div>HB</div></div></div>