gis

package
v0.0.0-...-9050db6 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tile2Lat

func Tile2Lat(y, z uint32) float64

func Tile2Lon

func Tile2Lon(x, z uint32) float64

Types

type BBox

type BBox struct {
	SW Point
	NE Point
}

func (*BBox) ToGeoJSONStr

func (b *BBox) ToGeoJSONStr() ([]byte, error)

type Image

type Image struct {
	BBox   *BBox
	Width  float64
	Config *config.Config
	// contains filtered or unexported fields
}

func (*Image) DrawShapePolygons

func (img *Image) DrawShapePolygons(polygons []*ShapePolygon)

DrawShapePolygons draws polygons found in the land shapefile.

func (*Image) DrawWays

func (img *Image) DrawWays(ways []*RichWay)

func (*Image) Init

func (img *Image) Init() error

func (*Image) PNG

func (img *Image) PNG(filename string, resolution canvas.Resolution) error

func (*Image) PNGBytes

func (img *Image) PNGBytes() ([]byte, error)

func (*Image) SVG

func (img *Image) SVG(filename string) error

func (*Image) SVGBytes

func (img *Image) SVGBytes() ([]byte, error)

func (*Image) TIFFBytes

func (img *Image) TIFFBytes() ([]byte, error)

type PBF

type PBF struct {
	Verbose bool
	// contains filtered or unexported fields
}

func (*PBF) BBox

func (pbf *PBF) BBox() *BBox

func (*PBF) Init

func (pbf *PBF) Init()

func (*PBF) Load

func (pbf *PBF) Load(f io.Reader) error

func (*PBF) Relations

func (pbf *PBF) Relations() []*RichWay

func (*PBF) Ways

func (pbf *PBF) Ways() []*RichWay

type Point

type Point struct {
	Lat float64
	Lon float64
	X   float64
	Y   float64
}

type RawPoint

type RawPoint []float64

type RichWay

type RichWay struct {
	Way     *osm.Way
	NodeIDs []osm.NodeID
	Points  [][]Point
}

type ShapePolygon

type ShapePolygon struct {
	Points []Point
	Raw    interface{}
}

type Shapefile

type Shapefile struct {
	Filename string
	// contains filtered or unexported fields
}

func (*Shapefile) Clip

func (shapefile *Shapefile) Clip(bbox *BBox) ([]*ShapePolygon, error)

func (*Shapefile) GetPolygons

func (shapefile *Shapefile) GetPolygons() []*ShapePolygon

GetPolygons just retruns the list of polygons that were captured from a shapefile.

func (*Shapefile) Iter

func (shapefile *Shapefile) Iter(callback func(int, *shp.Polygon) error) error

func (*Shapefile) Load

func (shapefile *Shapefile) Load() error

func (*Shapefile) SaveClippedShapefile

func (shapefile *Shapefile) SaveClippedShapefile(filename string)

Jump to

Keyboard shortcuts

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