I used this website to determine that the SRID for my shapefile is 3857. Following that information, I used the
shp2pgsql utility to convert my shapefile into the sql I need to insert into PostreSQL (using PostGIS):
shp2pgsql -s 3857 /my.shp > /my.sql
The data was inserted properly into Postgres giving me a
geom column of type
geometry(Point, 3857), which is what I expected.
My issue is that when I run the following query to get the lat / lon value, they don't give me the proper coordinates. Here's my query:
select ST_AsText(ST_Transform(ST_SetSRID(geom, 3857), 4326)) from mytable limit 1;
The problem is that it gives me a latitude and longitude that points to a random location in India, when I know in fact that this should be pointing to a location in the United States.
It's worth noting that when I use the
ogr2ogr utility to convert my shapefile to GeoJSON, it maps out all of the coordinates correctly, so the shapefile itself seems to be in proper order.
Here are some untransformed points from a basic