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 <<a href="mailto:james@sun.ac.za">james@sun.ac.za</a>> 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'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 "gisprovices" violates check constraint "enforce_srid_gisdata"<br>
<br>
<br>
<br>
The table definition is as follows...<br>
<br>
CREATE TABLE GISProvinces (<br>
region_id SERIAL PRIMARY KEY,<br>
name VARCHAR(255) NULL,<br>
layer INTEGER NOT NULL REFERENCES TGISLayer<br>
);<br>
SELECT AddGeometryColumn('', 'gisprovinces', 'gisdata', 4326, 'MULTIPOLYGON', 2);<br>
<br>
Everything works fine if I don'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>