2017 © Pedro Peláez
 

library quadtrees

QuadTree implementation in PHP

image

markbaker/quadtrees

QuadTree implementation in PHP

  • Thursday, January 25, 2018
  • by PHPOffice
  • Repository
  • 2 Watchers
  • 12 Stars
  • 4,051 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 2 Versions
  • 20 % Grown

The README.md

QuadTrees

A PHP implementation of the QuadTree data structure, (*1)

Master: Build Status, (*2)

Develop: Build Status, (*3)

Requirements

  • PHP version 7.0.0 or higher

Installation

We recommend installing this package with Composer., (*4)

Via composer

In your project root folder, execute, (*5)

composer require markbaker/quadtrees:dev-master

You should now have the files composer.json and composer.lock as well as the directory vendor in your project directory., (*6)

You can then require the Composer autoloader from your code, (*7)

require 'vendor/autoload.php';

Or, if you already have a composer.json file, then require this package in that file, (*8)

"require": {
    "markbaker/quadtrees": "dev-master"
}

and update composer., (*9)

composer update

From Phar

Although we strongly recommend using Composer, we also provide a Phar archive builder that will create a Phar file containing all of the library code., (*10)

The phar builder script is in the repository root folder, and can be run using, (*11)

php buildPhar.php

To use the archive, just require it from your script:, (*12)

require 'QuadTrees.phar';

Standard Autoloader

If you want to run the code without using composer's autoloader, and don't want to build the phar, then required the bootstrap.php file from the repository in your code, and this will enable the autoloader for the library., (*13)

require 'bootstrap.php';

Want to contribute?

Fork this library!, (*14)

License

QuadTrees is licensed under an MIT LICENSE), (*15)

Examples

The /examples folder contains a couple of examples to demonstrate its use:, (*16)

  • citySearch.php, (*17)

    allows a search on a defined bounding box, and will display a list of cities that fall within that bounding box, (*18)

    usage:, (*19)

    php citySearch.php <latitude> <longitude> <width> <height>
    
    latitude   Latitude of the centre point of the bounding box
                 (as a floating-point value in degrees, positive values
                 for East, negative for West)
    longitude  Longitude of the centre point of the bounding box
                 (as a floating-point value in degrees, positive values
                 for North, negative for South)
    width      Width of the bounding box 
                 (as a floating-point value in degrees)
    height     Height of the bounding box
                 (as a floating-point value in degrees)

Data for the list of cities is from geonames.org, licensed under a Creative Commons Attribution 3.0 License, and provided "as is" without warranty or any representation of accuracy, timeliness or completeness., (*20)

  • lunarLandingSearch.php, (*21)

    allows a search on a defined bounding box, and will display a list of moon landings that fall within that bounding box, (*22)

    usage:, (*23)

    php lunarLandingSearch.php <latitude> <longitude> <width> <height>
    
    latitude   Latitude of the centre point of the bounding box
                 (as a floating-point value in degrees, positive values
                 for East, negative for West)
    longitude  Longitude of the centre point of the bounding box
                 (as a floating-point value in degrees, positive values
                 for North, negative for South)
    width      Width of the bounding box 
                 (as a floating-point value in degrees)
    height     Height of the bounding box
                 (as a floating-point value in degrees)

The Versions

25/01 2018

dev-master

9999999-dev https://github.com/MarkBaker/QuadTrees

QuadTree implementation in PHP

  Sources   Download

LGPL LGPL-3.0-or-later

The Requires

  • php >=5.3.0

 

quadtree geospatial index

25/01 2018

dev-develop

dev-develop https://github.com/MarkBaker/QuadTrees

QuadTree implementation in PHP

  Sources   Download

LGPL LGPL-3.0-or-later

The Requires

  • php >=5.3.0

 

quadtree geospatial index