<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="yiv9019057870"><div id="yui_3_16_0_1_1425637687387_848298"><div id="yui_3_16_0_1_1425637687387_848297" 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_848296">Hello again,</div><div dir="ltr" id="yiv9019057870yui_3_16_0_1_1425637687387_844627">since I'm new to this list, is sending the files for testing allowed? For example, can somebody test the SHP file in question to see whether they can replicate the issue?</div><div dir="ltr" id="yiv9019057870yui_3_16_0_1_1425637687387_844629"><br clear="none"></div><div dir="ltr" id="yiv9019057870yui_3_16_0_1_1425637687387_844630">This is occurring with different shapefiles produced so it's a really strange problem and I've tried using different creation parameters but all with the same result.</div><div dir="ltr" id="yiv9019057870yui_3_16_0_1_1425637687387_844631"><br clear="none"></div><div dir="ltr" id="yiv9019057870yui_3_16_0_1_1425637687387_844632">Thanks for your help,</div><div dir="ltr" id="yiv9019057870yui_3_16_0_1_1425637687387_844662">Conrad<br clear="none"></div><div id="yiv9019057870yui_3_16_0_1_1425637687387_844663"><span></span></div><br clear="none">  <div class="qtdSeparateBR"><br><br></div><div class="yiv9019057870yqt8479787673" id="yiv9019057870yqt92864"><div id="yui_3_16_0_1_1425637687387_848301" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div id="yui_3_16_0_1_1425637687387_848300" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div id="yui_3_16_0_1_1425637687387_848299" dir="ltr"> <hr size="1">  <font id="yui_3_16_0_1_1425637687387_848302" face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> Stephen Woodbridge <woodbri@swoodbridge.com><br clear="none"> <b id="yui_3_16_0_1_1425637687387_848365"><span id="yui_3_16_0_1_1425637687387_848364" style="font-weight:bold;">To:</span></b> Conrad Bielski <conrad_bielski@yahoo.com>; PostGIS Users Discussion <postgis-users@lists.osgeo.org> <br clear="none"> <b><span style="font-weight:bold;">Sent:</span></b> Tuesday, March 10, 2015 3:15 PM<br clear="none"> <b><span style="font-weight:bold;">Subject:</span></b> Re: [postgis-users] Problem importing SHP polygons<br clear="none"> </font> </div> <div id="yui_3_16_0_1_1425637687387_848366" class="yiv9019057870y_msg_container"><br clear="none">On 3/10/2015 10:48 AM, Conrad Bielski wrote:<br clear="none">> Hi,<br clear="none">> I'm having a curious issue importing a polygon SHP file into PostGIS.<br clear="none">> I'll describe the procedure that I'm using and the problem that I'm<br clear="none">> having and hopefully somebody has had this issue in the past and fixed it.<br clear="none">><br clear="none">> So the procedure is that I use GRASS to produce a vector from a raster<br clear="none">> output: (r.to.vect input=MASK output=vecMap feature=area)  and then<br clear="none">> export to SHP file (v.out.ogr -c -e input=vecMap dsn=fname<br clear="none">> format=ESRI_Shapefile type=area).<br clear="none"><br clear="none">What does ogrinfo say about the shapefile? I would start here to make <br clear="none">sure the shapefile is really a polygon and not and arc type.<br clear="none"><br clear="none">-Steve<div id="yui_3_16_0_1_1425637687387_848367" class="yiv9019057870qtdSeparateBR"><br clear="none"><br clear="none"></div><div class="yiv9019057870yqt2722357907" id="yiv9019057870yqtfd27296"><br clear="none"><br clear="none">> Now when this SHP file is imported into PostGIS, the type is changed to<br clear="none">> multistring for some reason. Then when checking the topology, there is a<br clear="none">> 'ring self-intersection' error. This PostGIS db is then imported into<br clear="none">> GeoServer, where lines are connecting between different parts of the<br clear="none">> largest polygon (this should not be happening). If I fix this typology<br clear="none">> problem, then the largest polygon in the db disappears.<br clear="none">><br clear="none">> The strange thing is the following:<br clear="none">> 1. Opening the SHP file in QGIS doesn't have this problem<br clear="none">> 2. Importing the SHP file directly into GeoServer, doesn't generate this<br clear="none">> problem either.<br clear="none">><br clear="none">> Why is PostGIS having an issue importing this file?<br clear="none">><br clear="none">> Any ideas how to fix this?<br clear="none">><br clear="none">> Thanks in advance for your help,<br clear="none">> Conrad</div><br clear="none">><br clear="none">><br clear="none">><br clear="none">><br clear="none">> _______________________________________________<br clear="none">> postgis-users mailing list<br clear="none">> <a rel="nofollow" shape="rect" ymailto="mailto:postgis-users@lists.osgeo.org" target="_blank" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br clear="none">> <a rel="nofollow" shape="rect" target="_blank" href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><div class="yiv9019057870yqt2722357907" id="yiv9019057870yqtfd42050"><br clear="none">><br clear="none"><br clear="none"></div><br clear="none"><br clear="none"></div> </div> </div></div>  </div></div></div></div></body></html>