Php port of my geotools project. GeoTools is a set of tools for manipulating geo hashes and geometric shapes in the wgs 84 coordinate system.
PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests
.gitignore
GeoTools.php
LICENSE
README.textile
phpunit.xml.dist

README.textile

Introduction

This is a php port of my geotools project, which was written in Java. This is my first attempt at doing anything in php so, beware minor code issues resulting from that.

phpunit tests are provided.

Simply copy the php file into your project to get started.

Features

  • GeoGeometry class with methods that allow you to:
    • Calculate distance between two coordinates using the haversine algorithm.
    • check bounding box containment for a point
    • check polygon containment for a point
    • get the center for a polygon
    • get bounding box for a polygon
    • convert circle to a polygon
    • create a polygon from a point cloud
    • translate a wgs84 coordinate by x & y meters along the latitude and longitude
  • GeoHashUtils class with methods that allow you to:
    • encode and decode geo hashes
    • check containment of a point in a geohash
    • find out the boundingbox of a geohash
    • find out neighboring geohashes east, west, south, or north of a geohash
    • get the 32 sub geo hashes for a geohash, or the north/south halves, or the NE, NW, SE, SW quarters.
    • cover lines, paths, polygons, or circles with geo hashes

Changelog

  • this code has not been released yet