Help us shape the future of Go! Take the 2026 Go Developer Survey

globo

command module
v0.0.0-...-5e76d58 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

README

           _.-,=_"""--,_
        .-" =/7"   _  .3#"=.
      ,#7  " "  ,//)#d#######=.
    ,/ "      # ,i-/###########=
   /         _)#sm###=#=# #######\
  /         (#/"_`;\//#=#\-#######\
 /         ,d####-_.._.)##P########\
,        ,"############\\##bi- `\| Y.
|       .d##############b\##P'   V  |
|\      '#################!",       |
|C.       \###=############7        |
'###.           )#########/         '
 \#(             \#######|         /
  \B             /#######7 /      /
   \             \######" /"     /
    `.            \###7'       ,'
      "-_          `"'      ,-'
         "-._           _.-"
             """"---""""

GLOBO

Globo is a microservice that makes it easy to convert from lat/long to google's s2 formats.

Endpoints

tos2/point

Takes a json body that looks like this:

{
	"lat":55.00,
	"lng":55.00
}

And returns

{
    "cellid": 4890663957615284359
}

If the optional field "precision" is specified then the parent cellid with level == precision is returned.

tos2/geojson/:type

Converts a geojson :type to a collection of s2 cellIds (with the request precision/ maxnumber) + bounding box, and returns a geojson feature collection that can be displayed

Values accepted for :type: :

  • point
  • polygon
  • multipolygon

Query parameters:

  • precision integer specifies how precise the generated cellids should be, default max precision.

Note: if the any of the polygons are not CCW winded, we refuse to convert them. i.e. it's the client responsablity to send proper json.

install and build

export PORT=3001 #or wathever
go build && ./globo 

Dependecies are vendored thus requre GOVENDOREXPERIMENT=1 or go 1.6.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package counts handles a multipolygon requests and returns the event counts inside the polygon in the current time range.
Package counts handles a multipolygon requests and returns the event counts inside the polygon in the current time range.
Package geoJSON converts geoJSON TO s2 2016 giulio <giulioungaretti@me.com> Package geoJSON converts geoJSON TO s2 and back to GeoJSON this is mostly an endpoint to visualize the simplifications
Package geoJSON converts geoJSON TO s2 2016 giulio <giulioungaretti@me.com> Package geoJSON converts geoJSON TO s2 and back to GeoJSON this is mostly an endpoint to visualize the simplifications

Jump to

Keyboard shortcuts

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