kml

package
v0.0.0-...-d241531 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	XMLName    xml.Name    `xml:"Document"`
	Name       string      `xml:"name"`
	StyleMaps  []StyleMap  `xml:"StyleMap"`
	Styles     []Style     `xml:"Style"`
	Placemarks []Placemark `xml:"Placemark"`
}

type KML

type KML struct {
	KMLBase
	XMLNSGX string `xml:"xmlns gx,attr"`
}

Different structure for marshalling/unmarshalling due to assymetry of namespace attributes decoding/encoding

func DecodeFile

func DecodeFile(fpath string) (kmlDoc KML, err error)

type KMLBase

type KMLBase struct {
	XMLName  xml.Name `xml:"kml"`
	XMLNS    string   `xml:"xmlns,attr"`
	Document Document `xml:"Document"`
}

type KMLOut

type KMLOut struct {
	KMLBase
	XMLNSGX string `xml:"xmlns:gx,attr"`
}

func Merge

func Merge(kdoc1, kdoc2 *KMLOut) *KMLOut

type Placemark

type Placemark struct {
	XMLName struct{} `xml:"Placemark"`
	Style   string   `xml:",innerxml"`
}

type Style

type Style struct {
	XMLName struct{} `xml:"Style"`
	ID      string   `xml:"id,attr"`
	Style   string   `xml:",innerxml"`
}

type StyleMap

type StyleMap struct {
	XMLName xml.Name `xml:"StyleMap"`
	ID      string   `xml:"id,attr"`
	Pair    string   `xml:",innerxml"`
}

Jump to

Keyboard shortcuts

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