Dim degrees As Double Dim minutes As Double Dim seconds As Double ' Set degree to value before "°" of Argument Passed.ĭegrees = Val(Left(Degree_Deg, InStr(1, Degree_Deg, "°") - 1)) Function Convert_Decimal(Degree_Deg As String) As Double ' Declare the variables to be double precision floating-point. Copy and paste the code below into the Module window. From the Insert dropdown menu, select Module. Press ALT + F11 to bring up the Microsoft Visual Basic for Applications window. Let’s look at how to achieve this using Excel and the data below for three cities, Dublin, Paris, and Sydney.Īdd a header for two new columns LONGITUDE and LATITUDE (or calls these whatever suits you, X, Y for example) For optimum use in the GIS you require the coordinate data in decimal-degrees format. At some point you may be handed data in an Excel file that needs to be imported into a GIS but the coordinate columns are in degrees-minutes-seconds format.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |