shrug-l: Lat/Long(decimal degrees) to Meters
withoutGeometryservice
Tripp Corbin
tcorbin at keckwood.com
Thu May 26 14:15:48 EDT 2011
CorpsCon is a great program. I have used it for years to run coordinate
conversions. It is free from the US Army Corps of Engineers.
Tripp Corbin, MCP, CFM, GISP | Vice President, GIS/IT
KECK & WOOD, INC. <http://www.keckwood.com/>
2750 Premiere Parkway, Suite 900, Duluth, GA 30097
Direct (678) 417-4013 | Main (678) 417-4000 | Fax (678) 417-4055
Esri Certified Trainer | Esri Certified Desktop Associate
From: shrug-l-bounces at lists.dep.state.fl.us
[mailto:shrug-l-bounces at lists.dep.state.fl.us] On Behalf Of Sykes, John
Sent: Thursday, May 26, 2011 2:14 PM
To: Janelle Brown; shrug-l at lists.dep.state.fl.us
Subject: RE: shrug-l: Lat/Long(decimal degrees) to Meters
withoutGeometryservice
Have you tried using CORPSCON?
It is the generally accepted method for datum, projection & elevation
conversions, etc. I've noticed that most surveyors use this program for
their conversions.
The FORTRAN code can be inserted into other programs if you are into
that, otherwise you can run your data in a batch mode, or one point at a
time.
-- John
The Department of Environmental Protection values your feedback as a
customer. DEP Secretary Herschel T. Vinyard Jr. is committed to
continuously assessing and improving the level and quality of services
provided to you. Please take a few minutes to comment on the quality of
service you received. Simply click on this link to the DEP Customer
Survey
<http://survey.dep.state.fl.us/?refemail=John.Sykes@dep.state.fl.us> .
Thank you in advance for completing the survey.
From: shrug-l-bounces at lists.dep.state.fl.us
[mailto:shrug-l-bounces at lists.dep.state.fl.us] On Behalf Of Janelle
Brown
Sent: Thursday, May 26, 2011 2:02 PM
To: shrug-l at lists.dep.state.fl.us
Subject: shrug-l: Lat/Long(decimal degrees) to Meters without Geometry
service
Hello,
Does anyone have a javascript code that can convert decimal degrees
(wkid: 4326) points to meters (wkid: 3857)? I am not able to use the
geometry service for a number of reasons, so I believe the only way to
do this would be to convert the points mathematically. This is what I
have so far and it's kinda working (I'm off about 20-25 miles), but I'm
pretty sure there is some tweaking needed in the equations. If anyone
has any ideas or has already written some javascript code for this, I'd
be very grateful!
function addPointToMap() {
var xMin,yMin,xMax,yMax;
var lon ,lat;
var DEG_TO_RAD = 0.017453292519943296;
var PI = 3.14159267;
var NUM = 6356752.3142;
lon = -84.286616;
lat = 30.437574;
//Limit to World
if(lat<=-90)lat=-90;
if(lat>=90)lat=90;
if(lon<=-180)lon=-180;
if(lon>=180)lon=180;
var Y = Math.round(NUM * Math.log( Math.tan( ((lat * DEG_TO_RAD) +
(PI/2)) / 2 ) ));
var X = Math.round(NUM * (lon * DEG_TO_RAD));
Thank you in advance!
Janelle Brown
GIS Analyst, Corporate Analytics
Citizens Property Insurance Corporation
-------------------------------------------------------
ofc. 850.521.8373 | cell 850.879.2374
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.dep.state.fl.us/pipermail/shrug-l/attachments/20110526/b1d1fb24/attachment.htm
More information about the SHRUG-L
mailing list