2

I have a shapefile with a customized projection

PROJCS["NAD83_Lambert_Conformal_Conic_CN",GEOGCS["GCS_North_American_1983",DATUM["North_American_Datum_1983",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221008916]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33],PARAMETER["standard_parallel_2",60],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-96],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]

I have read the projection string and define a customized projection system

INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text,srtext) values ( 94326, 'epsg', 94326, '+proj=lcc +lat_1=33 +lat_2=60 +lat_0=43 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs', 'PROJCS["NAD83_Lambert_Conformal_Conic_CN",GEOGCS["GCS_North_American_1983",DATUM["North_American_Datum_1983",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221008916]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33],PARAMETER["standard_parallel_2",60],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-96],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]');

However, ogr2ogr2 cannot interpret my newly define projection

ogr2ogr -f "PostgreSQL" PG:"host=1.1.1.1 user=geotest dbname=dbname password=password" LRS_DATUM.shp -a_srs "EPSG:94326"

returns

ERROR 6: EPSG PCS/GCS code 94326 not found in EPSG support files.  Is this a val
id EPSG coordinate system?

How can I get around this?

2
  • 1
    GDAL has its own projection library and it can't use the projection that you have defined on the PostGIS side only. It is quite hard for a user to add EPSG synonyms into GDAL. I would try what happens if you use ogr2ogr simply with your Proj4 string -a_srs '+proj=lcc +lat_1=33 +lat_2=60 +lat_0=43 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs'. It probably adds a new line into spatial_ref_system for you.
    – user30184
    Commented Oct 22, 2016 at 12:50
  • It seems that I can use a orc_text file to define a customized projection gothos.info/2009/04/transform-projections-with-gdal-ogr . I will explore this option and see if I can solve this problem.
    – Seen
    Commented Oct 24, 2016 at 14:49

0

Your Answer

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

Browse other questions tagged or ask your own question.