go-geografi

command module
v0.0.0-...-d34e1d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 0 Imported by: 0

README

Geografi

Projektet indeholder to moduler

  • taylor, der er en Go implementering af Chuck taylors oprindelige WGS84 konvertering mellem lat/lon og UTM
  • utmabs, der er en omregning fra Military Grid System (MGRS) til UTM.

Installation

Clone projektet https://github.com/brundtoe/go-geografi.git

test

Modulet taylor

    cd pkg/taylor
    go test -v 

Modulet utmabs

    cd pkg/utmabs
    go test -v 

Modulet geoutm er en justeret kopi af https://github.com/klaus-tockloth/coco, som er en delvis portering til golang af https://github.com/proj4js/mgrs

Eksempler

Eksempler findes i mappen cmd.

    go run <absoulte path to project root>/cmd/cities

Filen cities.go

Demo af indlæsning af filen cities.csv

Filen utmabs.go anvender ED50 modellen til konverteringen

Konvertering af MGRS 32V NJ 948757 99059 til UTM 32V 5948757 6399059 

Filen utmgeo.go anvender pkg/taylor

Konvertering fra LatLonToUTMXX og tilbage med UTMXYToLatLon med visning af evt difference

Filen to_mgrs.go anvender pkg/geoutm

Konvertering af lat lon til MGRS opg USNG

Dokumentation

Start dokumentationsserveren

    godoc -http=:8000

Dokumentationen findes under Third party

Documentation

Overview

Original Javascript by Chuck Taylor Port to Go by Jackie Brundtø

This is a simple port of the code on the Geographic/UTM Coordinate Converter (1) page from Javascript to Go. Using this you can easily pkg between UTM and WGS84 (latitude and longitude). Accuracy seems to be around 50cm (I suspect rounding errors are limiting precision). This code is provided as-is and has been minimally tested enjoy but use at your own risk! The license is the same as the original Javascript:

Directories

Path Synopsis
cmd
cities
Indlæsning af filen $HOME/geogrgafi/cites.csv og print til stdout
Indlæsning af filen $HOME/geogrgafi/cites.csv og print til stdout
utmabs
Read a csv formated file cities.csv and convert from MGRS to UTM
Read a csv formated file cities.csv and convert from MGRS to UTM
utmgeo
Read csv file cities.csv, convert from lat/lon to UTM and back again
Read csv file cities.csv, convert from lat/lon to UTM and back again
pkg
geoutm
Package geoutm (coordinate conversion) provides methods for converting coordinates between WGS84 Lon Lat, UTM and MGRS/UTMREF.
Package geoutm (coordinate conversion) provides methods for converting coordinates between WGS84 Lon Lat, UTM and MGRS/UTMREF.
taylor
Package taylor Port to Go by Jackie Brundtø
Package taylor Port to Go by Jackie Brundtø
utmabs
Package utmabs Conversion from MGRS to UTM
Package utmabs Conversion from MGRS to UTM

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL