初始
This commit is contained in:
		
							
								
								
									
										25
									
								
								api/v1/common/tool/proj/proj.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								api/v1/common/tool/proj/proj.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,25 @@ | ||||
| package proj | ||||
|  | ||||
| import ( | ||||
| 	_ "embed" | ||||
| 	"github.com/dop251/goja" | ||||
| ) | ||||
|  | ||||
| //go:embed proj4.js | ||||
| var proj4 string | ||||
|  | ||||
| var CGCS2000_to_WGS84 func(degrees int, cscs2000 [][]string) string | ||||
| var WGS84_to_CGCS2000 func(degrees int, wgs84 [][]string) string | ||||
|  | ||||
| func InitProj() { | ||||
| 	vm := goja.New() | ||||
| 	vm.RunString(proj4) | ||||
| 	vm.ExportTo(vm.Get("CGCS2000_to_WGS84"), &CGCS2000_to_WGS84) | ||||
| 	vm.ExportTo(vm.Get("WGS84_to_CGCS2000"), &WGS84_to_CGCS2000) | ||||
| 	//var ss [][]string | ||||
| 	//ss = append(ss, []string{ | ||||
| 	//	"106.545463204423", "23.467020901621", "805.6832", | ||||
| 	//}) | ||||
| 	//s := WGS84_to_CGCS2000(108, ss) | ||||
| 	//fmt.Println(s) | ||||
| } | ||||
							
								
								
									
										1994
									
								
								api/v1/common/tool/proj/proj4.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1994
									
								
								api/v1/common/tool/proj/proj4.js
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user