Documentation ¶
Index ¶
- Variables
- func Latest() (names []string, err error)
- func Mirrors(name string) (mirrors []string, err error)
- type Block
- func (b Block) DataKind() DataKind
- func (b Block) NodeAt(index int) Node
- func (b Block) NumNodes() int
- func (b Block) NumRelations() int
- func (b Block) NumStrings() int
- func (b Block) NumWays() int
- func (b Block) RelationAt(index int) Relation
- func (b Block) StringAt(index int) string
- func (b Block) WayAt(index int) Way
- type BlockReader
- type DataKind
- type DownloadStatus
- type Downloader
- type Node
- type Relation
- type Way
- type What
Constants ¶
This section is empty.
Variables ¶
View Source
var AllMirrors = []string{
"https://ftp.spline.de/pub/openstreetmap/pbf/",
"https://ftp5.gwdg.de/pub/misc/openstreetmap/planet.openstreetmap.org/pbf/",
"https://ftp.fau.de/osm-planet/pbf/",
"https://free.nchc.org.tw/osm.planet/pbf/",
"https://ftpmirror.your.org/pub/openstreetmap/pbf/",
"https://download.bbbike.org/osm/planet/",
"https://ftp.nluug.nl/maps/planet.openstreetmap.org/pbf/",
"https://ftp.osuosl.org/pub/openstreetmap/pbf/",
"https://planet.passportcontrol.net/pbf/",
"https://planet.osm-hr.org/pbf/",
}
AllMirrors are a list of all known mirrors
Functions ¶
Types ¶
type BlockReader ¶
type BlockReader struct {
// contains filtered or unexported fields
}
BlockReader is a reader for reading OSMData blocks from an OSM Planet protobuf file.
func NewBlockReader ¶
func NewBlockReader(r io.Reader) *BlockReader
NewBlockReader returns a reader for reading OSMData blocks from an OSM Planet protobuf file.
func (*BlockReader) ReadBlock ¶
func (r *BlockReader) ReadBlock() (n int, block Block, err error)
ReadBlock reads the next OSMData block. Returns the number of bytes read and the block.
func (*BlockReader) SkipBlock ¶
func (r *BlockReader) SkipBlock() (n int, err error)
SkipBlock skips over the next block. Like ReadBlock but faster.
type DownloadStatus ¶
DownloadStatus ...
type Downloader ¶
type Downloader interface { Error() error Status() DownloadStatus Reader() io.ReadCloser Stop() }
Downloader ...
func Download ¶
func Download(planetURL string, path string) Downloader
Download the OSM planet file into the provide file path.
type Relation ¶
type Relation struct {
// contains filtered or unexported fields
}
Relation ..
Click to show internal directories.
Click to hide internal directories.