Я сомневаюсь, что приемник GPS будет выставлять координаты UTM. Он выглядит как широта и долгота в градусах/минутах/секундах (DDMMSS). Если это так, то один из способов сделать это следующий: в простом Python. В ArcGIS может оказаться полезным , но сначала вам придется переформатировать данные, возможно, используя Python.
import csv
import sys
# A function that takes 211234, treats it as 21°12'34",
# and returns 21.209444.
def convertToDegrees(DMS):
dms = DMS
dms = int(dms)
seconds = dms % 100
if 60 <= seconds:
print "More than 60 seconds! " + str(DMS) + " is not degrees/minutes/seconds!"
dms /= 100
minutes = dms % 100
if 60 <= minutes:
print "More than 60 minutes! " + str(DMS) + " is not degrees/minutes/seconds!"
dms -= minutes
degrees = dms/100
degrees += (minutes/60.0)
degrees += (seconds/(60.0 * 60.0))
if 180 < degrees or -180 > degrees:
print "In " + str(DMS) + ", degrees is outside [-180, 180]: " + str(degrees)
return degrees
# Input and output files from command line parameters
inFilename = sys.argv[1]
outFilename = sys.argv[2]
readFirstRow = False
with open(inFilename, "rb") as inFile:
reader = csv.reader(inFile)
with open(outFilename, "wb") as outFile:
writer = csv.writer(outFile)
# Loop through the rows
for row in reader:
if (not readFirstRow):
# Write the header row only once
writer.writerow(["ID", "latitude", "longitude"])
readFirstRow = True
else:
# Convert this row to latitude and longitude
latitude = 0
longitude = 0
if "-9" != row[1]:
latitude = convertToDegrees(row[1])
if "-9" != row[2]:
latitude = -1 * convertToDegrees(row[2])
if "-9" != row[3]:
longitude = convertToDegrees(row[3])
if "-9" != row[4]:
longitude = -1 * convertToDegrees(row[4])
writer.writerow([row[0], latitude, longitude])
Чтобы убедиться, что вы получите это право, вы хотите, чтобы убедиться, что GPS был тушение широты и долготы и выяснить, какие Datum она используется (возможно WGS 1984).
Спасибо @Gary S., я проверил с моим источником данных, и это данные GPS UTM. -9 указывает отсутствие данных. Им просто не хватает информации о зонировании. Спасибо, в любом случае. – Chen