Using MAP 2007, is there an easily accessible function for converting point data from Lat/Long to NAD83 etc. and vise versa?
If there isn't an easy one is there a hard one?
|
Using MAP 2007, is there an easily accessible function for converting point data from Lat/Long to NAD83 etc. and vise versa?
If there isn't an easy one is there a hard one?
I'd like to know how to convert using VBA. I've seen it down using Lisp; the (ade_proj*) functions.
The ActiveX reference for Map has never been as good as the acad reference, but there is one. In the TOC, look under Programming Interfaces>Autodesk Map 3D ActiveX reference. Once inside that reference, you should find some info on the Projection property. You can change it via AttachedDrawing.Projection or Project.CurrentProjection.
Where do I look for the ActiveX Reference for Map?
We had to do this same task for the broadcast mast on the top of the Freedom Tower. The broadcast industry does all of it's calculations in latitude/longitude. Although NAD 83 is the survey standard for the current WTC project, most of the site documentation from Yamasaki, the PANYNJ and others was in several different formats. The PANYNJ has a connection with the Army Corps of Engineers Survey group and we converted the site coords (from Yamasaki in NAD27) to NAD83 and they sent us back the latitude and the longitude. We had the lat/long of the fallen tower from local TV engineers and the results were comfortably close.Originally Posted by bweir
Interestingly, when we gave them the x and y, they asked for the altitude (z) coordinate. It turns out latitude and longitude is dependent on elevation. And, as we later discovered, the FAA air traffic control system kicks in at 2000 feet, establishing a ceiling for high rise construction in the US. So the US can never overtake all those Asian towers that are over 2000 feet.
To answer your question with a question: How good do you think you are at celestial measurement? I found the survey issues of the WTC daunting and was relieved when the Port Authority got the Corps of Engineers to do the calculation for us.
Let us know how you make out. If there's a tool to do these computations buried somewhere in the software we all have, we should know about it.
AutoCAD MAP already has the (ade_proj...) Lisp Functions for converting from one coordinate system to another. So I thought maybe I could access these through my VBA application. Here's what I put together....
I thought I would be able to call any Lisp function this way. I've seen another example that uses the (grvecs) function to draw lines from VBA. I can't even get my (alert) function to work (for the test only, I'd use the MsgBox method later). Can anybody tell me what I'm missing?Code:Sub TestLLtoNAD() Dim VLisp As Object Dim VLFuncs As Object Dim VLFunc As Object Dim NADCords(1) As Double Dim LLCords As Variant Dim SourceCordSys As String Dim DestCordSys As String NADCords(0) = 497143.91 NADCords(1) = 5576570.19 SourceCordSys = "UTM83-12" DestCordSys = "LL84" Set VLisp = Application.GetInterfaceObject("VL.Application.16") Set VLFuncs = VLisp.ActiveDocument.functions Set VLFunc = VLFuncs.Item("(alert " & SourceCordSys & ")") VLFuncs.Item("eval").funcall (VLFunc) Set VLFunc = VLFuncs.Item("(ade_projsetsrc " & SourceCordSys & ")") VLFuncs.Item("eval").funcall (VLFunc) Set VLFunc = VLFuncs.Item("(ade_projsetdest " & DestCordSys & ")") VLFuncs.Item("eval").funcall (VLFunc) Set VLFunc = VLFuncs.Item("read").funcall("(ade_projptforward " & pnaddcords & ")") LLCords = VLFuncs.Item("eval").funcall(VLFunc) End Sub
should beSet VLFunc = VLFuncs.Item("(alert " & SourceCordSys & ")")
VLFuncs.Item("eval").funcall (VLFunc)
the others need to be change toCode:Set VLFunc = VLFuncs.Item("alert") VLFunc.funcall SourceCordSys