Skip to content

4.0.0 beta 1

Pre-release
Pre-release
Compare
Choose a tag to compare
@dvdoug dvdoug released this 05 Jan 00:22

PHPCoord v4 is a ground-up rewrite of the entire project starting over with a clean slate. The rewrite is based around the EPSG dataset, providing support for over 6200 worldwide coordinate systems (up from just 10 in PHPCoord v3).

This is a beta release, although there are no known bugs, there are some rough edges and missing features - in particular the following:

  • Documentation is a big TODO (there is none). For now, please see the test suite for examples of usage (look for ->convert)
  • Automatic "chaining" of coordinate conversions are not yet supported. For example, the software knows how to convert from the British National Grid to WGS84. The software also knows how to convert from WGS84 to the UTM zone system. However if you ask it to convert a British National Grid coordinate directly into its UTM equivalent it will error. You can work around this by explicitly doing the conversion in 2 steps.
  • In v3, a UTM conversion resulted in a object with an explicit (and automatically calculated) zone id. With this beta, you must first specify whether the point is in the north or south hemisphere, and the automatically calculated zone is then prefixed to the x/easting coordinate rather than being made available seperately. This is in alignment with the EPSG methodology. A method to get an "old-style" result object will be added back soon.

License change: Please note with v4 the code has been relicensed from GPL to MIT. The EPSG dataset is made available under the EPSG license, see license.txt for full details.