I could really use some direction here. I'm fairly new to PostGIS, and I'm coming up with nothing in my search for answers.
I'm pulling in various shapefiles with several different projections (EPSG/SRID). I extract the GEOGCS from the .prj file, look up the SRID number using https://developers.arcgis.com/javascript/3/jshelp/gcs.html, matching it and import them with shp2pgsql -s. This is pretty straight forward. Generally it's working fine. Other times, not so much.
When it's not working, the coordinates I'm getting are like 153009.914, 5497499.47 (clearly off the map). I believe that this is a simple projection issue, and I'm not using the right SRID.
.prj:
PROJCS["EO_Lambert_Conformal_Conic",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",1000000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-84.0],PARAMETER["Standard_Parallel_1",44.5],PARAMETER["Standard_Parallel_2",54.5],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
Import:
# shp2pgsql -c -s 4269 -W UTF-8 -I /Shape/ont/DIVISION.shp ont | psql -U postgres -d shape
Structure:
Column | Type | Collation | Nullable | Default
------------+-----------------------------+-----------+----------+-------------------------------------------
gid | integer | | not null | nextval('ont_gid_seq'::regclass)
objectid | integer | | |
ed_id | numeric | | |
pd_number | numeric | | |
pd_label | character varying(64) | | |
ed_name_en | character varying(64) | | |
ed_name_fr | character varying(64) | | |
shape_leng | numeric | | |
shape_area | numeric | | |
geom | geometry(MultiPolygon,4269) | | |
Indexes:
"ont_pkey" PRIMARY KEY, btree (gid)
"ont_geom_idx" gist (geom)
SQL:
select ST_Astext(geom) AS coordinates FROM ont limit 1;
Result: **MULTIPOLYGON(((574380.4001 4808575.0399,574434.7803 4808545.44,574496.2521 4808512.3351,............... ***etc.
What am I doing wrong?
Thank you for any insight!