Sub test() Dim factory As ISpatialReferenceFactory3 Set factory = New SpatialReferenceEnvironment Dim sr As ISpatialReference Set sr = factory.CreateProjectedCoordinateSystem(esriSRProjCS_WGS1984UTM_14N) Dim pt As IPoint Set pt = New Point Set pt.SpatialReference = sr Dim conv As IConversionMGRS Set conv = pt conv.PutCoordsFromMGRS "14SND5623735757", esriMGRSMode_USNG ' returns 556237, 3835757 MsgBox pt.X & vbCrLf & pt.Y Dim sr2 As ISpatialReference Dim proj As IProjectedCoordinateSystem Set proj = sr Set sr2 = proj.GeographicCoordinateSystem pt.Project sr2 ' returns -98.386, 34.662 MsgBox pt.X & vbCrLf & pt.Y End Sub
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.