sectr

所属分类:图形图象
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2022-10-01 13:20:26
上 传 者sh-1993
说明:  构建跨越两个给定轴承、中心点和半径之间的角度的圆形扇形多边形特征。一块披萨!
(Build a circular sector polygon feature spanning the angle between two given bearings, a center point and a radius. A pizza piece!)

文件列表:
.pre-commit-config.yaml (274, 2022-10-01)
go.mod (39, 2022-10-01)
sectr.go (3266, 2022-10-01)
sectr_test.go (4118, 2022-10-01)

# sectr Build a circular sector polygon feature (pizza piece ) spanning the angle between two given bearings, a radius and a center point. ## installation ``` go get -u github.com/iwpnd/sectr ``` ## usage Logo ```go package main import ( "fmt" "github.com/iwpnd/sectr" ) func main() { p := sectr.Point{Lat: 52.25, Lng: 13.37} sector := sectr.NewSector(p, 100, 0, 90) fmt.Printf("%s", sector.JSON()) } >> { "type": "Polygon", "coordinates": [ [ [13.37,52.25], [13.37,52.25089932], [13.37012803,52.2508959], [13.3702803,52.2508828], [13.37040491,52.25086448], [13.37055029,52.25083383], [13.37068965,52.25079405], [13.37080006,52.25075423], [13.37092446,52.2506989], [13.37103872,52.25063591], [13.3711253,52.25057807], [13.37121783,52.25050289], [13.37128479,52.25043599], [13.37135219,52.25035138], [13.37140478,52.25026293], [13.37143686,52.25018697], [13.37146091,52.250094], [13.37146896,52.24999999], [13.37,52.25] ] ] } ``` ## License MIT ## Acknowledgement [Chris Veness](https://github.com/chrisveness) for refreshing my university left-overs with this blog [moveable-type](https://www.movable-type.co.uk/scripts/latlong.html) ## Maintainer Benjamin Ramser - [@iwpnd](https://github.com/iwpnd) Project Link: [https://github.com/iwpnd/sectr](https://github.com/iwpnd/sectr)

近期下载者

相关文件


收藏者