Skip to content

earth-genome/mtgrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mtgrid

Go CI

This is an implementation of the ESA Major TOM equal area grid in Go.
This code is based on work in the ESA-PhiLab repository, specifically here

Usage:

Also see tests

package main

import (
    "github.com/earth-genome/mtgrid"
)

func main(){

	//create a simple polygon, this is 1/10th of a degree square
	p := orb.Polygon{{{0.0, 0.0},{0.0, 0.1},{0.1, 0.1},{0.1, 0.0},{0.0, 0.0}}}
	//instantiate a new grid with overlaps
    grid := NewGrid(320, true)
	//generate cells that cover the area
    cells, _ := grid.GenerateGridCells(&p)
		//do something with cells 
	for _, cell := range cells {
		fmt.Printf("cell id %s", cell.Id())
    }
}

Before: Before

After: After

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages