I'm having trouble combining shapefiles from TIGER and different local governments into a single postgis db to query legislative locations. I've imported all data to multipolygon geom, but found some datasets' polygon shapes returning really large floats values lat/lng. Looking more closely, I noticed inconsistent EPSG coordinate systems, based on searching prj2epsg.org with contents of my .prj files:

#Census Data (EPSG:4269 - GCS_North_American_1983)    

#Texas Data (EPSG:3081 - NAD_1983_Lambert_Conformal_Conic)

I can't seem to get ogr2ogr to explicitly transform the target coordinate systems with -a_srs EPSG:3081 -s_srs EPSG:3081 -t_srs EPSG:4269:

ogr2ogr -f PostgreSQL PG:"host=..." file.shp -nlt MULTIPOLYGON -s_srs EPSG:3081 -a_srs EPSG:3081 -s_srs EPSG:3081 -t_srs EPSG:4269 -lco GEOMETRY_NAME=the_geom -nln table_name.

I've tried a number of different variations on the above, but at best I get ERROR 1: AddGeometryColumn failed for layer table_name, layer creation has failed.

What am I missing here?

I'm still a bit of a novice on work with shapefiles.

Example source files:

  • Welcome to GIS.SE. Can you confirm some things: you have source data from two spatial reference systems (SRSs): EPSG:4269 & EPSG:3081, and your desired SRS (in PostGIS) is EPSG:4269?
    – Martin F
    Apr 15, 2014 at 4:46

1 Answer 1


It seems you're overcomplicating the use of SRS flags.

If you have source data from two spatial reference systems (SRSs): EPSG:4269 (Census data) and EPSG:3081 (Texas data), and your desired SRS (in PostGIS) is EPSG:4269 (same as Census data), then you'd use two variations of the ogr2ogr command.

For the Texas data, specify source and target SRSs, so data are reprojected:

ogr2ogr -f PostgreSQL PG:"...." texas.shp -nlt MULTIPOLYGON -s_srs EPSG:3081 -t_srs EPSG:4269 -lco GEOMETRY_NAME=the_geom -nln tex_table_name

For Census data, just assign it (in case it's not already assigned), without projection:

ogr2ogr -f PostgreSQL PG:"host=..." census.shp -nlt MULTIPOLYGON -a_srs EPSG:4269 -lco GEOMETRY_NAME=the_geom -nln cen_table_name
  • In the end the issue wound up being that I had an older version of postgis and my spatial_refs were out of date. Apr 30, 2014 at 4:27

Your Answer

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

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