Documentation ¶
Index ¶
Constants ¶
View Source
const ( MultiPolygonType = "MultiPolygon" PolygonType = "Polygon" FeatureType = "Feature" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BoundaryFile ¶
type BoundaryFile struct { Type string `json:"type"` Features []*FeatureItem `json:"features"` }
func Revert ¶ added in v0.3.0
func Revert(input *pb.Timezones) *BoundaryFile
Revert could convert pb define data to GeoJSON format.
type FeatureItem ¶
type FeatureItem struct { Geometry GeometryDefine `json:"geometry"` Properties PropertiesDefine `json:"properties"` Type string `json:"type"` }
func RevertItem ¶ added in v0.3.0
func RevertItem(input *pb.Timezone) *FeatureItem
type GeometryDefine ¶ added in v0.3.0
type GeometryDefine struct { Coordinates interface{} `json:"coordinates"` Type string `json:"type"` }
type MultiPolygonCoordinates ¶
type MultiPolygonCoordinates []PolygonCoordinates
func FromPbPolygonToGeoMultipolygon ¶ added in v0.3.0
func FromPbPolygonToGeoMultipolygon(pbpoly []*pb.Polygon) MultiPolygonCoordinates
type PolygonCoordinates ¶
type PolygonCoordinates [][][2]float64
type PropertiesDefine ¶ added in v0.3.0
type PropertiesDefine struct {
Tzid string `json:"tzid"`
}
Click to show internal directories.
Click to hide internal directories.