<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1425637687387_678265">Hi,</div><div id="yui_3_16_0_1_1425637687387_678266" dir="ltr">I'm having a curious issue importing a polygon SHP file into PostGIS. I'll describe the procedure that I'm using and the problem that I'm having and hopefully somebody has had this issue in the past and fixed it.</div><div id="yui_3_16_0_1_1425637687387_678327" dir="ltr"><br></div><div id="yui_3_16_0_1_1425637687387_684120" dir="ltr">So the procedure is that I use GRASS to produce a vector from a raster output: (r.to.vect input=MASK output=vecMap feature=area)  and then export to SHP file (v.out.ogr -c -e input=vecMap dsn=fname format=ESRI_Shapefile type=area).</div><div id="yui_3_16_0_1_1425637687387_684158" dir="ltr"><br></div><div id="yui_3_16_0_1_1425637687387_684237" dir="ltr">Now when this SHP file is imported into PostGIS, the type is changed to multistring for some reason. Then when checking the topology, there is a 'ring self-intersection' error. This PostGIS db is then imported into GeoServer, where lines are connecting between different parts of the largest polygon (this should not be happening). If I fix this typology problem, then the largest polygon in the db disappears.</div><div id="yui_3_16_0_1_1425637687387_684251" dir="ltr"><br></div><div id="yui_3_16_0_1_1425637687387_684292" dir="ltr">The strange thing is the following:</div><div id="yui_3_16_0_1_1425637687387_684291" dir="ltr">1. Opening the SHP file in QGIS doesn't have this problem</div><div id="yui_3_16_0_1_1425637687387_684287" dir="ltr">2. Importing the SHP file directly into GeoServer, doesn't generate this problem either.</div><div id="yui_3_16_0_1_1425637687387_684288" dir="ltr"><br></div><div id="yui_3_16_0_1_1425637687387_684289" dir="ltr">Why is PostGIS having an issue importing this file?</div><div id="yui_3_16_0_1_1425637687387_684290" dir="ltr"><br></div><div id="yui_3_16_0_1_1425637687387_684298" dir="ltr">Any ideas how to fix this?</div><div id="yui_3_16_0_1_1425637687387_684299" dir="ltr"><br></div><div id="yui_3_16_0_1_1425637687387_684300" dir="ltr">Thanks in advance for your help,</div><div id="yui_3_16_0_1_1425637687387_684301" dir="ltr">Conrad<br></div><div id="yui_3_16_0_1_1425637687387_684136" dir="ltr"><br></div><div id="yui_3_16_0_1_1425637687387_678202"><br></div></div></body></html>