[GIS] PostGIS not converting GIS data into latitude/longitude values

postgispostgresqlsrid

I am running PostgreSQL and PostGIS. I am trying to do something mind-numbingly simple: determine the latitude and the longitude of a point.

Unfortunately, PostGIS stubbornly refuses to transform the SRID of the GIS data from SRID=4269 to SRID=4326, which is necessary to get the latitude and longitude of the point in question:

select pid, landdistri, ST_AsText(ST_Centroid(geom)) from "parcels_new" where pid='016-626-331';
     pid     |       landdistri        |                st_astext                 
-------------+-------------------------+------------------------------------------
 014-626-331 | Similkameen Div of Yale | POINT(1461547.22664562 504522.034305431)
(1 row)

select pid, landdistri, ST_SRID(geom) from "parcels_new" where pid='016-626-331';
     pid     |       landdistri        | st_srid 
-------------+-------------------------+---------
 014-626-331 | Similkameen Div of Yale |    4269
(1 row)

select pid, landdistri, ST_SRID(ST_Transform(geom, 4326)) from "parcels_new" where pid='016-626-331';
     pid     |       landdistri        | st_srid 
-------------+-------------------------+---------
 014-626-331 | Similkameen Div of Yale |    4326
(1 row)

select pid, landdistri, ST_AsText(ST_Centroid(ST_Transform(geom, 4326))) from "parcels_new" where pid='016-626-331';
     pid     |       landdistri        |                st_astext                 
-------------+-------------------------+------------------------------------------
 014-626-331 | Similkameen Div of Yale | POINT(1461547.22664562 504522.034305431)
(1 row)

select pid, ST_AsEWKT(ST_Centroid(ST_Transform(geom, 4326))) from "parcels_new" where pid='016-626-331';
     pid     |                     st_asewkt
-------------+----------------------------------------------------
 016-626-331 | SRID=4326;POINT(1461547.22664562 504522.034305431)
(1 row) 

select f_table_name as name, srid from geometry_columns;
    name     | srid
-------------+------
 parcels_new | 4269
 Pins        |    0
(2 rows)

I don't get any error messages.
I am at a loss to understand why ST_Transform REFUSES TO TRANSFORM my data….

Best Answer

You have loaded your data with the wrong SRID. 4269 is lon/lat NAD 83. 4326 is lon/lat WGS 84. They are practically the same projection, and both geographic. Judging from your coordinates, the data is actually in some planar projection, though without knowing extra information (like where you are) I can't even take an informed guess as to which one.