• This repository has been archived on 23/Jul/2021
  • Stars
    star
    116
  • Rank 302,139 (Top 6 %)
  • Language
    Scala
  • License
    MIT License
  • Created almost 11 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

2D R-Tree implementation in Scala

Archery

Overview

Archery is a two-dimensional R-Tree written in Scala. The implementation is immutable: adding and removing points from the tree produces a new tree, leaving the old one untouched. Due to structural sharing this operation is quite efficient.

The name "archery" is a corruption of the word "R-Tree".

travis-ci.org codecov.io

Getting Archery

Archery is published to bintray using the bintray-sbt plugin. Archery is available for Scala 2.10 and Scala 2.11.

If you use SBT, you can include Archery via the following build.sbt snippet:

resolvers += "bintray/meetup" at "http://dl.bintray.com/meetup/maven"

libraryDependencies += "com.meetup" %% "archery" % "0.4.0"

For Maven or Ivy, you'll use the same resolver URL but you'll need a slightly different artifact name (the example is for Scala 2.11):

org=com.meetup
name=archery_2.11
rev=0.4.0

Example Usage

import archery._

// create some entries
val alice = Entry(Point(9.12F, -4.9F), "alice")
val bob = Entry(Point(2.3F, 4.6F), "bob")
val candice = Entry(Point(4.7F, -1.9F), "candice")
val doug = Entry(Point(5.5F, -3.2F), "doug")

// build a tree with three points
val tree1: RTree[String] = RTree(alice, bob, candice)

// add "doug"
val tree2: RTree[String] = tree1.insert(doug)

// remove "bob"
val tree3: RTree[String] = tree2.remove(bob)

// search from (0,-4) to (10,6), will find "doug"
val bbox: Box = Box(0F, -4F, 10F, 6F)
val results: Seq[Entry[String]] = tree3.search(bbox)

// we can also just ask how many matching entries exist
val n: Int = tree3.count(bbox)
assert(results.length == n)

Contributing

If you find something that seems like a bug in Archery, or see confusing behavior, or find a place where the documentation or library could be better, please open an issue.

Pull requests are gladly accepted. The preferred strategy is to open an issue or pull request where the feature can be discussed. We can use the PR to collaborate on, and will merge it once everyone agrees on the change, the tests and docs are updated, etc.

Building Archery

Building this project requires SBT 0.13.x.

After you launch SBT, you can run the following commands:

  • compile compile the project.
  • test run the tests.
  • scalastyle run the style-checking.
  • benchmark/run run the included timing benchmarks.
  • console load a scala REPL with archery on the classpath.

(Travis automatically runs test and scalastyle, so any issues should also be detected when a pull request is opened.)

You can generate coverage statistics manually by running the following command from the command-line:

$ sbt clean coverage test coverageReport

Open core/target/scala-2.11/scoverage-report/index.html in a web browser to see local coverage.

Tests are written with ScalaTest and use the excellent ScalaCheck library for automated specification-based testing.

Test coverage is measured using sbt-scoverage and tracked at codecov.io.

The benchmarks are written against Rex Kerr's excellent library Thyme.

License

Archery is available to you under the MIT license. See the COPYING file for details.

Credits

Archery is maintained by Erik Osheim.

Copyright (c) 2013-2015 Meetup Inc.

More Repositories

1

api

Meetup API contrib
120
star
2

python-api-client

[discontinued] Python interfaces to the Meetup Web API
Python
110
star
3

widgets

API driven Meetup widgets
HTML
33
star
4

stream

HTML
25
star
5

sassquatch

CSS foundation & framework for Meetup
CSS
25
star
6

must.js

Pipe community into your browser
JavaScript
21
star
7

MUSharedWebCredential

Safari AutoFill passwords made easy.
Objective-C
20
star
8

varnish-geoip-plugin

GeoIP plugin for Varnish
Shell
18
star
9

snapup-android

Android application to take photos, then post them using the Meetup API.
Scala
14
star
10

javascript-apps

Javascript sample apps using the Meetup API
JavaScript
13
star
11

timeywimey

Converters between JodaTime and Java 8 time classes, plus some legacy java.util time classes utility, for Java 8 and Scala
Java
13
star
12

meetup-scala-class

Files for use during Meetup's internal Scala class
HTML
12
star
13

engineering-home

Meetup Engineering Principles, Practices, Architecture, and Defaults
10
star
14

oauth2-starter-kit

just enough to get started using browser oauth2 authentication
JavaScript
9
star
15

json-slim

make your JSON look good in those skinny jeans
Scala
9
star
16

launch-dogly

πŸš€ πŸŒ‘ 🐢 Create Datadog events on Launch Darkly feature flag events
Rust
9
star
17

swarm-constants

Cross-platform design constants for Swarm Design System
HTML
6
star
18

barbershop

πŸ’ˆtrims a little of the top and sides of your github repository after pull request merges
Rust
6
star
19

mailbox

imap query client that speaks json
Rust
6
star
20

meetupnow

Java
5
star
21

jira-onboarding

Automated creation of a Jira board to track the onboarding process for new hires. Provide a config file of the format specified below, and the script takes care of the rest.
Python
5
star
22

express-checkout

TypeScript
5
star
23

sassquatch2

version 2 of the Meetup Sassquatch framework
CSS
5
star
24

maxmind-updater

maxmind geoipupdate docker container
Shell
5
star
25

docker-gcsfuse

docker image w/ gcsfuse installed
Makefile
5
star
26

stack-tail

πŸ₯ž ☁️ a cli monitor for AWS CloudFormation stacks
Rust
4
star
27

snapup-iphone

Snapup for iPhone allows you to upload photos to Meetup.com.
Objective-C
4
star
28

slack-standup

automating myself out of job
Rust
4
star
29

meetup.github.com

JavaScript
3
star
30

meetup-swatches

Cross-platform color configuration by design@Meetup
Objective-C
3
star
31

steal

Writes the Meetup Open Events Stream to a SQLite DB
Python
3
star
32

json4s-java-time

java.time support for json4s
Scala
3
star
33

bazel-s3-cache

πŸƒβš‘a serverless implementation of a bazel remote build cache
Rust
3
star
34

locationpicker

JavaScript
3
star
35

swarm-animation

CSS animations + JS helpers that work with React
JavaScript
2
star
36

meetup-scala-generator

Code generators and utilities for swagger-codegen Meetup services.
HTML
2
star
37

react-native-demo

JavaScript
2
star
38

prize

A sort-of random picker for Meetup door prize winners, built on Spde
Scala
2
star
39

meetelf

CoffeeScript
2
star
40

DataSyncDemo

Java
2
star
41

action-pagerduty

Rust
2
star
42

jira-transit

transitions jira issues using github webhook triggers
Rust
2
star
43

xgboost4j-builder

Dockerized Build for XGBoost4j
Scala
2
star
44

action-skip-ci

⏭️ [skip ci]
Rust
1
star
45

pubsub-cloud-function

a porteurbars template for pubsub google cloud functions
Makefile
1
star
46

android-databindingbug

Java
1
star
47

cronitor

experimenting with cloudwatch cron monitor
Rust
1
star
48

oss-best-sbt-jar

Best practices project for an open sourced SBT project publishing a jar.
Makefile
1
star
49

lookerapi

API for Looker
Python
1
star
50

eslint-plugin-meetup

An ESLint plugin for validating trn message definitions in web platform apps
JavaScript
1
star
51

meetup-facebook-chat-extension

Meetup Facebook Chat Extension
CSS
1
star
52

now-client

JavaScript
1
star
53

http-cloud-function

a porteurbars template for http(s) triggered google cloud functions
Makefile
1
star
54

utilities

Data import scripts for the Meetup API
Java
1
star
55

git-linecat

😽 a tool for transforming and categorizing git log output
Rust
1
star