tiles

package
v0.0.0-...-2b06aff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LayerBackground = Layer(0x00000000)
	LayerNature     = Layer(0x000000F0)
	LayerLanduse    = Layer(0x00000F00)
	LayerPlace      = Layer(0x0000F000)
	LayerAmenity    = Layer(0x000F0000)
	LayerRoad       = Layer(0x000FF000)
	LayerBuilding   = Layer(0x00F00000)
	LayerRoute      = Layer(0x0F000000)
	LayerBorder     = Layer(0x0F000000)
	LayerAero       = Layer(0xF0000000)
	LayerLabel      = Layer(0xFFFFFF00)
	LayerWatermark  = Layer(0xFFFFFFFF)
)

Variables

View Source
var (
	Clear = color.RGBA{R: 0xFF, G: 0xFF, B: 0xFF, A: 0xFF}

	// Red
	Red     = RgbHex("#f44336")
	Red50   = RgbHex("#ffebee")
	Red100  = RgbHex("#ffcdd2")
	Red200  = RgbHex("#ef9a9a")
	Red300  = RgbHex("#e57373")
	Red400  = RgbHex("#ef5350")
	Red500  = RgbHex("#f44336")
	Red600  = RgbHex("#e53935")
	Red700  = RgbHex("#d32f2f")
	Red800  = RgbHex("#c62828")
	Red900  = RgbHex("#b71c1c")
	RedA100 = RgbHex("#ff8a80")
	RedA200 = RgbHex("#ff5252")
	RedA400 = RgbHex("#ff1744")
	RedA700 = RgbHex("#d50000")

	// Pink
	Pink     = RgbHex("#e91e63")
	Pink50   = RgbHex("#fce4ec")
	Pink100  = RgbHex("#f8bbd0")
	Pink200  = RgbHex("#f48fb1")
	Pink300  = RgbHex("#f06292")
	Pink400  = RgbHex("#ec407a")
	Pink500  = RgbHex("#e91e63")
	Pink600  = RgbHex("#d81b60")
	Pink700  = RgbHex("#c2185b")
	Pink800  = RgbHex("#ad1457")
	Pink900  = RgbHex("#880e4f")
	PinkA100 = RgbHex("#ff80ab")
	PinkA200 = RgbHex("#ff4081")
	PinkA400 = RgbHex("#f50057")
	PinkA700 = RgbHex("#c51162")

	// Purple
	Purple     = RgbHex("#9c27b0")
	Purple50   = RgbHex("#f3e5f5")
	Purple100  = RgbHex("#e1bee7")
	Purple200  = RgbHex("#ce93d8")
	Purple300  = RgbHex("#ba68c8")
	Purple400  = RgbHex("#ab47bc")
	Purple500  = RgbHex("#9c27b0")
	Purple600  = RgbHex("#8e24aa")
	Purple700  = RgbHex("#7b1fa2")
	Purple800  = RgbHex("#6a1b9a")
	Purple900  = RgbHex("#4a148c")
	PurpleA100 = RgbHex("#ea80fc")
	PurpleA200 = RgbHex("#e040fb")
	PurpleA400 = RgbHex("#d500f9")
	PurpleA700 = RgbHex("#aa00ff")

	// DeepPurple
	DeepPurple     = RgbHex("#673ab7")
	DeepPurple50   = RgbHex("#ede7f6")
	DeepPurple100  = RgbHex("#d1c4e9")
	DeepPurple200  = RgbHex("#b39ddb")
	DeepPurple300  = RgbHex("#9575cd")
	DeepPurple400  = RgbHex("#7e57c2")
	DeepPurple500  = RgbHex("#673ab7")
	DeepPurple600  = RgbHex("#5e35b1")
	DeepPurple700  = RgbHex("#512da8")
	DeepPurple800  = RgbHex("#4527a0")
	DeepPurple900  = RgbHex("#311b92")
	DeepPurpleA100 = RgbHex("#b388ff")
	DeepPurpleA200 = RgbHex("#7c4dff")
	DeepPurpleA400 = RgbHex("#651fff")
	DeepPurpleA700 = RgbHex("#6200ea")

	// Indigo
	Indigo     = RgbHex("#3f51b5")
	Indigo50   = RgbHex("#e8eaf6")
	Indigo100  = RgbHex("#c5cae9")
	Indigo200  = RgbHex("#9fa8da")
	Indigo300  = RgbHex("#7986cb")
	Indigo400  = RgbHex("#5c6bc0")
	Indigo500  = RgbHex("#3f51b5")
	Indigo600  = RgbHex("#3949ab")
	Indigo700  = RgbHex("#303f9f")
	Indigo800  = RgbHex("#283593")
	Indigo900  = RgbHex("#1a237e")
	IndigoA100 = RgbHex("#8c9eff")
	IndigoA200 = RgbHex("#536dfe")
	IndigoA400 = RgbHex("#3d5afe")
	IndigoA700 = RgbHex("#304ffe")

	// Blue
	Blue     = RgbHex("#2196f3")
	Blue50   = RgbHex("#e3f2fd")
	Blue100  = RgbHex("#bbdefb")
	Blue200  = RgbHex("#90caf9")
	Blue300  = RgbHex("#64b5f6")
	Blue400  = RgbHex("#42a5f5")
	Blue500  = RgbHex("#2196f3")
	Blue600  = RgbHex("#1e88e5")
	Blue700  = RgbHex("#1976d2")
	Blue800  = RgbHex("#1565c0")
	Blue900  = RgbHex("#0d47a1")
	BlueA100 = RgbHex("#82b1ff")
	BlueA200 = RgbHex("#448aff")
	BlueA400 = RgbHex("#2979ff")
	BlueA700 = RgbHex("#2962ff")

	// LightBlue
	LightBlue     = RgbHex("#03a9f4")
	LightBlue50   = RgbHex("#e1f5fe")
	LightBlue100  = RgbHex("#b3e5fc")
	LightBlue200  = RgbHex("#81d4fa")
	LightBlue300  = RgbHex("#4fc3f7")
	LightBlue400  = RgbHex("#29b6f6")
	LightBlue500  = RgbHex("#03a9f4")
	LightBlue600  = RgbHex("#039be5")
	LightBlue700  = RgbHex("#0288d1")
	LightBlue800  = RgbHex("#0277bd")
	LightBlue900  = RgbHex("#01579b")
	LightBlueA100 = RgbHex("#80d8ff")
	LightBlueA200 = RgbHex("#40c4ff")
	LightBlueA400 = RgbHex("#00b0ff")
	LightBlueA700 = RgbHex("#0091ea")

	// Cyan
	Cyan     = RgbHex("#00bcd4")
	Cyan50   = RgbHex("#e0f7fa")
	Cyan100  = RgbHex("#b2ebf2")
	Cyan200  = RgbHex("#80deea")
	Cyan300  = RgbHex("#4dd0e1")
	Cyan400  = RgbHex("#26c6da")
	Cyan500  = RgbHex("#00bcd4")
	Cyan600  = RgbHex("#00acc1")
	Cyan700  = RgbHex("#0097a7")
	Cyan800  = RgbHex("#00838f")
	Cyan900  = RgbHex("#006064")
	CyanA100 = RgbHex("#84ffff")
	CyanA200 = RgbHex("#18ffff")
	CyanA400 = RgbHex("#00e5ff")
	CyanA700 = RgbHex("#00b8d4")

	// Teal
	Teal     = RgbHex("#009688")
	Teal50   = RgbHex("#e0f2f1")
	Teal100  = RgbHex("#b2dfdb")
	Teal200  = RgbHex("#80cbc4")
	Teal300  = RgbHex("#4db6ac")
	Teal400  = RgbHex("#26a69a")
	Teal500  = RgbHex("#009688")
	Teal600  = RgbHex("#00897b")
	Teal700  = RgbHex("#00796b")
	Teal800  = RgbHex("#00695c")
	Teal900  = RgbHex("#004d40")
	TealA100 = RgbHex("#a7ffeb")
	TealA200 = RgbHex("#64ffda")
	TealA400 = RgbHex("#1de9b6")
	TealA700 = RgbHex("#00bfa5")

	// Green
	Green     = RgbHex("#4caf50")
	Green50   = RgbHex("#e8f5e9")
	Green100  = RgbHex("#c8e6c9")
	Green200  = RgbHex("#a5d6a7")
	Green300  = RgbHex("#81c784")
	Green400  = RgbHex("#66bb6a")
	Green500  = RgbHex("#4caf50")
	Green600  = RgbHex("#43a047")
	Green700  = RgbHex("#388e3c")
	Green800  = RgbHex("#2e7d32")
	Green900  = RgbHex("#1b5e20")
	GreenA100 = RgbHex("#b9f6ca")
	GreenA200 = RgbHex("#69f0ae")
	GreenA400 = RgbHex("#00e676")
	GreenA700 = RgbHex("#00c853")

	// LightGreen
	LightGreen     = RgbHex("#8bc34a")
	LightGreen50   = RgbHex("#f1f8e9")
	LightGreen100  = RgbHex("#dcedc8")
	LightGreen200  = RgbHex("#c5e1a5")
	LightGreen300  = RgbHex("#aed581")
	LightGreen400  = RgbHex("#9ccc65")
	LightGreen500  = RgbHex("#8bc34a")
	LightGreen600  = RgbHex("#7cb342")
	LightGreen700  = RgbHex("#689f38")
	LightGreen800  = RgbHex("#558b2f")
	LightGreen900  = RgbHex("#33691e")
	LightGreenA100 = RgbHex("#ccff90")
	LightGreenA200 = RgbHex("#b2ff59")
	LightGreenA400 = RgbHex("#76ff03")
	LightGreenA700 = RgbHex("#64dd17")

	// Lime
	Lime     = RgbHex("#cddc39")
	Lime50   = RgbHex("#f9fbe7")
	Lime100  = RgbHex("#f0f4c3")
	Lime200  = RgbHex("#e6ee9c")
	Lime300  = RgbHex("#dce775")
	Lime400  = RgbHex("#d4e157")
	Lime500  = RgbHex("#cddc39")
	Lime600  = RgbHex("#c0ca33")
	Lime700  = RgbHex("#afb42b")
	Lime800  = RgbHex("#9e9d24")
	Lime900  = RgbHex("#827717")
	LimeA100 = RgbHex("#f4ff81")
	LimeA200 = RgbHex("#eeff41")
	LimeA400 = RgbHex("#c6ff00")
	LimeA700 = RgbHex("#aeea00")

	// Yellow
	Yellow     = RgbHex("#ffeb3b")
	Yellow50   = RgbHex("#fffde7")
	Yellow100  = RgbHex("#fff9c4")
	Yellow200  = RgbHex("#fff59d")
	Yellow300  = RgbHex("#fff176")
	Yellow400  = RgbHex("#ffee58")
	Yellow500  = RgbHex("#ffeb3b")
	Yellow600  = RgbHex("#fdd835")
	Yellow700  = RgbHex("#fbc02d")
	Yellow800  = RgbHex("#f9a825")
	Yellow900  = RgbHex("#f57f17")
	YellowA100 = RgbHex("#ffff8d")
	YellowA200 = RgbHex("#ffff00")
	YellowA400 = RgbHex("#ffea00")
	YellowA700 = RgbHex("#ffd600")

	// Amber
	Amber     = RgbHex("#ffc107")
	Amber50   = RgbHex("#fff8e1")
	Amber100  = RgbHex("#ffecb3")
	Amber200  = RgbHex("#ffe082")
	Amber300  = RgbHex("#ffd54f")
	Amber400  = RgbHex("#ffca28")
	Amber500  = RgbHex("#ffc107")
	Amber600  = RgbHex("#ffb300")
	Amber700  = RgbHex("#ffa000")
	Amber800  = RgbHex("#ff8f00")
	Amber900  = RgbHex("#ff6f00")
	AmberA100 = RgbHex("#ffe57f")
	AmberA200 = RgbHex("#ffd740")
	AmberA400 = RgbHex("#ffc400")
	AmberA700 = RgbHex("#ffab00")

	// Orange
	Orange     = RgbHex("#ff9800")
	Orange50   = RgbHex("#fff3e0")
	Orange100  = RgbHex("#ffe0b2")
	Orange200  = RgbHex("#ffcc80")
	Orange300  = RgbHex("#ffb74d")
	Orange400  = RgbHex("#ffa726")
	Orange500  = RgbHex("#ff9800")
	Orange600  = RgbHex("#fb8c00")
	Orange700  = RgbHex("#f57c00")
	Orange800  = RgbHex("#ef6c00")
	Orange900  = RgbHex("#e65100")
	OrangeA100 = RgbHex("#ffd180")
	OrangeA200 = RgbHex("#ffab40")
	OrangeA400 = RgbHex("#ff9100")
	OrangeA700 = RgbHex("#ff6d00")

	// DeepOrange
	DeppOrange     = RgbHex("#ff5722")
	DeppOrange50   = RgbHex("#fbe9e7")
	DeppOrange100  = RgbHex("#ffccbc")
	DeppOrange200  = RgbHex("#ffab91")
	DeppOrange300  = RgbHex("#ff8a65")
	DeppOrange400  = RgbHex("#ff7043")
	DeppOrange500  = RgbHex("#ff5722")
	DeppOrange600  = RgbHex("#f4511e")
	DeppOrange700  = RgbHex("#e64a19")
	DeppOrange800  = RgbHex("#d84315")
	DeppOrange900  = RgbHex("#bf360c")
	DeppOrangeA100 = RgbHex("#ff9e80")
	DeppOrangeA200 = RgbHex("#ff6e40")
	DeppOrangeA400 = RgbHex("#ff3d00")
	DeppOrangeA700 = RgbHex("#dd2c00")

	// Brown
	Brown     = RgbHex("#795548")
	Brown50   = RgbHex("#efebe9")
	Brown100  = RgbHex("#d7ccc8")
	Brown200  = RgbHex("#bcaaa4")
	Brown300  = RgbHex("#a1887f")
	Brown400  = RgbHex("#8d6e63")
	Brown500  = RgbHex("#795548")
	Brown600  = RgbHex("#6d4c41")
	Brown700  = RgbHex("#5d4037")
	Brown800  = RgbHex("#4e342e")
	Brown900  = RgbHex("#3e2723")
	BrownA100 = RgbHex("#d7ccc8")
	BrownA200 = RgbHex("#bcaaa4")
	BrownA400 = RgbHex("#8d6e63")
	BrownA700 = RgbHex("#5d4037")

	// Gray
	Gray     = RgbHex("#9e9e9e")
	Gray50   = RgbHex("#fafafa")
	Gray100  = RgbHex("#f5f5f5")
	Gray200  = RgbHex("#eeeeee")
	Gray300  = RgbHex("#e0e0e0")
	Gray400  = RgbHex("#bdbdbd")
	Gray500  = RgbHex("#9e9e9e")
	Gray600  = RgbHex("#757575")
	Gray700  = RgbHex("#616161")
	Gray800  = RgbHex("#424242")
	Gray900  = RgbHex("#212121")
	GrayA100 = RgbHex("#d5d5d5")
	GrayA200 = RgbHex("#aaaaaa")
	GrayA400 = RgbHex("#303030")
	GrayA700 = RgbHex("#616161")

	// BlueGray
	BlueGray     = RgbHex("#607d8b")
	BlueGray50   = RgbHex("#eceff1")
	BlueGray100  = RgbHex("#cfd8dc")
	BlueGray200  = RgbHex("#b0bec5")
	BlueGray300  = RgbHex("#90a4ae")
	BlueGray400  = RgbHex("#78909c")
	BlueGray500  = RgbHex("#607d8b")
	BlueGray600  = RgbHex("#546e7a")
	BlueGray700  = RgbHex("#455a64")
	BlueGray800  = RgbHex("#37474f")
	BlueGray900  = RgbHex("#263238")
	BlueGrayA100 = RgbHex("#cfd8dc")
	BlueGrayA200 = RgbHex("#b0bec5")
	BlueGrayA400 = RgbHex("#78909c")
	BlueGrayA700 = RgbHex("#455a64")
)

color hex codes from https://github.com/gaithoben/material-ui-colors/tree/master/src color table: https://materialui.co/colors/

View Source
var (
	Relation_MemberType_name = map[int32]string{
		0: "UNKNOWN",
		1: "NODE",
		2: "WAY",
		3: "RELATION",
		4: "BOUNDS",
	}
	Relation_MemberType_value = map[string]int32{
		"UNKNOWN":  0,
		"NODE":     1,
		"WAY":      2,
		"RELATION": 3,
		"BOUNDS":   4,
	}
)

Enum value maps for Relation_MemberType.

View Source
var (
	GetRequest_Type_name = map[int32]string{
		0: "UNKNOWN",
		1: "NODE",
		2: "WAY",
		3: "RELATION",
	}
	GetRequest_Type_value = map[string]int32{
		"UNKNOWN":  0,
		"NODE":     1,
		"WAY":      2,
		"RELATION": 3,
	}
)

Enum value maps for GetRequest_Type.

View Source
var (
	ScanRequest_Scope_name = map[int32]string{
		0: "UNKNOWN",
		1: "NODE",
		2: "WAY",
		3: "RELATION",
	}
	ScanRequest_Scope_value = map[string]int32{
		"UNKNOWN":  0,
		"NODE":     1,
		"WAY":      2,
		"RELATION": 3,
	}
)

Enum value maps for ScanRequest_Scope.

View Source
var File_tiles_proto protoreflect.FileDescriptor
View Source
var FontD2Coding *truetype.Font
View Source
var FontFaSolid900 *truetype.Font
View Source
var Tile_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Tile",
	HandlerType: (*TileServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Find",
			Handler:    _Tile_Find_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Tile_Get_Handler,
		},
		{
			MethodName: "Scan",
			Handler:    _Tile_Scan_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "tiles.proto",
}

Tile_ServiceDesc is the grpc.ServiceDesc for Tile service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func LayerCompareOrder

func LayerCompareOrder(lo Object, ro Object) bool

// true: z-order 아래로, false: z-order 위로

func RegisterTileServer

func RegisterTileServer(s grpc.ServiceRegistrar, srv TileServer)

func RgbHex

func RgbHex(str string) color.Color

func TilesToBounds

func TilesToBounds(x, y, z int) geom.Bound

Types

type CoordTransFunc

type CoordTransFunc func(coord geom.LatLon) (float64, float64)

type DefaultBuilder

type DefaultBuilder struct {
	// contains filtered or unexported fields
}

func (*DefaultBuilder) AddNodes

func (br *DefaultBuilder) AddNodes(nodes ...*Node)

func (*DefaultBuilder) AddRelations

func (br *DefaultBuilder) AddRelations(rels ...*Relation)

func (*DefaultBuilder) AddWays

func (br *DefaultBuilder) AddWays(ways ...*Way)

func (*DefaultBuilder) Build

func (br *DefaultBuilder) Build(ctx context.Context) (*Tile, error)

func (*DefaultBuilder) SetBuildLayerRange

func (br *DefaultBuilder) SetBuildLayerRange(start, end int)

func (*DefaultBuilder) SetHideLabels

func (br *DefaultBuilder) SetHideLabels(b bool)

func (*DefaultBuilder) SetTint

func (br *DefaultBuilder) SetTint(b bool)

func (*DefaultBuilder) SetVerbose

func (br *DefaultBuilder) SetVerbose(v bool)

func (*DefaultBuilder) SetWatermark

func (br *DefaultBuilder) SetWatermark(wm string)

type FindRequest

type FindRequest struct {
	MinLat float64 `protobuf:"fixed64,1,opt,name=minLat,proto3" json:"minLat,omitempty"`
	MinLon float64 `protobuf:"fixed64,2,opt,name=minLon,proto3" json:"minLon,omitempty"`
	MaxLat float64 `protobuf:"fixed64,3,opt,name=maxLat,proto3" json:"maxLat,omitempty"`
	MaxLon float64 `protobuf:"fixed64,4,opt,name=maxLon,proto3" json:"maxLon,omitempty"`
	// contains filtered or unexported fields
}

func (*FindRequest) Descriptor deprecated

func (*FindRequest) Descriptor() ([]byte, []int)

Deprecated: Use FindRequest.ProtoReflect.Descriptor instead.

func (*FindRequest) GetMaxLat

func (x *FindRequest) GetMaxLat() float64

func (*FindRequest) GetMaxLon

func (x *FindRequest) GetMaxLon() float64

func (*FindRequest) GetMinLat

func (x *FindRequest) GetMinLat() float64

func (*FindRequest) GetMinLon

func (x *FindRequest) GetMinLon() float64

func (*FindRequest) ProtoMessage

func (*FindRequest) ProtoMessage()

func (*FindRequest) ProtoReflect

func (x *FindRequest) ProtoReflect() protoreflect.Message

func (*FindRequest) Reset

func (x *FindRequest) Reset()

func (*FindRequest) String

func (x *FindRequest) String() string

type FindResponse

type FindResponse struct {
	Ways      []*Way      `protobuf:"bytes,1,rep,name=ways,proto3" json:"ways,omitempty"`
	Nodes     []*Node     `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`
	Relations []*Relation `protobuf:"bytes,3,rep,name=relations,proto3" json:"relations,omitempty"`
	Code      int32       `protobuf:"varint,8,opt,name=code,proto3" json:"code,omitempty"`
	Reason    string      `protobuf:"bytes,9,opt,name=reason,proto3" json:"reason,omitempty"`
	Elapsed   string      `protobuf:"bytes,10,opt,name=elapsed,proto3" json:"elapsed,omitempty"`
	// contains filtered or unexported fields
}

func (*FindResponse) Descriptor deprecated

func (*FindResponse) Descriptor() ([]byte, []int)

Deprecated: Use FindResponse.ProtoReflect.Descriptor instead.

func (*FindResponse) GetCode

func (x *FindResponse) GetCode() int32

func (*FindResponse) GetElapsed

func (x *FindResponse) GetElapsed() string

func (*FindResponse) GetNodes

func (x *FindResponse) GetNodes() []*Node

func (*FindResponse) GetReason

func (x *FindResponse) GetReason() string

func (*FindResponse) GetRelations

func (x *FindResponse) GetRelations() []*Relation

func (*FindResponse) GetWays

func (x *FindResponse) GetWays() []*Way

func (*FindResponse) ProtoMessage

func (*FindResponse) ProtoMessage()

func (*FindResponse) ProtoReflect

func (x *FindResponse) ProtoReflect() protoreflect.Message

func (*FindResponse) Reset

func (x *FindResponse) Reset()

func (*FindResponse) String

func (x *FindResponse) String() string

type GetRequest

type GetRequest struct {
	Type GetRequest_Type `protobuf:"varint,1,opt,name=type,proto3,enum=GetRequest_Type" json:"type,omitempty"`
	Id   int64           `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

func (*GetRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetId

func (x *GetRequest) GetId() int64

func (*GetRequest) GetType

func (x *GetRequest) GetType() GetRequest_Type

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

func (x *GetRequest) ProtoReflect() protoreflect.Message

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetRequest_Type

type GetRequest_Type int32
const (
	GetRequest_UNKNOWN  GetRequest_Type = 0
	GetRequest_NODE     GetRequest_Type = 1
	GetRequest_WAY      GetRequest_Type = 2
	GetRequest_RELATION GetRequest_Type = 3
)

func (GetRequest_Type) Descriptor

func (GetRequest_Type) Enum

func (x GetRequest_Type) Enum() *GetRequest_Type

func (GetRequest_Type) EnumDescriptor deprecated

func (GetRequest_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use GetRequest_Type.Descriptor instead.

func (GetRequest_Type) Number

func (GetRequest_Type) String

func (x GetRequest_Type) String() string

func (GetRequest_Type) Type

type GetResponse

type GetResponse struct {
	Node     *Node     `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	Way      *Way      `protobuf:"bytes,2,opt,name=way,proto3" json:"way,omitempty"`
	Relation *Relation `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"`
	Elapsed  string    `protobuf:"bytes,10,opt,name=elapsed,proto3" json:"elapsed,omitempty"`
	// contains filtered or unexported fields
}

func (*GetResponse) Descriptor deprecated

func (*GetResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetElapsed

func (x *GetResponse) GetElapsed() string

func (*GetResponse) GetNode

func (x *GetResponse) GetNode() *Node

func (*GetResponse) GetRelation

func (x *GetResponse) GetRelation() *Relation

func (*GetResponse) GetWay

func (x *GetResponse) GetWay() *Way

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

func (x *GetResponse) ProtoReflect() protoreflect.Message

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type Icon

type Icon interface {
	Draw(dc *gg.Context, x, y, size float64)
	DrawAnchored(dc *gg.Context, x, y, size, ax, ay float64)
}

type Label

type Label struct {
	// contains filtered or unexported fields
}

func (*Label) DistanceFrom

func (label *Label) DistanceFrom(from geom.LatLon) float64

func (*Label) Draw

func (label *Label) Draw(dc *gg.Context, transCoord CoordTransFunc)

func (*Label) Layer

func (label *Label) Layer() Layer

func (*Label) SourceInfo

func (label *Label) SourceInfo() string

func (*Label) Visible

func (label *Label) Visible(zoom int) bool

type Layer

type Layer = int

type MultiPolygonObject

type MultiPolygonObject struct {
	// contains filtered or unexported fields
}

#region MultiPolygonObject

func (*MultiPolygonObject) Area

func (mp *MultiPolygonObject) Area() float64

func (*MultiPolygonObject) DistanceFrom

func (obj *MultiPolygonObject) DistanceFrom(from geom.LatLon) float64

func (*MultiPolygonObject) Draw

func (mp *MultiPolygonObject) Draw(dc *gg.Context, transCoord CoordTransFunc)

func (*MultiPolygonObject) Layer

func (mp *MultiPolygonObject) Layer() Layer

func (*MultiPolygonObject) SourceInfo

func (mp *MultiPolygonObject) SourceInfo() string

func (*MultiPolygonObject) Visible

func (obj *MultiPolygonObject) Visible(zoom int) bool

type Node

type Node struct {
	Id   int64             `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Tags map[string]string `` /* 149-byte string literal not displayed */
	Lat  float64           `protobuf:"fixed64,8,opt,name=lat,proto3" json:"lat,omitempty"`
	Lon  float64           `protobuf:"fixed64,9,opt,name=lon,proto3" json:"lon,omitempty"`
	// contains filtered or unexported fields
}

func (*Node) Descriptor deprecated

func (*Node) Descriptor() ([]byte, []int)

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) FindTag

func (n *Node) FindTag(key string) string

func (*Node) GetId

func (x *Node) GetId() int64

func (*Node) GetLat

func (x *Node) GetLat() float64

func (*Node) GetLon

func (x *Node) GetLon() float64

func (*Node) GetTags

func (x *Node) GetTags() map[string]string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

func (x *Node) ProtoReflect() protoreflect.Message

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

type Object

type Object interface {
	Draw(dc *gg.Context, coordTrans CoordTransFunc)
	// returns euclidean distance from 'from' coordinates
	DistanceFrom(from geom.LatLon) float64
	Layer() Layer
	SourceInfo() string
	Visible(zoom int) bool
}

type PolygonObject

type PolygonObject struct {
	// contains filtered or unexported fields
}

#region PolygonObject

func (*PolygonObject) Area

func (obj *PolygonObject) Area() float64

func (*PolygonObject) DistanceFrom

func (obj *PolygonObject) DistanceFrom(from geom.LatLon) float64

func (*PolygonObject) Draw

func (obj *PolygonObject) Draw(dc *gg.Context, transCoord CoordTransFunc)

func (*PolygonObject) Layer

func (obj *PolygonObject) Layer() int

func (*PolygonObject) SetLayer

func (obj *PolygonObject) SetLayer(l Layer)

func (*PolygonObject) SourceInfo

func (obj *PolygonObject) SourceInfo() string

func (*PolygonObject) Visible

func (obj *PolygonObject) Visible(zoom int) bool

type Relation

type Relation struct {
	Id      int64              `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Tags    map[string]string  `` /* 149-byte string literal not displayed */
	MinLat  float64            `protobuf:"fixed64,5,opt,name=minLat,proto3" json:"minLat,omitempty"`
	MinLon  float64            `protobuf:"fixed64,6,opt,name=minLon,proto3" json:"minLon,omitempty"`
	MaxLat  float64            `protobuf:"fixed64,7,opt,name=maxLat,proto3" json:"maxLat,omitempty"`
	MaxLon  float64            `protobuf:"fixed64,8,opt,name=maxLon,proto3" json:"maxLon,omitempty"`
	Members []*Relation_Member `protobuf:"bytes,9,rep,name=members,proto3" json:"members,omitempty"`
	// contains filtered or unexported fields
}

func (*Relation) Descriptor deprecated

func (*Relation) Descriptor() ([]byte, []int)

Deprecated: Use Relation.ProtoReflect.Descriptor instead.

func (*Relation) FindTag

func (r *Relation) FindTag(key string) string

func (*Relation) GetId

func (x *Relation) GetId() int64

func (*Relation) GetMaxLat

func (x *Relation) GetMaxLat() float64

func (*Relation) GetMaxLon

func (x *Relation) GetMaxLon() float64

func (*Relation) GetMembers

func (x *Relation) GetMembers() []*Relation_Member

func (*Relation) GetMinLat

func (x *Relation) GetMinLat() float64

func (*Relation) GetMinLon

func (x *Relation) GetMinLon() float64

func (*Relation) GetTags

func (x *Relation) GetTags() map[string]string

func (*Relation) ProtoMessage

func (*Relation) ProtoMessage()

func (*Relation) ProtoReflect

func (x *Relation) ProtoReflect() protoreflect.Message

func (*Relation) Reset

func (x *Relation) Reset()

func (*Relation) String

func (x *Relation) String() string

type Relation_Member

type Relation_Member struct {
	Id   int64               `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Type Relation_MemberType `protobuf:"varint,2,opt,name=type,proto3,enum=Relation_MemberType" json:"type,omitempty"`
	Role string              `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*Relation_Member) Descriptor deprecated

func (*Relation_Member) Descriptor() ([]byte, []int)

Deprecated: Use Relation_Member.ProtoReflect.Descriptor instead.

func (*Relation_Member) GetId

func (x *Relation_Member) GetId() int64

func (*Relation_Member) GetRole

func (x *Relation_Member) GetRole() string

func (*Relation_Member) GetType

func (x *Relation_Member) GetType() Relation_MemberType

func (*Relation_Member) ProtoMessage

func (*Relation_Member) ProtoMessage()

func (*Relation_Member) ProtoReflect

func (x *Relation_Member) ProtoReflect() protoreflect.Message

func (*Relation_Member) Reset

func (x *Relation_Member) Reset()

func (*Relation_Member) String

func (x *Relation_Member) String() string

type Relation_MemberType

type Relation_MemberType int32
const (
	Relation_UNKNOWN  Relation_MemberType = 0
	Relation_NODE     Relation_MemberType = 1
	Relation_WAY      Relation_MemberType = 2
	Relation_RELATION Relation_MemberType = 3
	Relation_BOUNDS   Relation_MemberType = 4
)

func RelationMemberType

func RelationMemberType(t osm.Type) Relation_MemberType

func (Relation_MemberType) Descriptor

func (Relation_MemberType) Enum

func (Relation_MemberType) EnumDescriptor deprecated

func (Relation_MemberType) EnumDescriptor() ([]byte, []int)

Deprecated: Use Relation_MemberType.Descriptor instead.

func (Relation_MemberType) Number

func (Relation_MemberType) String

func (x Relation_MemberType) String() string

func (Relation_MemberType) Type

type ScanRequest

type ScanRequest struct {
	Scope   ScanRequest_Scope `protobuf:"varint,1,opt,name=scope,proto3,enum=ScanRequest_Scope" json:"scope,omitempty"`
	Tag     string            `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"`
	Keyword string            `protobuf:"bytes,3,opt,name=keyword,proto3" json:"keyword,omitempty"`
	// contains filtered or unexported fields
}

func (*ScanRequest) Descriptor deprecated

func (*ScanRequest) Descriptor() ([]byte, []int)

Deprecated: Use ScanRequest.ProtoReflect.Descriptor instead.

func (*ScanRequest) GetKeyword

func (x *ScanRequest) GetKeyword() string

func (*ScanRequest) GetScope

func (x *ScanRequest) GetScope() ScanRequest_Scope

func (*ScanRequest) GetTag

func (x *ScanRequest) GetTag() string

func (*ScanRequest) ProtoMessage

func (*ScanRequest) ProtoMessage()

func (*ScanRequest) ProtoReflect

func (x *ScanRequest) ProtoReflect() protoreflect.Message

func (*ScanRequest) Reset

func (x *ScanRequest) Reset()

func (*ScanRequest) String

func (x *ScanRequest) String() string

type ScanRequest_Scope

type ScanRequest_Scope int32
const (
	ScanRequest_UNKNOWN  ScanRequest_Scope = 0
	ScanRequest_NODE     ScanRequest_Scope = 1
	ScanRequest_WAY      ScanRequest_Scope = 2
	ScanRequest_RELATION ScanRequest_Scope = 3
)

func (ScanRequest_Scope) Descriptor

func (ScanRequest_Scope) Enum

func (ScanRequest_Scope) EnumDescriptor deprecated

func (ScanRequest_Scope) EnumDescriptor() ([]byte, []int)

Deprecated: Use ScanRequest_Scope.Descriptor instead.

func (ScanRequest_Scope) Number

func (ScanRequest_Scope) String

func (x ScanRequest_Scope) String() string

func (ScanRequest_Scope) Type

type ScanResponse

type ScanResponse struct {
	Nodes     []*Node     `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
	Ways      []*Way      `protobuf:"bytes,2,rep,name=ways,proto3" json:"ways,omitempty"`
	Relations []*Relation `protobuf:"bytes,3,rep,name=relations,proto3" json:"relations,omitempty"`
	Elapsed   string      `protobuf:"bytes,10,opt,name=elapsed,proto3" json:"elapsed,omitempty"`
	// contains filtered or unexported fields
}

func (*ScanResponse) Descriptor deprecated

func (*ScanResponse) Descriptor() ([]byte, []int)

Deprecated: Use ScanResponse.ProtoReflect.Descriptor instead.

func (*ScanResponse) GetElapsed

func (x *ScanResponse) GetElapsed() string

func (*ScanResponse) GetNodes

func (x *ScanResponse) GetNodes() []*Node

func (*ScanResponse) GetRelations

func (x *ScanResponse) GetRelations() []*Relation

func (*ScanResponse) GetWays

func (x *ScanResponse) GetWays() []*Way

func (*ScanResponse) ProtoMessage

func (*ScanResponse) ProtoMessage()

func (*ScanResponse) ProtoReflect

func (x *ScanResponse) ProtoReflect() protoreflect.Message

func (*ScanResponse) Reset

func (x *ScanResponse) Reset()

func (*ScanResponse) String

func (x *ScanResponse) String() string

type Style

type Style struct {
	FillColor       color.Color
	LineColor       color.Color
	LineWidth       float64
	LineDash        []float64
	MarkerColor     color.Color
	Marker          Icon
	MarkerZoomLimit int
	BaseLayer       Layer
}

func (*Style) MarkerVisible

func (s *Style) MarkerVisible(zoom int) bool

type StyleFunc

type StyleFunc func(style *Style, p *StyleParam)

type StyleParam

type StyleParam struct {
	Tags   map[string]string
	Closed bool
}

type Tile

type Tile struct {
	// contains filtered or unexported fields
}

func (*Tile) AddWatermark

func (t *Tile) AddWatermark(text string, tint bool)

func (*Tile) CountObjects

func (t *Tile) CountObjects() int

func (*Tile) EncodePNG

func (t *Tile) EncodePNG(writer io.Writer) error

type TileBackground

type TileBackground struct {
	// contains filtered or unexported fields
}

func (*TileBackground) DistanceFrom

func (label *TileBackground) DistanceFrom(from geom.LatLon) float64

func (*TileBackground) Draw

func (t *TileBackground) Draw(dc *gg.Context, transCoord CoordTransFunc)

func (*TileBackground) Layer

func (t *TileBackground) Layer() Layer

func (*TileBackground) SourceInfo

func (t *TileBackground) SourceInfo() string

func (*TileBackground) Visible

func (t *TileBackground) Visible(zoom int) bool

type TileBuilder

type TileBuilder interface {
	AddWays(ways ...*Way)
	AddNodes(nodes ...*Node)
	AddRelations(rels ...*Relation)
	Build(ctx context.Context) (*Tile, error)
	SetBuildLayerRange(start, end int)
	SetHideLabels(bool)
	SetVerbose(bool)
	SetWatermark(string)
	SetTint(bool)
}

func NewBuilder

func NewBuilder(x, y, z int) TileBuilder

func NewBuilderBounds

func NewBuilderBounds(bounds geom.Bound, outputWidth, outputHeight float64) TileBuilder

type TileClient

type TileClient interface {
	Find(ctx context.Context, in *FindRequest, opts ...grpc.CallOption) (*FindResponse, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	Scan(ctx context.Context, in *ScanRequest, opts ...grpc.CallOption) (*ScanResponse, error)
}

TileClient is the client API for Tile service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewTileClient

func NewTileClient(cc grpc.ClientConnInterface) TileClient

type TileServer

type TileServer interface {
	Find(context.Context, *FindRequest) (*FindResponse, error)
	Get(context.Context, *GetRequest) (*GetResponse, error)
	Scan(context.Context, *ScanRequest) (*ScanResponse, error)
	// contains filtered or unexported methods
}

TileServer is the server API for Tile service. All implementations must embed UnimplementedTileServer for forward compatibility

type UnimplementedTileServer

type UnimplementedTileServer struct {
}

UnimplementedTileServer must be embedded to have forward compatible implementations.

func (UnimplementedTileServer) Find

func (UnimplementedTileServer) Get

func (UnimplementedTileServer) Scan

type UnsafeTileServer

type UnsafeTileServer interface {
	// contains filtered or unexported methods
}

UnsafeTileServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TileServer will result in compilation errors.

type Watermark

type Watermark struct {
	// contains filtered or unexported fields
}

func (*Watermark) DistanceFrom

func (label *Watermark) DistanceFrom(from geom.LatLon) float64

func (*Watermark) Draw

func (wm *Watermark) Draw(dc *gg.Context, transCoord CoordTransFunc)

func (*Watermark) Layer

func (wm *Watermark) Layer() Layer

func (*Watermark) SourceInfo

func (wm *Watermark) SourceInfo() string

func (*Watermark) Visible

func (wm *Watermark) Visible(zoom int) bool

type Way

type Way struct {
	Id     int64             `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Tags   map[string]string `` /* 149-byte string literal not displayed */
	MinLat float64           `protobuf:"fixed64,5,opt,name=minLat,proto3" json:"minLat,omitempty"`
	MinLon float64           `protobuf:"fixed64,6,opt,name=minLon,proto3" json:"minLon,omitempty"`
	MaxLat float64           `protobuf:"fixed64,7,opt,name=maxLat,proto3" json:"maxLat,omitempty"`
	MaxLon float64           `protobuf:"fixed64,8,opt,name=maxLon,proto3" json:"maxLon,omitempty"`
	Nodes  []*Way_NodeRef    `protobuf:"bytes,9,rep,name=nodes,proto3" json:"nodes,omitempty"`
	// contains filtered or unexported fields
}

func (*Way) Descriptor deprecated

func (*Way) Descriptor() ([]byte, []int)

Deprecated: Use Way.ProtoReflect.Descriptor instead.

func (*Way) FindTag

func (w *Way) FindTag(key string) string

func (*Way) GetId

func (x *Way) GetId() int64

func (*Way) GetMaxLat

func (x *Way) GetMaxLat() float64

func (*Way) GetMaxLon

func (x *Way) GetMaxLon() float64

func (*Way) GetMinLat

func (x *Way) GetMinLat() float64

func (*Way) GetMinLon

func (x *Way) GetMinLon() float64

func (*Way) GetNodes

func (x *Way) GetNodes() []*Way_NodeRef

func (*Way) GetTags

func (x *Way) GetTags() map[string]string

func (*Way) ProtoMessage

func (*Way) ProtoMessage()

func (*Way) ProtoReflect

func (x *Way) ProtoReflect() protoreflect.Message

func (*Way) Reset

func (x *Way) Reset()

func (*Way) String

func (x *Way) String() string

type Way_NodeRef

type Way_NodeRef struct {
	Id  int64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Lat float64 `protobuf:"fixed64,8,opt,name=lat,proto3" json:"lat,omitempty"`
	Lon float64 `protobuf:"fixed64,9,opt,name=lon,proto3" json:"lon,omitempty"`
	// contains filtered or unexported fields
}

func (*Way_NodeRef) Descriptor deprecated

func (*Way_NodeRef) Descriptor() ([]byte, []int)

Deprecated: Use Way_NodeRef.ProtoReflect.Descriptor instead.

func (*Way_NodeRef) GetId

func (x *Way_NodeRef) GetId() int64

func (*Way_NodeRef) GetLat

func (x *Way_NodeRef) GetLat() float64

func (*Way_NodeRef) GetLon

func (x *Way_NodeRef) GetLon() float64

func (*Way_NodeRef) ProtoMessage

func (*Way_NodeRef) ProtoMessage()

func (*Way_NodeRef) ProtoReflect

func (x *Way_NodeRef) ProtoReflect() protoreflect.Message

func (*Way_NodeRef) Reset

func (x *Way_NodeRef) Reset()

func (*Way_NodeRef) String

func (x *Way_NodeRef) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL