Lat/Long to Northing and Easting values for State Plane Coordinates
781463Jun 25 2010 — edited Jun 25 2010I am trying to convert a Lat/Long to a State Plane Coordinate System and get the Northing and Easting values. I am trying to recreate the behavior of the calculations that are on the NGS web site http://www.ngs.noaa.gov/cgi-bin/spc_getpc.prl
I am not getting matching values. Here is what I am currently doing is transforming a point to the Coordinate system that is used by the ngs program. In this example I'm using 38, -98. Which is a lat long in the Kansas South SPC, whose SRID is 26978. The x/y values that are returned are
x: -28773651.6819019
y: -49188242.0729195
but I expect the values of
x: 443913.251
y: 548097.758
These should all be in meters. What am I doing wrong or how can I come up with the expected values. Thanks.
declare
l_sdo_geometry_point SDO_GEOMETRY;
begin
dbms_output.enable;
l_sdo_geometry_point :=
SDO_GEOMETRY (2001
,8265
,sdo_point_type (38
,-98
,NULL
)
,NULL
,NULL
);
l_sdo_geometry_point :=
sdo_cs.transform (geom => l_sdo_geometry_point
,to_srid => 26978);
dbms_output.put_line('x: ' || l_sdo_geometry_point.sdo_point.x);
dbms_output.put_line('y: ' || l_sdo_geometry_point.sdo_point.y);
end;