Skip to content

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.

License

Notifications You must be signed in to change notification settings

jillesvangurp/geotools-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Note. no longer updating this sinec 2012 as I generally don’t touch anything php these days.

This is a php port of my [geogeometry](https://github.com/jillesvangurp/geogeometry) (formerly geotools) project, which was originally written in Java and in Kotlin these days. 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

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages