[postgis-users] spatialreference.org srid insert error

Astrid Emde astrid.emde at wheregroup.com
Tue Jul 17 13:09:45 PDT 2012


Hello Peter,

there is a constraint that checks that srid is < 998999


ALTER TABLE spatial_ref_sys
  ADD CONSTRAINT spatial_ref_sys_srid_check CHECK (srid > 0 AND srid <=
998999);

You should set sird in the insert to 102243 instead of 9102243:

INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text,
srtext) values
( 102243, 'esri', 102243, '+proj=lcc +lat_1=37.06666666666667
+lat_2=38.43333333333333 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000
+y_0=500000 +ellps=GRS80 +units=m +no_defs ',
'PROJCS["NAD_1983_HARN_StatePlane_California_III_FIPS_0403",GEOGCS["GCS_North_American_1983_HARN",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["False_Easting",2000000],PARAMETER["False_Northing",500000],PARAMETER["Central_Meridian",-120.5],PARAMETER["Standard_Parallel_1",37.06666666666667],PARAMETER["Standard_Parallel_2",38.43333333333333],PARAMETER["Latitude_Of_Origin",36.5],UNIT["Meter",1],AUTHORITY["EPSG","102243"]]');

Astrid

On Tue, July 17, 2012 6:14 pm, Peter Tittmann wrote:
> Hi,
>
>
> Im trying to add a srid from spatial reference.org
> (http://spatialreference.org/ref/esri/102243/postgis/) but i'm getting a
> error using the insert statement:
>
> ERROR:  new row for relation "spatial_ref_sys" violates check constraint
> "spatial_ref_sys_srid_check"
>
>
> I saw this ticket
> (http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDYQ
> FjAA&url=http%3A%2F%2Ftrac.osgeo.org%2Fpostgis%2Fticket%2F1505&ei=f6gFUOy
> kJcWl2AXz2eDKBQ&usg=AFQjCNH1dlCvTvWEYntRmqflCDtAOUT49g&sig2=tch67lIoPp2IO
> RZaCyOpSw) and thread
> (http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CDgQ
> FjAB&url=http%3A%2F%2Fpostgis.refractions.net%2Fpipermail%2Fpostgis-devel
> %2F2012-February%2F018485.html&ei=f6gFUOykJcWl2AXz2eDKBQ&usg=AFQjCNGxJREc
> 0HrXIbAFuKSfvjU0tbfg9A&sig2=0wH8-t8hCMiuIWKDL6AeFQ) but seems lie it
> should be fixed.
>
> Thanks in advance!
>
>
> Peter
>
>
> --
> Peter Tittmann
>
>
>
> _______________________________________________
> postgis-users mailing list postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>


-- 
Mit freundlichen Grüßen

Astrid Emde

-----------------------------------
Aufwind durch Wissen!

Qualifizierte OpenSource-Schulungen
bei der www.foss-academy.eu

----------------------------------

 Astrid Emde
 WhereGroup GmbH & Co.KG
 Eifelstraße 7
 53119 Bonn
 Germany

 Fon: +49(0)228 90 90 38 - 19
 Fax: +49(0)228 90 90 38 - 11

 astrid.emde at wheregroup.com
 www.wheregroup.com
 Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com

Amtsgericht Bonn, HRA 6788
-------------------------------
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
-------------------------------
 pgp-public key:
 http://pgp.mit.edu:11371/pks/lookup?search=0x06DA52D72D515284
  Signierte und/oder verschlüsselte Nachrichten sind sehr willkommen
  Signed and/or encrypted mail is highly appreciated




More information about the postgis-users mailing list