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 ¶
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 ¶
func RevertItem(input *pb.Timezone) *FeatureItem
type GeometryDefine ¶
type GeometryDefine struct {
Coordinates interface{} `json:"coordinates"`
Type string `json:"type"`
}
type MultiPolygonCoordinates ¶
type MultiPolygonCoordinates []PolygonCoordinates
func FromPbPolygonToGeoMultipolygon ¶
func FromPbPolygonToGeoMultipolygon(pbpoly []*pb.Polygon) MultiPolygonCoordinates
type PolygonCoordinates ¶
type PolygonCoordinates [][][2]float64
type PropertiesDefine ¶
type PropertiesDefine struct {
Tzid string `json:"tzid"`
}
Click to show internal directories.
Click to hide internal directories.