Exemple #1
0
func geohashHandler(request *GEOConvertRequest, geohashstrval, oformat string) (interface{}, error) {
	var latlong *cartconvert.PolarCoord
	var err error
	if latlong, err = cartconvert.GeoHashToLatLong(geohashstrval, nil); err != nil {
		return nil, err
	}
	return serialize(latlong, oformat)
}
func BenchmarkThe42CartconvertDecode(b *testing.B) {
	for i := 0; i < b.N; i++ {
		_, err := the42_cartconvert_geohash.GeoHashToLatLong(testGeohash, the42_cartconvert_geohash.DefaultEllipsoid)
		if err != nil {
			b.Fatal(err)
		}
	}
}