Documentation ¶
Index ¶
- Constants
- func EnsureDirectoryExists(path string, label string) os.FileInfo
- func GetLineCentroid(ps *geo.PointSet) *geo.Point
- func GetPolygonCentroid(ps *geo.PointSet) *geo.Point
- func MemberType(t gosmparse.MemberType) string
- func TempFileName(prefix, suffix string) string
- func WayCentroid(refs []*gosmparse.Node) (float64, float64)
- type Bitmask
- type BitmaskMap
- type BufferedWriter
- type ChannelHandler
- type Channels
- type Condition
- type Config
- type FeatureSet
- type Group
- type Pattern
- type RelationAssembler
Constants ¶
const MAX_MEMBER_RELATIONS = 65535
maximum number of child relations a single relation can contain
Variables ¶
This section is empty.
Functions ¶
func EnsureDirectoryExists ¶
EnsureDirectoryExists - otherwise fatally fail
func GetLineCentroid ¶
func GetLineCentroid(ps *geo.PointSet) *geo.Point
GetLineCentroid - compute the centroid of a line string
func GetPolygonCentroid ¶
func GetPolygonCentroid(ps *geo.PointSet) *geo.Point
GetPolygonCentroid - compute the centroid of a polygon set using a spherical co-ordinate system
func MemberType ¶
func MemberType(t gosmparse.MemberType) string
MemberType - map numeric value to string
func TempFileName ¶
TempFileName generates a temporary filename for use in testing or whatever
Types ¶
type BitmaskMap ¶
BitmaskMap - struct to hold common masks
func (*BitmaskMap) ReadFrom ¶
func (m *BitmaskMap) ReadFrom(tap io.Reader) (int64, error)
ReadFrom - read from destination
func (*BitmaskMap) ReadFromFile ¶
func (m *BitmaskMap) ReadFromFile(path string)
ReadFromFile - read from disk
func (*BitmaskMap) WriteTo ¶
func (m *BitmaskMap) WriteTo(sink io.Writer) (int64, error)
WriteTo - write to destination
func (*BitmaskMap) WriteToFile ¶
func (m *BitmaskMap) WriteToFile(path string)
WriteToFile - write to disk
type BufferedWriter ¶
type BufferedWriter struct { Queue chan []byte // contains filtered or unexported fields }
BufferedWriter - buffered stdout writer with sync channel
func (*BufferedWriter) Close ¶
func (w *BufferedWriter) Close()
Close - close the channel and block until done
type ChannelHandler ¶
type ChannelHandler struct {
Channels Channels
}
ChannelHandler struct
func (*ChannelHandler) ReadNode ¶
func (h *ChannelHandler) ReadNode(n gosmparse.Node)
ReadNode - called once per node
func (*ChannelHandler) ReadRelation ¶
func (h *ChannelHandler) ReadRelation(r gosmparse.Relation)
ReadRelation - called once per relation
func (*ChannelHandler) ReadWay ¶
func (h *ChannelHandler) ReadWay(w gosmparse.Way)
ReadWay - called once per way
type Channels ¶
type Channels struct { Nodes chan gosmparse.Node Ways chan gosmparse.Way Relations chan gosmparse.Relation }
Channels struct
func NewChannels ¶
func NewChannels() Channels
NewChannels returns a new struct of channels @!todo: try return as *Channels
type FeatureSet ¶
FeatureSet struct
func NewFeatureSetFromJSON ¶
func NewFeatureSetFromJSON(path string) (*FeatureSet, error)
NewFeatureSetFromJSON - load a featureset from JSON
func (*FeatureSet) MatchNode ¶
func (fs *FeatureSet) MatchNode(n gosmparse.Node) bool
MatchNode - yes/no if any target feature matches this node
func (*FeatureSet) MatchRelation ¶
func (fs *FeatureSet) MatchRelation(r gosmparse.Relation) bool
MatchRelation - yes/no if any target feature matches this relation
type RelationAssembler ¶
type RelationAssembler struct { Relation *gosmparse.Relation Conn *leveldb.Connection }
RelationAssembler - struct to handle assembling relation dependencies
func (*RelationAssembler) GenerateJSON ¶
func (a *RelationAssembler) GenerateJSON() bytes.Buffer
GenerateJSON - generate a byte buffer of elements encoded in json, one-per-line