8000 GitHub - murphy214/tile-cover: A simple tile-cover implementation for getting tiles of a given feature.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

murphy214/tile-cover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tile-cover

Keep it simple stupid. Given a geojson feature, and a zoom return all the tiles that have an intersection. The old one tried to determine the zoom for you this one skips that.

Usage

package main

import (
	"github.com/paulmach/go.geojson"
	"io/ioutil"
	"fmt"
	"github.com/murphy214/tile-cover"
	m "github.com/murphy214/mercantile"

)

func main() {
	bytevals,_ := ioutil.ReadFile("states.geojson")
	fc, _ := geojson.UnmarshalFeatureCollection(bytevals)
	feat := fc.Features[20]

	tileids := tile_cover.TileCover(feat,10)
	for _,i := range tileids {
		fmt.Println(m.Tilestr(i))
	}
}

Output

About

A simple tile-cover implementation for getting tiles of a given feature.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0