diff --git a/CHANGELOG.md b/CHANGELOG.md index b2116d17..19452747 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [1.16.2] - 2019-03-12 +### Fixes +- #432: Ignore SIGHUP signals (@abhit011) +- #433: Fixed nearby inaccuracy with geofence (@stcktrce) +- #429: Memory optimization, recycle AOF buffer +- 95a5556: Added periodic yielding to iterators (@rshura) + ## [1.16.1] - 2019-03-01 ### Fixes - #421: Nearby with MATCH is returning invalid results (@nithinkota) diff --git a/Gopkg.lock b/Gopkg.lock index 35f8807f..9b61cc43 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -250,7 +250,11 @@ version = "v1.0.2" [[projects]] +<<<<<<< HEAD digest = "1:ab5e0d19c706286deed5e6ec63a35ee0f2b92d7b9e97083eb67e5d2d76b4bfdb" +======= + digest = "1:cdab3bce90a53a124ac3982719abde77d779e961d9c180e55c23fb74fc62563a" +>>>>>>> master name = "github.com/tidwall/geojson" packages = [ ".", @@ -258,8 +262,13 @@ "geometry", ] pruneopts = "" +<<<<<<< HEAD revision = "f9500c7d3da6ce149bf80530c36b1a784dcd0f2b" version = "v1.1.1" +======= + revision = "eaf6e0a55a79c1e879bbbcc879a3176c720d99cd" + version = "v1.1.3" +>>>>>>> master [[projects]] digest = "1:eade4ea6782f5eed4a6b3138a648f9a332900650804fd206e5daaf99cc5613ea" diff --git a/Gopkg.toml b/Gopkg.toml index f5eaa215..0e64c307 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -37,7 +37,7 @@ required = [ [[constraint]] name = "github.com/tidwall/geojson" - version = "1.1.1" + version = "1.1.3" [[constraint]] name = "github.com/Shopify/sarama" diff --git a/README.md b/README.md index 774db1cd..4b1caf2c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

Slack Channel -Version +Version Build Status Docker Ready

diff --git a/build.sh b/build.sh index c0e46db7..a7396e24 100755 --- a/build.sh +++ b/build.sh @@ -4,7 +4,7 @@ set -e cd $(dirname "${BASH_SOURCE[0]}") OD="$(pwd)" -VERSION=1.16.1 +VERSION=1.16.2 PROTECTED_MODE="no" # Hardcode some values to the core package diff --git a/cmd/tile38-server/main.go b/cmd/tile38-server/main.go index 4d1e8f82..08c688cb 100644 --- a/cmd/tile38-server/main.go +++ b/cmd/tile38-server/main.go @@ -374,23 +374,25 @@ Developer Options: c := make(chan os.Signal, 1) signal.Notify(c, syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT) go func() { - s := <-c - log.Warnf("signal: %v", s) - if pidfile != "" { - pidcleanup() - } - pprofcleanup() - switch { - default: - os.Exit(-1) - case s == syscall.SIGHUP: - os.Exit(1) - case s == syscall.SIGINT: - os.Exit(2) - case s == syscall.SIGQUIT: - os.Exit(3) - case s == syscall.SIGTERM: - os.Exit(0xf) + for s := range c { + if s == syscall.SIGHUP { + continue + } + log.Warnf("signal: %v", s) + if pidfile != "" { + pidcleanup() + } + pprofcleanup() + switch { + default: + os.Exit(-1) + case s == syscall.SIGINT: + os.Exit(2) + case s == syscall.SIGQUIT: + os.Exit(3) + case s == syscall.SIGTERM: + os.Exit(0xf) + } } }() diff --git a/vendor/github.com/tidwall/geojson/circle.go b/vendor/github.com/tidwall/geojson/circle.go index 127dfe24..0d8ca6d1 100644 --- a/vendor/github.com/tidwall/geojson/circle.go +++ b/vendor/github.com/tidwall/geojson/circle.go @@ -99,6 +99,8 @@ func (g *Circle) Contains(obj Object) bool { switch other := obj.(type) { case *Point: return g.containsPoint(other.Center()) + case *SimplePoint: + return g.containsPoint(other.Center()) case *Circle: return other.Distance(g) < (other.meters + g.meters) case *LineString: @@ -244,8 +246,8 @@ func makeCircleObject(center geometry.Point, meters float64, steps int) Object { // generate the for th := 0.0; th <= 360.0; th += 360.0 / float64(steps) { radians := (math.Pi / 180) * th - x := center.X + lats*math.Cos(radians) - y := center.Y + lons*math.Sin(radians) + x := center.X + lons*math.Cos(radians) + y := center.Y + lats*math.Sin(radians) points = append(points, geometry.Point{X: x, Y: y}) } // add last connecting point, make a total of steps+1 diff --git a/vendor/github.com/tidwall/geojson/circle_test.go b/vendor/github.com/tidwall/geojson/circle_test.go index d72d0537..fac64a95 100644 --- a/vendor/github.com/tidwall/geojson/circle_test.go +++ b/vendor/github.com/tidwall/geojson/circle_test.go @@ -171,3 +171,11 @@ func TestCircleIntersects(t *testing.T) { // } // expect(t, true) //} + +func TestPointCircle(t *testing.T) { + p := NewPoint(geometry.Point{X: -0.8856761, Y: 52.7563759}) + c := NewCircle(geometry.Point{X: -0.8838196, Y: 52.7563395}, 200, 20) + if !p.Within(c) { + t.Fatal("expected true") + } +} diff --git a/vendor/github.com/tidwall/geojson/point.go b/vendor/github.com/tidwall/geojson/point.go index 19be1d52..55c4a375 100644 --- a/vendor/github.com/tidwall/geojson/point.go +++ b/vendor/github.com/tidwall/geojson/point.go @@ -95,6 +95,9 @@ func (g *Point) Contains(obj Object) bool { // Intersects ... func (g *Point) Intersects(obj Object) bool { + if obj, ok := obj.(*Circle); ok { + return obj.Contains(g) + } return obj.Spatial().IntersectsPoint(g.base) } diff --git a/vendor/github.com/tidwall/geojson/simplepoint.go b/vendor/github.com/tidwall/geojson/simplepoint.go index 8922c90e..8cbb0dc8 100644 --- a/vendor/github.com/tidwall/geojson/simplepoint.go +++ b/vendor/github.com/tidwall/geojson/simplepoint.go @@ -82,6 +82,9 @@ func (g *SimplePoint) Contains(obj Object) bool { // Intersects ... func (g *SimplePoint) Intersects(obj Object) bool { + if obj, ok := obj.(*Circle); ok { + return obj.Contains(g) + } return obj.Spatial().IntersectsPoint(g.base) }