Copyright (C) 2014-2022 Stichting Mapcode Foundation (http://www.mapcode.com)
This PHP project contains a library to encode latitude/longitude pairs to mapcodes and to decode mapcodes back to latitude/longitude pairs.
Online documentation can be found at: http://mapcode-foundation.github.io/mapcode-php/
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
mapcode_data.php - Data table for mapcode support
mapcode_func.php - Key routines for mapcode support
mapcode_fast_encode.php - Data for fast encoding of coordinates
mapcode_ctrynams.php - Optional array with english territory names
sample.php - Sample php code to interpret or generate mapcodes
(upload all 4 files to a server, then open sample.php in a web browser)
unittest\unittest.php - Unit test for mapcode library
mapcode_library_php.doc - Manual: how to use the PHP Mapcode Library
LICENSE - Apache License, Version 2.0
NOTICE - About this package
README.md - This document
- Updated to support PHP version 8.1.4 (thanks, Bert Hooyman).
-
Fixed PHP errors for new version of PHP.
-
Cleaned up/reformatted source code.
- Solved 1-microdegree gap in a few spots on Earth, noticable now extreme precision is possible.
-
Reworked high-precision to pure integer math.
-
Enforce encode(decode(m))=m except at territory borders.
-
Added maxErrorinMeters to API.
- Added DistanceInMeters to API.
-
Rewrote fraction floating points to integer arithmetic.
-
Several fixes; extended unit tests.
- Added unittest.php, which verifies that the library works as expected.
-
Ported fast_encode from C library (4x faster global encoding).
-
Minor improvements (stricter tests).
- Initial open source release. (The release starts at 2.0.0 because the mapcode algorithms match the 2.0.x releases in Java, C/C++, and other languages.)