5

I have a custom projection used in some shapes on a prj file. I want to insert this projection in the table spatial_ref_sys PostGIS. The data in the prj file will SRTEXT table field, how can I get PROJ4TEXT from SRTEXT??

INSERT into spatial_ref_sys
 (srid, auth_name, auth_srid, proj4text, srtext)
values 
( 101010, 'epsg', 101010, '?????????????', 
'GEOGCS["Carta Geral",DATUM["Not specified (based on International 1924 ellipsoid) (EPSG ID",SPHEROID["International 1924 (EPSG ID 7022)",6378388.0,297.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",200000.0],PARAMETER["False_Northing",5000000.0],PARAMETER["Central_Meridian",-51.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]');
6

Just copy the string into a text file named crs.txt, and run gdalsrsinfo crs.txt >> out.txt in the OSGeo4W Shell or Linux Terminal on it:

PROJ.4 : '+proj=longlat +ellps=intl +no_defs '

OGC WKT :
GEOGCS["Carta Geral",
    DATUM["Not specified (based on International 1924 ellipsoid) (EPSG ID",
        SPHEROID["International 1924 (EPSG ID 7022)",6378388.0,297.0]],
    PRIMEM["Greenwich",0.0],
    UNIT["Degree",0.0174532925199433]]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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