Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
update vendor deps
Browse files Browse the repository at this point in the history
  • Loading branch information
sfomuseumbot committed Dec 17, 2022
1 parent fc516d9 commit 56fe360
Show file tree
Hide file tree
Showing 37 changed files with 1,931 additions and 351 deletions.
26 changes: 0 additions & 26 deletions database.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/whosonfirst/go-whosonfirst-spatial"
"github.com/whosonfirst/go-whosonfirst-spatial/database"
"github.com/whosonfirst/go-whosonfirst-spatial/filter"
"github.com/whosonfirst/go-whosonfirst-spatial/timer"
"github.com/whosonfirst/go-whosonfirst-spr/v2"
"github.com/whosonfirst/go-whosonfirst-uri"
"io"
Expand All @@ -44,7 +43,6 @@ type RTreeCache struct {
type RTreeSpatialDatabase struct {
database.SpatialDatabase
Logger *log.Logger
Timer *timer.Timer
index_alt_files bool
rtree *rtreego.Rtree
gocache *gocache.Cache
Expand Down Expand Up @@ -140,11 +138,8 @@ func NewRTreeSpatialDatabase(ctx context.Context, uri string) (database.SpatialD

mu := new(sync.RWMutex)

t := timer.NewTimer()

db := &RTreeSpatialDatabase{
Logger: logger,
Timer: t,
rtree: rtree,
index_alt_files: index_alt_files,
gocache: gc,
Expand Down Expand Up @@ -462,9 +457,6 @@ func (r *RTreeSpatialDatabase) getIntersectsByCoord(coord *orb.Point) ([]rtreego

func (r *RTreeSpatialDatabase) getIntersectsByRect(rect *rtreego.Rect) ([]rtreego.Spatial, error) {

// to do: timings that don't slow everything down the way
// go-whosonfirst-timer does now (20170915/thisisaaronland)

results := r.rtree.SearchIntersect(rect)
return results, nil
}
Expand All @@ -486,12 +478,6 @@ func (r *RTreeSpatialDatabase) inflateResultsWithChannels(ctx context.Context, r
sp_id := sp.Id
feature_id := sp.FeatureId

t1 := time.Now()

defer func() {
r.Timer.Add(ctx, sp_id, "time to inflate", time.Since(t1))
}()

defer wg.Done()

select {
Expand All @@ -513,21 +499,15 @@ func (r *RTreeSpatialDatabase) inflateResultsWithChannels(ctx context.Context, r
seen[feature_id] = true
mu.Unlock()

t2 := time.Now()

cache_item, err := r.retrieveCache(ctx, sp)

r.Timer.Add(ctx, sp_id, "time to retrieve cache", time.Since(t2))

if err != nil {
r.Logger.Printf("Failed to retrieve cache for %s, %v", sp_id, err)
return
}

s := cache_item.SPR

t3 := time.Now()

for _, f := range filters {

err = filter.FilterSPR(f, s)
Expand All @@ -538,10 +518,6 @@ func (r *RTreeSpatialDatabase) inflateResultsWithChannels(ctx context.Context, r
}
}

r.Timer.Add(ctx, sp_id, "time to filter", time.Since(t3))

t4 := time.Now()

geom := cache_item.Geometry

orb_geom := geom.Geometry()
Expand All @@ -558,8 +534,6 @@ func (r *RTreeSpatialDatabase) inflateResultsWithChannels(ctx context.Context, r
r.Logger.Printf("Geometry has unsupported geometry type '%s'", geom.Type)
}

r.Timer.Add(ctx, sp_id, "time to test geometry", time.Since(t4))

if !contains {
// r.Logger.Debug("SKIP %s because does not contain coord (%v)", sp_id, c)
return
Expand Down
20 changes: 11 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,31 @@ require (
github.com/paulmach/orb v0.7.1
github.com/sfomuseum/go-flags v0.10.0
github.com/whosonfirst/go-ioutil v1.0.2
github.com/whosonfirst/go-whosonfirst-feature v0.0.24
github.com/whosonfirst/go-whosonfirst-spatial v0.4.0
github.com/whosonfirst/go-whosonfirst-spr/v2 v2.2.1
github.com/whosonfirst/go-whosonfirst-feature v0.0.25
github.com/whosonfirst/go-whosonfirst-spatial v0.5.4
github.com/whosonfirst/go-whosonfirst-spr/v2 v2.3.3
github.com/whosonfirst/go-whosonfirst-uri v1.2.0
)

require (
github.com/aaronland/go-json-query v0.1.2 // indirect
github.com/aaronland/go-json-query v0.1.3 // indirect
github.com/aaronland/go-roster v1.0.0 // indirect
github.com/g8rswimmer/error-chain v1.0.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/natefinch/atomic v1.0.1 // indirect
github.com/sfomuseum/go-edtf v1.1.1 // indirect
github.com/tidwall/gjson v1.14.3 // indirect
github.com/tidwall/gjson v1.14.4 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/whosonfirst/go-reader v1.0.1 // indirect
github.com/whosonfirst/go-reader v1.0.2 // indirect
github.com/whosonfirst/go-sanitize v0.1.0 // indirect
github.com/whosonfirst/go-whosonfirst-crawl v0.2.1 // indirect
github.com/whosonfirst/go-whosonfirst-flags v0.4.4 // indirect
github.com/whosonfirst/go-whosonfirst-iterate/v2 v2.3.0 // indirect
github.com/whosonfirst/go-whosonfirst-placetypes v0.3.0 // indirect
github.com/whosonfirst/go-whosonfirst-iterate/v2 v2.3.1 // indirect
github.com/whosonfirst/go-whosonfirst-placetypes v0.4.2 // indirect
github.com/whosonfirst/go-whosonfirst-sources v0.1.0 // indirect
github.com/whosonfirst/go-writer/v3 v3.0.0 // indirect
github.com/whosonfirst/go-writer/v3 v3.1.0 // indirect
github.com/whosonfirst/walk v0.0.1 // indirect
)
48 changes: 22 additions & 26 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/aaronland/go-json-query v0.1.2 h1:+yJBCJk9kcRAzbErhh+zOqK3DHSs/GmuSqXcCn5yH/c=
github.com/aaronland/go-json-query v0.1.2/go.mod h1:kkCl5KrO+fVSL2M8b/i3qO5PsnCpmajGXkbJHpEQPY8=
github.com/aaronland/go-json-query v0.1.3 h1:wBqGF4d+Qy1+/YFqiFEKL7ja4iaaZi9E/CWaO3s7G4U=
github.com/aaronland/go-json-query v0.1.3/go.mod h1:+T7tN35K0RtLt92MlNM+N2sr6pxsQMJc6Fd4PsKaVtw=
github.com/aaronland/go-roster v1.0.0 h1:FRDGrTqsYySKjWnAhbBGXyeGlI/o5/t9FZYCbUmyQtI=
github.com/aaronland/go-roster v1.0.0/go.mod h1:KIsYZgrJlAsyb9LsXSCvlqvbcCBVjCSqcQiZx42i9ro=
github.com/dhconnelly/rtreego v1.1.0 h1:ejMaqN03N1s6Bdg6peGkNgBnYYSBHzcK8yhSPCB+rHE=
Expand All @@ -10,31 +10,29 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v0.0.0-20171204182908-b7773ae21874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/natefinch/atomic v1.0.1 h1:ZPYKxkqQOx3KZ+RsbnP/YsgvxWQPGxjC0oBt2AhwV0A=
github.com/natefinch/atomic v1.0.1/go.mod h1:N/D/ELrljoqDyT3rZrsUmtsuzvHkeB/wWjHV22AZRbM=
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
github.com/paulmach/orb v0.6.0/go.mod h1:FWRlTgl88VI1RBx/MkrwWDRhQ96ctqMCh8boXhmqB/A=
github.com/paulmach/orb v0.7.1 h1:Zha++Z5OX/l168sqHK3k4z18LDvr+YAO/VjK0ReQ9rU=
github.com/paulmach/orb v0.7.1/go.mod h1:FWRlTgl88VI1RBx/MkrwWDRhQ96ctqMCh8boXhmqB/A=
github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/sfomuseum/go-edtf v0.2.3/go.mod h1:1rP0EJZ/84j3HO80vGcnG2T9MFBDAFyTNtjrr8cv3T4=
github.com/sfomuseum/go-edtf v0.3.1/go.mod h1:1rP0EJZ/84j3HO80vGcnG2T9MFBDAFyTNtjrr8cv3T4=
github.com/sfomuseum/go-edtf v1.0.0/go.mod h1:1rP0EJZ/84j3HO80vGcnG2T9MFBDAFyTNtjrr8cv3T4=
github.com/sfomuseum/go-edtf v1.1.1 h1:R5gElndHGDaK/rGSh2X+ulaLtlcHCdQA1cTzB8e9wv8=
github.com/sfomuseum/go-edtf v1.1.1/go.mod h1:1rP0EJZ/84j3HO80vGcnG2T9MFBDAFyTNtjrr8cv3T4=
github.com/sfomuseum/go-flags v0.7.0/go.mod h1:ML3DTNbF9xnjExSdS/9FtVLjIUhRU5gm/ehzISv+t2w=
github.com/sfomuseum/go-flags v0.10.0 h1:1OC1ACxpWMsl3XQ9OeNVMQj7Zi2CzufP3Rym3mPI8HU=
github.com/sfomuseum/go-flags v0.10.0/go.mod h1:VXOnnX1/yxQpX2yiwHaBV6aCmhtszQOL5bL1/nNo3co=
github.com/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/gjson v1.14.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/gjson v1.14.3 h1:9jvXn7olKEHU1S9vwoMGliaT8jq1vJ7IH/n9zD9Dnlw=
github.com/tidwall/gjson v1.14.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM=
github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
Expand All @@ -43,33 +41,31 @@ github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY=
github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=
github.com/whosonfirst/go-ioutil v1.0.2 h1:+GJPfa42OFn5A+5yJSc5jQTQIkNV3/MhYyg4pavdrC8=
github.com/whosonfirst/go-ioutil v1.0.2/go.mod h1:2dS1vWdAIkiHDvDF8fYyjv6k2NISmwaIjJJeEDBEdvg=
github.com/whosonfirst/go-reader v1.0.1 h1:mvEqObVuzJyZkI37SDmuvCpTJ2iEG5GUgD2Z3mT2e7s=
github.com/whosonfirst/go-reader v1.0.1/go.mod h1:3RXON51sbyPw8Ca7sxxwOItVfx8SM+KFPR+l2azGxJA=
github.com/whosonfirst/go-reader v1.0.2 h1:eccnKKSMGR+X1SJyHUZN0/7qE7VbFQULqSVQU0Su3xs=
github.com/whosonfirst/go-reader v1.0.2/go.mod h1:2w9l/QusYZSiGuEof3RwCHUFnM492SSOF2H7UxS4YIE=
github.com/whosonfirst/go-sanitize v0.1.0 h1:ygSqCnakwdzH/m8UEa15zXGDsoo5/JJeRkgmAjXZrBU=
github.com/whosonfirst/go-sanitize v0.1.0/go.mod h1:p/emgbafMM0p5iVAz2XWwecYPl06Tw4Jos9rhTKIrt8=
github.com/whosonfirst/go-whosonfirst-crawl v0.2.1 h1:nNG7r7/4MaII/NM8Df2oqgfgVNBDoIKlseleoX1vw1Q=
github.com/whosonfirst/go-whosonfirst-crawl v0.2.1/go.mod h1:MTD1TCgAkXlAtysPU98ylrz9Y5+ZCfRrsrBnRyiH/t8=
github.com/whosonfirst/go-whosonfirst-feature v0.0.23/go.mod h1:3cvRigFFG2a99M64lZzfy5amHacWu8Os5fXZdGjPnLM=
github.com/whosonfirst/go-whosonfirst-feature v0.0.24 h1:YR3Qm0oFDc9FM4z6VXsTZ4tSBRdi/hKKQUOj9fYy/Yw=
github.com/whosonfirst/go-whosonfirst-feature v0.0.24/go.mod h1:bdRPXMN+i82aVJSVMEaO306wDITCijdSIcmgUbSp04E=
github.com/whosonfirst/go-whosonfirst-flags v0.4.3/go.mod h1:pL17Ryo60FH8RYaQRgfu5XnxhrNRK3x+rn03TYD6Gc8=
github.com/whosonfirst/go-whosonfirst-feature v0.0.25 h1:6s2to+aWB9Fo+IcwSvsB2UiuymJPKSe8g0TwuRasLhE=
github.com/whosonfirst/go-whosonfirst-feature v0.0.25/go.mod h1:JTauqAjTuZDfOTHxv5hFUzknF0NGgxvHTT5maTej9Co=
github.com/whosonfirst/go-whosonfirst-flags v0.4.4 h1:pwUnE8btx4Po6N5+uq0IrKVF0WraY5YW3tc3saIDg3A=
github.com/whosonfirst/go-whosonfirst-flags v0.4.4/go.mod h1:C9X7vQvNR/u55AfOHYUT8o7dRACWV++ZV4B0kylnIaY=
github.com/whosonfirst/go-whosonfirst-iterate/v2 v2.3.0 h1:Fo1njhYHl+kEk2ZP4D1L3vIlKikT/rJ3fIXnAOZodlo=
github.com/whosonfirst/go-whosonfirst-iterate/v2 v2.3.0/go.mod h1:aWeWB3DYX7bVtnNNRjCpMNZSsRgohX+FM7ukQ0cXXTY=
github.com/whosonfirst/go-whosonfirst-placetypes v0.3.0 h1:68kuizK8FXjfEIOKlqWemhs7gyMBIgpLJDbCZF8+8Ok=
github.com/whosonfirst/go-whosonfirst-iterate/v2 v2.3.1 h1:CSada4je5cY3ZdTNKhYK2khy9HpeoxLVDo2cxSoUw7k=
github.com/whosonfirst/go-whosonfirst-iterate/v2 v2.3.1/go.mod h1:sAVuLSXDCyU1Yb474H0vXzBxY4Xooeza86CfjWUUCnM=
github.com/whosonfirst/go-whosonfirst-placetypes v0.3.0/go.mod h1:ez0VFkGFbgT2/z2oi3PIuW6FewsZ2+5glyfDD79XEHk=
github.com/whosonfirst/go-whosonfirst-placetypes v0.4.2 h1:Sye3ySdkTy5+PPdSLCaZO6/Pcfqb0AnMDU40c/yYZpQ=
github.com/whosonfirst/go-whosonfirst-placetypes v0.4.2/go.mod h1:HjxisIp+iZOXoThM9XyvC+GCmnupynE73GD3JxhH3fY=
github.com/whosonfirst/go-whosonfirst-sources v0.1.0 h1:JuKLa6KWke22jBfJ1pM9WQHoz1/3pbDv2C+aR+THPPQ=
github.com/whosonfirst/go-whosonfirst-sources v0.1.0/go.mod h1:EUMHyGzUmqPPxlMmOp+28BFeoBdxxE0HCKRd67lkqGM=
github.com/whosonfirst/go-whosonfirst-spatial v0.4.0 h1:62ZIglrseUouqCnaqqichStGxzvLiUgAKmg6uNtvs7E=
github.com/whosonfirst/go-whosonfirst-spatial v0.4.0/go.mod h1:QB/cWzEWTBFg5gMOvxBU6aiH3T9R4fqZRgPn3lpdD/0=
github.com/whosonfirst/go-whosonfirst-spr/v2 v2.2.1 h1:WRL/a9KPyA+MC6/ChIWlRqa/1BtV94Ak9Fh4cZB0yjs=
github.com/whosonfirst/go-whosonfirst-spr/v2 v2.2.1/go.mod h1:3P6fiSVGtIbM3UcyaVMs4i1N6Hi88GmTsdouuXzlr78=
github.com/whosonfirst/go-whosonfirst-uri v1.0.1/go.mod h1:8eaDVcc4v+HHHEDaRbApdmhPwM4/JQllw2PktvZcPVs=
github.com/whosonfirst/go-whosonfirst-spatial v0.5.4 h1:JJO2K+xLyciyWVPmpQ/VKZqXAswYm0O4yaXohFCBp/c=
github.com/whosonfirst/go-whosonfirst-spatial v0.5.4/go.mod h1:Q8SCUVV0mcGZpMB3Lq9GiBXkm6ZVS/kor4GuPQGvaCA=
github.com/whosonfirst/go-whosonfirst-spr/v2 v2.3.3 h1:dc7BdkGrSKtGyIEO8jW4h6xS0DMdKANwMHFRc1+WcnM=
github.com/whosonfirst/go-whosonfirst-spr/v2 v2.3.3/go.mod h1:3Sym68fXOfIAcdJiRkJC+8FO+JuSGZ2NuDpRFzWMDi0=
github.com/whosonfirst/go-whosonfirst-uri v1.2.0 h1:lhmRsIhcpTr5HAo+kXKRGsSt76HTh3Ko/oTR2jpCm/o=
github.com/whosonfirst/go-whosonfirst-uri v1.2.0/go.mod h1:CuVygTCUpMG945MMvqHyqxvc/L5YkDaMrrVpRFr7ZxY=
github.com/whosonfirst/go-writer/v3 v3.0.0 h1:EyGed1mP60LbXYGTVqQl5PAkfUkLfczGOPcC9mcHTMQ=
github.com/whosonfirst/go-writer/v3 v3.0.0/go.mod h1:TmYoKR7RvrzJaj3eOgMhgXHFE+R1yuO/4smxKHFhv14=
github.com/whosonfirst/go-writer/v3 v3.1.0 h1:lEZ6TIYvZb5NJ6e2OXYRM1j+MM2svKCSlb+6Vzbz+/M=
github.com/whosonfirst/go-writer/v3 v3.1.0/go.mod h1:TmYoKR7RvrzJaj3eOgMhgXHFE+R1yuO/4smxKHFhv14=
github.com/whosonfirst/walk v0.0.1 h1:t0QrqGwOdPMSeovFZSXfiS0GIGHrRXK3Wb9z5Uhs2bg=
github.com/whosonfirst/walk v0.0.1/go.mod h1:1KtP/VeooSlFOI61p+THc/C16Ra8Z5MjpjI0tsd3c1M=
github.com/whosonfirst/warning v0.1.1/go.mod h1:/unEMzhB9YaMeEwTJpzLN3kM5LiSxdJhKEsf/OQhn6s=
Expand Down
Loading

0 comments on commit 56fe360

Please sign in to comment.