I started with basics and did these steps:
createdb -U postgres -E UTF8 -O Peete gis
-OKcreatelang -U postgres plpgsql gis
(was already installed) -OKpsql -U postgres -d gis -f PATH_TO_POSTGRES/share/contrib/postgis-2.1/postgis.sql
-OKpsql -U postgres -d gis -f PATH_TO_FILE/4326.sql
(I downloaded file from Spatialreference and chose "PostGIS spatial_ref_sys INSERT statement") - OK- Then I ran this command
shp2pgsql -c -s 4326 -I roads.shp > roads.sql
-OK - Now I wanted to add this SQL file to my database created above so I ran this command:
psql -d gis -f roads.sql
-FAILED
I got this error message:
ERROR: AddGeometryColumn() - invalid SRID
CONTEXT: SQL statement "SELECT AddGeometryColumn('',$1,$2,$3,$4,$5,$6,$7)"
PL/pgSQL function addgeometrycolumn(character varying,character varying,character varying,integer,character varying,integer,boolean) line 5 at SQL statement
********** Error **********
The shapefile I'm using is in WGS84 coordinate system EPSG:4326
Any recommendations?
"objectid" int4,