[postgis-users] setting SRID

Eric.Hillmuth at anr.state.vt.us Eric.Hillmuth at anr.state.vt.us
Mon May 3 11:28:20 PDT 2004


Yes, that does it.

Thank you very much!

On 30 Apr 2004 at 9:49, David Blasby wrote:

> Eric.Hillmuth at anr.state.vt.us wrote:
> 
> > Hi all;
> > 
> > I'm using shp2pgsql and I've run into an issue that highlights my postgresql 
> > weakness. If I don't specify a SRID with Shp2pgsql I end up with this CHECK 
> > constraint on my new tables:
> > $1 CHECK (srid(the_geom) = -1) 
> > 
> > Now that I know the SRID I want for my table I used:
> > UPDATE trails
> > SET the_geom = setsrid(the_geom,32145);
> > 
> > Which produces the error:
> > new row for relation"trails" violates check constraint "$1"
> > 
> > Seems like I need to drop this constraint before I can set my SRID? If so how do 
I do 
> > that?
> > 
> > I'm running Postgresql 7.4.1, PostGIS 0.8, Geos 1.0 and Pro 4.4.7 on SuSE 8.2 
> > Linux.
> > 
> 
> ALTER TABLE <table> DROP CONSTRAINT "$1";
> 
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 


-- 
Eric Hillmuth
GIS Systems Developer
Vermont Agency of Natural Resources
eric.hillmuth at anr.state.vt.us
802-241-3616 




More information about the postgis-users mailing list