1

Apparently a blank proj4text field causes errors when adding a record. When you enter something close to correct into proj4text, the records get inserted without error.

What is the correct value to use, since the one I cobbled together gave bad results?

This is the Insert record from SpatialReference.org for that SRID:

INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) values ( 97688, 'sr-org', 7688, '',
'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]');

What is the correct value for proj4text given that srtext?

2 Answers 2

2

This is just another reincarnation of Google Mercator. EPSG:3875 is the mostly used version. The difference is the name of the projection, Mercator vs Mercator_1SP, and the spheroid.

EPSG:3785 has the sphere, while 3875 has the ellipsoid in the WKT, but sphere in the Proj.4 definition.

Whether the transition from the ellipsoid to the sphere is done correctly, is up to the software.

1
1

Found out how to make the proj4text value. You use gdalsrsinfo which for me was installed with QGIS. See Here and Here

The correct spatial_ref_sys insert command is:

INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) values ( 97688, 'sr-org', 7688, 
'+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137 +units=m +no_defs',
'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]');

I thought I was on the trail of an easy way to figure out the SRID from the .prj file, but no such luck. Still have to do it the hard way.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.