Hi James,<br><br>Why not try qGIS and use its import wizard to give it a shot? <br><br>regards,<br><br>stephen<br><br><div class="gmail_quote">On Fri, May 9, 2008 at 8:01 PM, James Dominy &lt;<a href="mailto:james@sun.ac.za">james@sun.ac.za</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi all,<br>
<br>
I have a shape file with an associated prj. The prj file says the shape file is in WGS84, so I&#39;m using<br>
<br>
shp2pgsql -a -g gisdata -s 4326 provinces.shp GISProvices<br>
<br>
<br>
<br>
When I run the result through psql, I get<br>
<br>
ERROR: new row for relation &quot;gisprovices&quot; violates check constraint &quot;enforce_srid_gisdata&quot;<br>
<br>
<br>
<br>
The table definition is as follows...<br>
<br>
CREATE TABLE GISProvinces (<br>
 &nbsp; &nbsp; &nbsp; &nbsp;region_id SERIAL PRIMARY KEY,<br>
 &nbsp; &nbsp; &nbsp; &nbsp;name VARCHAR(255) NULL,<br>
 &nbsp; &nbsp; &nbsp; &nbsp;layer INTEGER NOT NULL REFERENCES TGISLayer<br>
);<br>
SELECT AddGeometryColumn(&#39;&#39;, &#39;gisprovinces&#39;, &#39;gisdata&#39;, 4326, &#39;MULTIPOLYGON&#39;, 2);<br>
<br>
Everything works fine if I don&#39;t specify any srid. As soon as I specify an SRID for either the column or the inserts (via -s with shp2pgsql), or both, even if they are the same, I get the error. What am I doing wrong?<br>

<br>
Thanks,<br>
James<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</blockquote></div><br>