<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML dir=ltr><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 10.00.9200.16686"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial>Bruce,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial>Hard to say without more specifics about EXACTLY what errors
you are getting.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial>Common errors</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial>1) encoding, By default UTF8 is assumed unless
overwritten </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial>2) If you use -S switch it will fail if it sees
MULTIPOLYGONs for example.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial>3) ESRI files often have geometries which PostGIS considers so
invalid it won't load them and that will kill the whole transaction and prevent
any loading</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial>To skip over these royally bad geometries, you can use the -e
option.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial><A
href="http://postgis.net/docs/manual-2.1/using_postgis_dbmanagement.html#shp2pgsql_usage">http://postgis.net/docs/manual-2.1/using_postgis_dbmanagement.html#shp2pgsql_usage</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial>This will be slower since it commits each record as a separate
transaction.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial>If you do come across a royally bad geometry that you don't
think is royally bad, we'd like to know about it to confirm. There have
been instances (which I can't recall off hand),</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial>where a geometry was not interpreted right by shp2pgsql.
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial>Hope that helps,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial>Regina</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial><A
href="http://www.postgis.us">http://www.postgis.us</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial><A
href="http://postgis.net">http://postgis.net</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=902540004-27092013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV><BR>
<DIV lang=en-us class=OutlookMessageHeader dir=ltr align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> postgis-users-bounces@lists.osgeo.org
[mailto:postgis-users-bounces@lists.osgeo.org] <B>On Behalf Of </B>Clay,
Bruce<BR><B>Sent:</B> Thursday, September 26, 2013 3:42 PM<BR><B>To:</B>
postgis-users@lists.osgeo.org<BR><B>Subject:</B> [postgis-users] error loading
shapefiles into postgis<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT color=#000000 size=2 face=Arial>I have a number of shapefiles from
various sources that have a mixture of polygons and multi-polygons or points nad
multi-point that I have been trying to load into PostGis. I have tried
using QGis / Spit, org2ogr and shp2pgsql. </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Some of the files will load but thow a bunch or
errors/warnings and others won't load at all. The files are part of the
ArcGis data distribution as sdc files converted to shapefiles using the ESRI DDA
application.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Is there a "proper method" or any method that will
work to get the data registered in PostGis?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Bruce</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><BR><BR>This message and any enclosures are intended only for the
addressee. Please <BR>notify the sender by email if you are not the intended
recipient. If you are <BR>not the intended recipient, you may not use, copy,
disclose, or distribute this <BR>message or its contents or enclosures to any
other person and any such actions <BR>may be unlawful. Ball reserves the right
to monitor and review all messages <BR>and enclosures sent to or from this email
address.<BR></DIV></BODY></HTML>