Content deleted Content added
disallow any format other than decimal or dms |
fix the decmal display |
||
Line 564:
local lat, long = datavalue.latitude, datavalue.longitude
if form == "dec" then
out[#out+1] = lat .. "°" .. ns .. " " .. long .. "°" .. ew
else
▲ if lat < 0 then
▲ ns = "S"
▲ lat = - lat
▲ ns = "N"
▲ end
local latdeg = math.floor(lat)
local latms = (lat - latdeg) * 60
local latmin = math.floor(latms)
local latsec = (latms - latmin) * 60
▲ if long < 0 then
▲ ew = "W"
▲ long = - long
▲ ew = "E"
▲ end
local longdeg = math.floor(long)
local longms = (long - longdeg) * 60
Line 592 ⟶ 590:
if latsec == 0 and longsec == 0 then
if latmin == 0 and longmin == 0 then
out[#out
else
out[#out
out[#out] = out[#out] .. longdeg .. "°".. longmin .. "′" .. ew
end
else
out[#out
out[#out] = out[#out] .. longdeg .. "°" .. longmin .. "′" .. longsec .. "″" .. ew
end
Line 791 ⟶ 789:
-- decimal degrees needs |format = dec
local form = (frame.args.format or ""):lower():sub(1,3)
if form ~= "dec" then
form = "dms"
end
|