title: Automatically fixing ring self-intersections in shp2pgsql
body: <p>We're importing a whole bunch of ArcGIS shapefiles into PostGIS, converted on the fly with <code>shp2pgsql</code>.  Problem is, if the shapefiles have any ring self-intersections, the import chokes:</p>
  
  <pre><code>NOTICE:  Ring Self-intersection at or near point -80.1338 25.8102
  ERROR:  new row for relation "place_shapes" violates
    check constraint "shape_is_valid"
  </code></pre>
  
  <p>How can we fix this?</p>