Documentation ¶
Index ¶
- func Tile2Lat(y, z uint32) float64
- func Tile2Lon(x, z uint32) float64
- type BBox
- type Image
- func (img *Image) DrawShapePolygons(polygons []*ShapePolygon)
- func (img *Image) DrawWays(ways []*RichWay)
- func (img *Image) Init() error
- func (img *Image) PNG(filename string, resolution canvas.Resolution) error
- func (img *Image) PNGBytes() ([]byte, error)
- func (img *Image) SVG(filename string) error
- func (img *Image) SVGBytes() ([]byte, error)
- func (img *Image) TIFFBytes() ([]byte, error)
- type PBF
- type Point
- type RawPoint
- type RichWay
- type ShapePolygon
- type Shapefile
- func (shapefile *Shapefile) Clip(bbox *BBox) ([]*ShapePolygon, error)
- func (shapefile *Shapefile) GetPolygons() []*ShapePolygon
- func (shapefile *Shapefile) Iter(callback func(int, *shp.Polygon) error) error
- func (shapefile *Shapefile) Load() error
- func (shapefile *Shapefile) SaveClippedShapefile(filename string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BBox ¶
func GetTileBBox ¶
Adapted from: https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames
func (*BBox) ToGeoJSONStr ¶
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.
type ShapePolygon ¶
type ShapePolygon struct { Points []Point Raw interface{} }
type Shapefile ¶
type Shapefile struct { Filename string // contains filtered or unexported fields }
func (*Shapefile) GetPolygons ¶
func (shapefile *Shapefile) GetPolygons() []*ShapePolygon
GetPolygons just retruns the list of polygons that were captured from a shapefile.
func (*Shapefile) SaveClippedShapefile ¶
Click to show internal directories.
Click to hide internal directories.