Skip to content

Instantly share code, notes, and snippets.

View Alfex4936's full-sized avatar
🖥️
I star fun AI stuffs

seok Alfex4936

🖥️
I star fun AI stuffs
View GitHub Profile
@Alfex4936
Alfex4936 / wcongnamul.go
Created April 3, 2024 11:13
WGS84 coordinates to WCONGNAMUL (korea)
// ConvertWGS84ToWCONGNAMUL converts coordinates from WGS84 to WCONGNAMUL.
func ConvertWGS84ToWCONGNAMUL(lat, long float64) WCONGNAMULCoord {
x, y := transformWGS84ToKoreaTM(6378137, 0.0033528106647474805, 500000, 200000, 1, 38, 127, lat, long)
x = math.Round(x * 2.5)
y = math.Round(y * 2.5)
return WCONGNAMULCoord{X: x, Y: y}
}
// transformWGS84ToKoreaTM conversion
func transformWGS84ToKoreaTM(d, e, h, f, c, l, m, lat, lon float64) (float64, float64) {