<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_709640">Thanks Steve,</div><div dir="ltr">here is the output from ogrinfo:</div><div id="yui_3_16_0_1_1425637687387_709633" dir="ltr">ogrinfo -ro -so emsr118_8Zaragoza_20150202_forecast_20150203_0600.shp<br style="" class="">INFO: Open of `emsr118_8Zaragoza_20150202_forecast_20150203_0600.shp'<br style="" class="">      using driver `ESRI Shapefile' successful.<br style="" class="">1: emsr118_8Zaragoza_20150202_forecast_20150203_0600 (Polygon)</div><div id="yui_3_16_0_1_1425637687387_709639" dir="ltr"><br></div><div id="yui_3_16_0_1_1425637687387_712541" dir="ltr">The non-summary top part is this:</div><div id="yui_3_16_0_1_1425637687387_712570" dir="ltr">INFO: Open of `emsr118_8Zaragoza_20150202_forecast_20150203_0600.shp'<br style="" class="">      using driver `ESRI Shapefile' successful.<br style="" class=""><br style="" class="">Layer name: emsr118_8Zaragoza_20150202_forecast_20150203_0600<br style="" class="">Geometry: Polygon<br style="" class="">Feature Count: 119<br style="" class="">Extent: (-88683.343224, 5071795.372268) - (-51666.416524, 5103519.364138)<br style="" class="">Layer SRS WKT:<br style="" class="">PROJCS["WGS_84_Pseudo_Mercator",<br style="" class="">    GEOGCS["GCS_WGS_1984",<br style="" class="">        DATUM["WGS_1984",<br style="" class="">            SPHEROID["WGS_84",6378137,298.257223563]],<br style="" class="">        PRIMEM["Greenwich",0],<br style="" class="">        UNIT["Degree",0.017453292519943295]],<br style="" class="">    PROJECTION["Mercator_1SP"],<br style="" class="">    PARAMETER["central_meridian",0],<br style="" class="">    PARAMETER["false_easting",0],<br style="" class="">    PARAMETER["false_northing",0],<br style="" class="">    UNIT["Meter",1],<br style="" class="">    PARAMETER["latitude_of_origin",0.0]]<br style="" class="">cat: Integer (10.0)<br style="" class="">value: Integer (10.0)<br style="" class="">label: String (10.0)<br style="" class=""></div><div dir="ltr"><br></div><div dir="ltr">Conrad<br></div><div dir="ltr"><br></div><div id="yui_3_16_0_1_1425637687387_709538"><span></span></div><br>  <div id="yui_3_16_0_1_1425637687387_709541" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1425637687387_709540" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1425637687387_709539" dir="ltr"> <hr size="1">  <font id="yui_3_16_0_1_1425637687387_709542" face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> Stephen Woodbridge <woodbri@swoodbridge.com><br> <b><span style="font-weight: bold;">To:</span></b> Conrad Bielski <conrad_bielski@yahoo.com>; PostGIS Users Discussion <postgis-users@lists.osgeo.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, March 10, 2015 3:15 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [postgis-users] Problem importing SHP polygons<br> </font> </div> <div class="y_msg_container"><br>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 class="qtdSeparateBR"><br><br></div><div class="yqt5785097937" id="yqtfd47039"><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 shape="rect" ymailto="mailto:postgis-users@lists.osgeo.org" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br clear="none">> <a shape="rect" href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><div class="yqt5785097937" id="yqtfd32487"><br clear="none">><br clear="none"><br clear="none"></div><br><br></div> </div> </div>  </div></body></html>