Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Bazaid/phpgeo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: mjaschen/phpgeo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Jun 18, 2013

  1. Copy the full SHA
    f9742a7 View commit details

Commits on Jul 7, 2013

  1. Copy the full SHA
    e80a53c View commit details
  2. updated README

    mjaschen committed Jul 7, 2013
    Copy the full SHA
    6ca4bfa View commit details

Commits on Jul 8, 2013

  1. ToC added

    mjaschen committed Jul 8, 2013
    Copy the full SHA
    d9259f9 View commit details

Commits on Oct 8, 2013

  1. Copy the full SHA
    f20bcb1 View commit details

Commits on Oct 9, 2013

  1. Copy the full SHA
    99ecc4f View commit details
  2. Copy the full SHA
    d4f190a View commit details
  3. README updated

    mjaschen committed Oct 9, 2013

    Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    1f0ee12 View commit details
  4. README updated

    mjaschen committed Oct 9, 2013

    Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    fbf5a61 View commit details
  5. README updated

    mjaschen committed Oct 9, 2013
    Copy the full SHA
    fe7dafa View commit details
  6. README updated

    mjaschen committed Oct 9, 2013
    Copy the full SHA
    ac1ad37 View commit details

Commits on Feb 25, 2014

  1. Added HHVM to Travisfile

    mjaschen committed Feb 25, 2014
    Copy the full SHA
    aa2bc32 View commit details

Commits on Oct 17, 2014

  1. README updated

    mjaschen committed Oct 17, 2014
    Copy the full SHA
    428bd4a View commit details

Commits on Dec 9, 2014

  1. Copy the full SHA
    6df48b2 View commit details
  2. added Scrutinizer config

    mjaschen committed Dec 9, 2014
    Copy the full SHA
    32ab854 View commit details
  3. Removed duplicate code

    mjaschen committed Dec 9, 2014
    Copy the full SHA
    116eedb View commit details
  4. Copy the full SHA
    7c027f4 View commit details
  5. Copy the full SHA
    13952c7 View commit details
  6. Copy the full SHA
    e5ed2ce View commit details

Commits on Dec 17, 2014

  1. Copy the full SHA
    f98068e View commit details
  2. Nice SVG buttons in README

    mjaschen committed Dec 17, 2014
    Copy the full SHA
    a08a23f View commit details
  3. updated ignore file

    mjaschen committed Dec 17, 2014
    Copy the full SHA
    e11cba9 View commit details
  4. Even nicer buttons :)

    mjaschen committed Dec 17, 2014
    Copy the full SHA
    8e5c790 View commit details

Commits on Oct 28, 2015

  1. Polygon implementation

    Paul Vidal committed Oct 28, 2015
    Copy the full SHA
    046257a View commit details

Commits on Oct 29, 2015

  1. PHPUnit 5 as dev-requirement

    mjaschen committed Oct 29, 2015
    Copy the full SHA
    4a5e27a View commit details
  2. Copy the full SHA
    0661fc0 View commit details
  3. Updated/Fixed Polygon implementation

    - last segment of polygon was missing in Polygon::getSegments()
    - ensured PSR-2 compatibility for new classes
    - Unit tests for Polygon class and Polygon GEOJson formatter
    - updated README
    mjaschen committed Oct 29, 2015
    Copy the full SHA
    d11068e View commit details
  4. Copy the full SHA
    422a936 View commit details
  5. Copy the full SHA
    1b85200 View commit details
  6. Dropped support for PHP 5.3; Code style fixes

    - PHP 5.3 is no longer supported
    - changed to short array syntax
    - updated README
    - some fixes for PSR-2 compliance
    mjaschen committed Oct 29, 2015
    Copy the full SHA
    927c5d0 View commit details
  7. Updated composer.json

    - PHP 5.4 as requirement
    - updated author info
    - updated keywords
    mjaschen committed Oct 29, 2015
    Copy the full SHA
    63325d8 View commit details

Commits on Nov 13, 2015

  1. fixed syntax error on README.md

    Changed Polygob to Polygon on Formatted output of polygons, GeoJson
    paulvl committed Nov 13, 2015
    Copy the full SHA
    e33a215 View commit details

Commits on Nov 15, 2015

  1. Merge pull request mjaschen#7 from paulvl/patch-1

    fixed syntax error on README.md
    mjaschen committed Nov 15, 2015
    Copy the full SHA
    431c70a View commit details

Commits on Feb 11, 2016

  1. Copy the full SHA
    b3088b9 View commit details
  2. docs: add change log file

    mjaschen committed Feb 11, 2016
    Copy the full SHA
    836cf2d View commit details
  3. Copy the full SHA
    1e393f1 View commit details

Commits on Mar 2, 2016

  1. Copy the full SHA
    06f2736 View commit details

Commits on Mar 3, 2016

  1. Merge pull request mjaschen#9 from luismulinari/master

    Fixed DecimalDegrees and DMS namespace in @Covers annotations
    mjaschen committed Mar 3, 2016
    Copy the full SHA
    72fad9c View commit details

Commits on Mar 4, 2016

  1. Copy the full SHA
    22ad2ba View commit details
  2. Merge pull request mjaschen#11 from luismulinari/master

    Removed unnecessary else/switch on the code
    mjaschen committed Mar 4, 2016
    Copy the full SHA
    19a9068 View commit details
  3. Copy the full SHA
    52b4451 View commit details
  4. docs: update change log

    mjaschen committed Mar 4, 2016
    Copy the full SHA
    7f9527e View commit details

Commits on Mar 10, 2016

  1. docs: add documentation in mkdocs format

    The documentation for phpgeo is now available at
    http://phpgeo.marcusjaschen.de/
    mjaschen committed Mar 10, 2016
    Copy the full SHA
    4d4ff9f View commit details
  2. Copy the full SHA
    95ee33b View commit details

Commits on Mar 11, 2016

  1. Copy the full SHA
    fdc9db8 View commit details
  2. Copy the full SHA
    a0d041a View commit details
  3. docs: fix headline level

    mjaschen committed Mar 11, 2016
    Copy the full SHA
    9405e16 View commit details

Commits on Mar 12, 2016

  1. feat: calculate bearings and destination points

    * Added calculation of the bearing angle between two points
      (initial and final bearing)
    * Added calculation of the destination point for a given
      starting point, the bearing angle, and the distance
    * Support for spherical and ellipsoidal algorithms for the
      described bearing calculations
    * Added documentation for the bearing calculations
    * Added tests
    mjaschen committed Mar 12, 2016
    Copy the full SHA
    3c4dfe3 View commit details
  2. Copy the full SHA
    b51bc74 View commit details

Commits on Mar 13, 2016

  1. Copy the full SHA
    ffb45a7 View commit details
Showing with 16,434 additions and 1,286 deletions.
  1. +2 −0 .github/FUNDING.yml
  2. +23 −0 .github/dependabot.yml
  3. +60 −0 .github/workflows/ci.yml
  4. +50 −0 .github/workflows/docs.yml
  5. +10 −1 .gitignore
  6. +9 −0 .scrutinizer.yml
  7. +48 −3 .travis.yml
  8. +350 −0 CHANGELOG.md
  9. +46 −0 CODE_OF_CONDUCT.md
  10. +17 −0 CONTRIBUTING.md
  11. +21 −0 LICENSE
  12. +48 −0 Makefile
  13. +203 −21 README.md
  14. +59 −8 composer.json
  15. +3,408 −0 docs/#intersection-polyline-simple.dxf
  16. +22 −0 docs/000_Introduction.md
  17. +41 −0 docs/010_Installation.md
  18. +73 −0 docs/015_Upgrading.md
  19. +69 −0 docs/020_Development.md
  20. +15 −0 docs/100_Geometries/110_Coordinate.md
  21. +170 −0 docs/100_Geometries/120_Line.md
  22. +126 −0 docs/100_Geometries/130_Polyline.md
  23. +167 −0 docs/100_Geometries/140_Polygon.md
  24. +26 −0 docs/100_Geometries/200_Bounds.md
  25. +61 −0 docs/100_Geometries/300_Ellipsoid.md
  26. BIN docs/100_Geometries/bounds-factory.png
  27. +14 −0 docs/100_Geometries/index.md
  28. +30 −0 docs/300_Comparisons/310_Same_Point_Comparison.md
  29. +34 −0 docs/300_Comparisons/320_Directions.md
  30. +14 −0 docs/300_Comparisons/340_Intersections.md
  31. +121 −0 docs/400_Calculations/410_Distance_and_Length.md
  32. +143 −0 docs/400_Calculations/420_Bearing_and_Destination.md
  33. +70 −0 docs/400_Calculations/425_Cardinal_Distance.md
  34. +43 −0 docs/400_Calculations/430_Perpendicular_Distance.md
  35. +46 −0 docs/400_Calculations/435_Distance_Between_Point_and_Line.md
  36. +40 −0 docs/400_Calculations/440_Geofence.md
  37. BIN docs/400_Calculations/cardinal-distance.png
  38. +3 −0 docs/400_Calculations/index.md
  39. BIN docs/400_Calculations/perpendicular-distance.png
  40. BIN docs/400_Calculations/point-to-line-distance.png
  41. +91 −0 docs/500_Transformations_and_Processing/510_Simplifying_a_Polyline_or_Polygon.md
  42. +5 −0 docs/500_Transformations_and_Processing/index.md
  43. BIN docs/500_Transformations_and_Processing/simplify.png
  44. +125 −0 docs/600_Formatting_and_Output/100_Coordinates.md
  45. +32 −0 docs/600_Formatting_and_Output/130_Polylines.md
  46. +34 −0 docs/600_Formatting_and_Output/140_Polygons.md
  47. +5 −0 docs/600_Formatting_and_Output/index.md
  48. +53 −0 docs/700_Parsing_and_Input/110_Coordinates_Parser.md
  49. +7 −0 docs/700_Parsing_and_Input/index.md
  50. +6 −0 docs/900_Further_Reading.md
  51. BIN docs/BoundsFactory.afdesign
  52. BIN docs/Cardinal_Distance.afdesign
  53. BIN docs/Line_to_Point_Distance.afdesign
  54. BIN docs/Perpendicular_Distance.afdesign
  55. +23 −0 docs/config.json
  56. +3,400 −0 docs/intersection-polyline-simple.dxf
  57. +121 −0 phpcs.xml.dist
  58. +6 −0 phpstan.neon
  59. +13 −7 phpunit.xml
  60. +230 −0 src/Bearing/BearingEllipsoidal.php
  61. +36 −0 src/Bearing/BearingInterface.php
  62. +79 −0 src/Bearing/BearingSpherical.php
  63. +30 −0 src/Bearing/DirectVincentyBearing.php
  64. +39 −0 src/Bearing/InverseVincentyBearing.php
  65. +102 −0 src/Bounds.php
  66. +138 −0 src/CardinalDirection/CardinalDirection.php
  67. +81 −0 src/CardinalDirection/CardinalDirectionDistances.php
  68. +78 −0 src/CardinalDirection/CardinalDirectionDistancesCalculator.php
  69. +155 −0 src/Coordinate.php
  70. +30 −0 src/Direction/Direction.php
  71. +15 −0 src/Distance/DistanceInterface.php
  72. +48 −0 src/Distance/Haversine.php
  73. +28 −40 src/{Location → }/Distance/Vincenty.php
  74. +81 −0 src/Ellipsoid.php
  75. +9 −0 src/Exception/BearingNotAvailableException.php
  76. +9 −0 src/Exception/InvalidDistanceException.php
  77. +9 −0 src/Exception/InvalidGeometryException.php
  78. +9 −0 src/Exception/InvalidPolygonException.php
  79. +3 −1 src/{Location → }/Exception/NotConvergingException.php
  80. +3 −1 src/{Location → }/Exception/NotMatchingEllipsoidException.php
  81. +31 −0 src/Factory/BoundsFactory.php
  82. +162 −0 src/Factory/CoordinateFactory.php
  83. +12 −0 src/Factory/GeometryFactoryInterface.php
  84. +181 −0 src/Formatter/Coordinate/DMS.php
  85. +36 −0 src/Formatter/Coordinate/DecimalDegrees.php
  86. +178 −0 src/Formatter/Coordinate/DecimalMinutes.php
  87. +12 −0 src/Formatter/Coordinate/FormatterInterface.php
  88. +27 −0 src/Formatter/Coordinate/GeoJSON.php
  89. +12 −0 src/Formatter/Polygon/FormatterInterface.php
  90. +36 −0 src/Formatter/Polygon/GeoJSON.php
  91. +12 −0 src/Formatter/Polyline/FormatterInterface.php
  92. +30 −0 src/Formatter/Polyline/GeoJSON.php
  93. +17 −0 src/GeometryInterface.php
  94. +15 −0 src/GeometryLinesInterface.php
  95. +38 −0 src/GetBoundsTrait.php
  96. +91 −0 src/Intersection/Intersection.php
  97. +217 −0 src/Line.php
  98. +0 −123 src/Location/Bounds.php
  99. +0 −160 src/Location/Coordinate.php
  100. +0 −37 src/Location/Distance/DistanceInterface.php
  101. +0 −67 src/Location/Distance/Haversine.php
  102. +0 −135 src/Location/Ellipsoid.php
  103. +0 −229 src/Location/Formatter/Coordinate/DMS.php
  104. +0 −66 src/Location/Formatter/Coordinate/DecimalDegrees.php
  105. +0 −36 src/Location/Formatter/Coordinate/FormatterInterface.php
  106. +0 −47 src/Location/Formatter/Coordinate/GeoJSON.php
  107. +232 −0 src/Polygon.php
  108. +162 −0 src/Polyline.php
  109. +95 −0 src/Processor/Polyline/SimplifyBearing.php
  110. +122 −0 src/Processor/Polyline/SimplifyDouglasPeucker.php
  111. +12 −0 src/Processor/Polyline/SimplifyInterface.php
  112. +45 −0 src/Utility/Cartesian.php
  113. +80 −0 src/Utility/PerpendicularDistance.php
  114. +69 −0 src/Utility/PointToLineDistance.php
  115. +212 −0 tests/Location/Bearing/BearingEllipsoidalTest.php
  116. +203 −0 tests/Location/Bearing/BearingSphericalTest.php
  117. +27 −51 tests/Location/BoundsTest.php
  118. +120 −0 tests/Location/CardinalDirection/CardinalDirectionDistancesCalculatorTest.php
  119. +77 −0 tests/Location/CardinalDirection/CardinalDirectionDistancesTest.php
  120. +111 −0 tests/Location/CardinalDirection/CardinalDirectionTest.php
  121. +75 −58 tests/Location/CoordinateTest.php
  122. +41 −0 tests/Location/Direction/DirectionTest.php
  123. +24 −51 tests/Location/Distance/HaversineTest.php
  124. +29 −56 tests/Location/Distance/VincentyTest.php
  125. +95 −0 tests/Location/Factory/BoundsFactoryTest.php
  126. +411 −0 tests/Location/Factory/CoordinateFactoryTest.php
  127. +48 −40 tests/Location/Formatter/Coordinate/DMSTest.php
  128. +22 −19 tests/Location/Formatter/Coordinate/DecimalDegreesTest.php
  129. +113 −0 tests/Location/Formatter/Coordinate/DecimalMinutesTest.php
  130. +12 −14 tests/Location/Formatter/Coordinate/GeoJSONTest.php
  131. +60 −0 tests/Location/Formatter/Polygon/GeoJSONTest.php
  132. +46 −0 tests/Location/Formatter/Polyline/GeoJSONTest.php
  133. +210 −0 tests/Location/Intersection/IntersectionTest.php
  134. +152 −0 tests/Location/LineTest.php
  135. +589 −0 tests/Location/PolygonTest.php
  136. +179 −0 tests/Location/PolylineTest.php
  137. +93 −0 tests/Location/Processor/Polyline/SimplifyBearingTest.php
  138. +143 −0 tests/Location/Processor/Polyline/SimplifyDouglasPeuckerTest.php
  139. +39 −0 tests/Location/Utility/CartesianTest.php
  140. +151 −0 tests/Location/Utility/PointToLineDistanceTestHaversineTest.php
  141. +152 −0 tests/Location/Utility/PointToLineDistanceTestVincentyTest.php
  142. +29 −0 tests/Regression/Github/107/Issue107Test.php
  143. +94 −0 tests/Regression/Github/15/Issue15Test.php
  144. +23 −0 tests/Regression/Github/18/Issue18Test.php
  145. +23 −0 tests/Regression/Github/42/Issue42Test.php
  146. +22 −0 tests/Regression/Github/68/Issue68Test.php
  147. +68 −0 tests/Regression/Github/92/Issue92Test.php
  148. +2 −15 tests/bootstrap.php
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: "mjaschen"
custom: "https://www.paypal.com/paypalme/mjaschen"
23 changes: 23 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2

updates:

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
day: wednesday
time: "09:00"
timezone: "Europe/Berlin"
open-pull-requests-limit: 10
target-branch: master

- package-ecosystem: composer
directory: "/"
schedule:
interval: weekly
day: wednesday
time: "09:00"
timezone: "Europe/Berlin"
open-pull-requests-limit: 10
target-branch: master
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: phpgeo CI Tasks

on:
push:
branches:
- "**"
pull_request:
branches:
- main

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
php-versions:
- "8.2"
- "8.3"
- "8.4"

name: "phpgeo CI run - PHP ${{ matrix.php-versions }}"

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-versions }}"
coverage: xdebug

- name: Validate composer.json and composer.lock
run: composer validate

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: "${{ runner.os }}-php-${{ matrix.php-versions }}-${{ hashFiles('composer.json') }}"
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-versions }}-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

- name: Lint PHP Sources
run: composer run-script ci:lint

- name: PHP Code Sniffer
run: composer run-script ci:sniff

- name: Static Analysis
run: composer run-script ci:phpstan

- name: Unit Tests
run: composer run-script ci:tests
50 changes: 50 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Documentation

on:
push:
tags:
- '*'
branches:
- main
- docs

jobs:

documentation:

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup PHP
uses: shivammathur/setup-php@2.28.0
with:
php-version: 8.1
extensions: mbstring, dom, intl, iconv

- name: Install Dependencies
run: composer install --prefer-dist --no-progress --no-suggest --dev

- name: Install Daux
run: composer require daux/daux.io:^0.22.0 --prefer-dist --no-progress --no-suggest --dev

- name: Create Build Directory
run: mkdir -p build/daux

- name: Generate Documentation
run: vendor/bin/daux generate -d build/daux

- name: Deploy Documentation Website
uses: AEnterprise/rsync-deploy@v1.0.2
env:
DEPLOY_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-e -c -r --delete"
SERVER_PORT: 22
FOLDER: "./build/daux/"
SERVER_IP: ${{ secrets.DOCS_REMOTE_HOST }}
USERNAME: ${{ secrets.DOCS_REMOTE_USER }}
SERVER_DESTINATION: ${{ secrets.DOCS_REMOTE_TARGET_PATH }}
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
.DS_Store
.idea/
*~
/.idea/
/composer.lock
/vendor/
/docs/phpgeo.html
/docs/coverage/
/docs/phpdox/
/tools/
/build/
.phpunit.result.cache
9 changes: 9 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
filter:
paths: ["src/*"]
tools:
php_code_coverage: true
php_sim: true
php_mess_detector: true
php_pdepend: true
php_analyzer: true
php_cpd: false
51 changes: 48 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
os: linux
dist: xenial
language: php

php:
- "5.5"
- "5.4"
- "5.3"
- "7.4"
- "7.3"
- "7.2"

cache:
directories:
- vendor
- $HOME/.composer/cache

env:
jobs:
- DEPENDENCIES=latest
- DEPENDENCIES=oldest

install:
- >
if [ "$DEPENDENCIES" = "latest" ]; then
echo "Installing the latest dependencies";
composer update --with-dependencies --prefer-stable --prefer-dist
else
echo "Installing the lowest dependencies";
composer update --with-dependencies --prefer-stable --prefer-dist --prefer-lowest
fi;
composer show;
script:
- >
echo;
echo "Validating the composer.json";
composer ci:composer-validate;
- >
echo;
echo "Linting all PHP files";
composer ci:lint;
- >
echo;
echo "Running the Psalm static analyzer";
composer ci:psalm;
- >
echo;
echo "Running the PHPUnit tests";
composer ci:tests;
Loading