Skip to content

Commit

Permalink
Merge branch 'master' into 4.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdoug committed Apr 19, 2021
2 parents cc1a779 + e2f92ad commit 5e4fe79
Show file tree
Hide file tree
Showing 3,336 changed files with 129,656 additions and 28,533 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Set up build cache
uses: "actions/cache@v2.1.4"
uses: "actions/cache@v2"
with:
path: |
${{ steps.composercache.outputs.dir }}
Expand All @@ -67,6 +67,9 @@ jobs:
key: "php-${{ matrix.php-version }}-deps-${{ matrix.dependencies }}-${{ hashFiles('composer.json') }}"
restore-keys: "php-${{ matrix.php-version }}-deps-${{ matrix.dependencies }}"

- name: Remove manual import-only deps
run: composer remove --dev --no-update "gasparesganga/php-shapefile";

- name: Remove PHP-CS-Fixer if not called
if: matrix.php-version != '7.4' || matrix.dependencies != 'highest'
run: composer remove --dev --no-update "friendsofphp/php-cs-fixer";
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
/.php_cs.cache
/.phpunit.result.cache

/resources/epsg/*.sql*
/resources/epsg/
1 change: 1 addition & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ return $config = (new PhpCsFixer\Config())
'header' => "PHPCoord.\n\n@author Doug Wright",
],
'phpdoc_line_span' => true,
'phpdoc_to_comment' => false,
]
)
->setRiskyAllowed(true)
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@

## [Unreleased]

## [4.2.0] - 2021-04-19
### Added
- More accurate extent data
### Fixed
- Ensure projections still work even when origin points are on the other side of the antimeridian
### Changed
- Updates to data for Australia, Poland, UK and US Gulf of Mexico.

## [4.1.0] - 2021-03-03
### Added
- Added `UTMPoint` as a better way of handling UTM zones than the EPSG model does it
- Improved conversion chaining for `CompoundPoint`s
### Changed
- moved `verticalOffsetAndSlope` method from `CompoundPoint` to `VerticalPoint`. This is technically a breaking change, but since the code is only 2 days old shouldn't affect anyone.
- Moved `verticalOffsetAndSlope` method from `CompoundPoint` to `VerticalPoint`. This is technically a breaking change, but since the code is only 2 days old shouldn't affect anyone.

## [4.0.1] - 2021-03-01
### Fixed
Expand Down
10 changes: 8 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
"require-dev": {
"ext-sqlite3": "*",
"friendsofphp/php-cs-fixer": "^2.18.0",
"phpunit/phpunit": "^9.5.0",
"nikic/php-parser": "^4.10"
"gasparesganga/php-shapefile": "^3.4",
"nikic/php-parser": "^4.10",
"phpunit/phpunit": "^9.5.0"
},
"config": {
"preferred-install": {
Expand All @@ -29,6 +30,11 @@
"bin-compat" : "full",
"optimize-autoloader": true
},
"extra": {
"branch-alias": {
"dev-master": "4.x-dev"
}
},
"autoload": {
"psr-4": {
"PHPCoord\\": "src/"
Expand Down
2 changes: 1 addition & 1 deletion docs/coordinate_conversions_easy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ between almost any two CRSs is possible as long as they have a common link.
$from = ProjectedPoint::createFromEastingNorthing(
new Metre(577275),
new Metre(69741),
Projected::fromSRID(Projected::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID)
Projected::fromSRID(Projected::EPSG_OSGB36_BRITISH_NATIONAL_GRID)
);
$toCRS = Projected::fromSRID(Projected::EPSG_WGS_84_UTM_ZONE_31N);
$to = $from->convert($toCRS);
Expand Down
4 changes: 2 additions & 2 deletions docs/creating_points_compound.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Example:
use PHPCoord\UnitOfMeasure\Length\Metre;
// Horizontal location of Ben Nevis peak using British National Grid
$horizontalCRS = Projected::fromSRID(Projected::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID);
$horizontalCRS = Projected::fromSRID(Projected::EPSG_OSGB36_BRITISH_NATIONAL_GRID);
$horizontalPoint = ProjectedPoint::createFromEastingNorthing(
new Metre(216692),
new Metre(771274),
Expand All @@ -43,7 +43,7 @@ Example:
);
// Full coordinate of Ben Nevis Peak
$compoundCRS = Compound::fromSRID(Compound::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID_PLUS_ODN_HEIGHT);
$compoundCRS = Compound::fromSRID(Compound::EPSG_OSGB36_BRITISH_NATIONAL_GRID_PLUS_ODN_HEIGHT);
$point = CompoundPoint::create(
$horizontalPoint,
$verticalPoint,
Expand Down
10 changes: 5 additions & 5 deletions docs/creating_points_projected.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ Examples:
use PHPCoord\UnitOfMeasure\Length\Metre;
// Nelson's Column in British National Grid (unknown date), traditional arguments
$crs = Projected::fromSRID(Projected::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID);
$crs = Projected::fromSRID(Projected::EPSG_OSGB36_BRITISH_NATIONAL_GRID);
$point = ProjectedPoint::createFromEastingNorthing(
new Metre(530017),
new Metre(180419),
$crs
);
// Nelson's Column in British National Grid (2020-02-01), traditional arguments
$crs = Projected::fromSRID(Projected::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID);
$crs = Projected::fromSRID(Projected::EPSG_OSGB36_BRITISH_NATIONAL_GRID);
$point = ProjectedPoint::createFromEastingNorthing(
new Metre(530017),
new Metre(180419),
Expand All @@ -66,15 +66,15 @@ Examples:
);
// Nelson's Column in British National Grid (unknown date), named arguments
$crs = Projected::fromSRID(Projected::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID);
$crs = Projected::fromSRID(Projected::EPSG_OSGB36_BRITISH_NATIONAL_GRID);
$point = ProjectedPoint::createFromEastingNorthing(
easting: new Metre(530017),
northing: new Metre(180419),
crs: $crs
);
// Nelson's Column in British National Grid (2020-02-01), named arguments
$crs = Projected::fromSRID(Projected::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID);
$crs = Projected::fromSRID(Projected::EPSG_OSGB36_BRITISH_NATIONAL_GRID);
$point = ProjectedPoint::createFromEastingNorthing(
easting: new Metre(530017),
northing: new Metre(180419),
Expand Down Expand Up @@ -139,7 +139,7 @@ Examples:
use PHPCoord\UnitOfMeasure\Length\Metre;
// Nelson's Column
$crs = Projected::fromSRID(Projected::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID);
$crs = Projected::fromSRID(Projected::EPSG_OSGB36_BRITISH_NATIONAL_GRID);
$point = ProjectedPoint::createFromEastingNorthing(
new Metre(530017),
new Metre(180419),
Expand Down
34 changes: 30 additions & 4 deletions docs/reflection/coordinatereferencesystem/compound.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,32 @@ DB_REF / 3-degree Gauss-Kruger zone 5 (E-N) + DHHN92 height
CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::5835')


ETRF2000-PL + Baltic 1986 height
--------------------------------

| Used: Poland - onshore.

.. code-block:: php

Compound::fromSRID(Compound::EPSG_ETRF2000_PL_PLUS_BALTIC_1986_HEIGHT)
Compound::fromSRID('urn:ogc:def:crs:EPSG::9656')
CoordinateReferenceSystem::fromSRID(Compound::EPSG_ETRF2000_PL_PLUS_BALTIC_1986_HEIGHT)
CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::9656')


ETRF2000-PL + EVRF2007-PL height
--------------------------------

| Used: Poland - onshore.

.. code-block:: php

Compound::fromSRID(Compound::EPSG_ETRF2000_PL_PLUS_EVRF2007_PL_HEIGHT)
Compound::fromSRID('urn:ogc:def:crs:EPSG::9657')
CoordinateReferenceSystem::fromSRID(Compound::EPSG_ETRF2000_PL_PLUS_EVRF2007_PL_HEIGHT)
CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::9657')


ETRS89 + Alicante height
------------------------

Expand Down Expand Up @@ -3777,16 +3803,16 @@ NZGD2000 + NZVD2016 height
CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::9528')


OSGB 1936 / British National Grid + ODN height
----------------------------------------------
OSGB36 / British National Grid + ODN height
-------------------------------------------

| Used: United Kingdom (UK) - Great Britain onshore - England and Wales - mainland; Scotland - mainland and Inner Hebrides.

.. code-block:: php

Compound::fromSRID(Compound::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID_PLUS_ODN_HEIGHT)
Compound::fromSRID(Compound::EPSG_OSGB36_BRITISH_NATIONAL_GRID_PLUS_ODN_HEIGHT)
Compound::fromSRID('urn:ogc:def:crs:EPSG::7405')
CoordinateReferenceSystem::fromSRID(Compound::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID_PLUS_ODN_HEIGHT)
CoordinateReferenceSystem::fromSRID(Compound::EPSG_OSGB36_BRITISH_NATIONAL_GRID_PLUS_ODN_HEIGHT)
CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::7405')


Expand Down
14 changes: 14 additions & 0 deletions docs/reflection/coordinatereferencesystem/geocentric.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,20 @@ ETRF2000

Replaces ETRF97 (code 7928). On the publication of ETRF2005 (code 8397), the EUREF Technical Working Group recommended that ETRF2000 be the realization of ETRS89. ETRF2014 (code 8401) is technically superior to all earlier realizations of ETRS89.

ETRF2000-PL
-----------

| Used: Poland - onshore and offshore.

.. code-block:: php

Geocentric::fromSRID(Geocentric::EPSG_ETRF2000_PL)
Geocentric::fromSRID('urn:ogc:def:crs:EPSG::9700')
CoordinateReferenceSystem::fromSRID(Geocentric::EPSG_ETRF2000_PL)
CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::9700')

Adopted from 2012-12-01.

ETRF2005
--------

Expand Down
29 changes: 22 additions & 7 deletions docs/reflection/coordinatereferencesystem/geographic2d.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ AGD84
CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_AGD84)
CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4203')

National system replacing AGD 66 but officially adopted only in Queensland, South Australia and Western Australia. Replaced by GDA94.
National system replacing AGD66 but officially adopted only in Queensland, South Australia and Western Australia. Replaced by GDA94.

ATF (Paris)
-----------
Expand Down Expand Up @@ -1521,6 +1521,21 @@ ETRF2000

Replaces ETRF97 (code 9066). On the publication of ETRF2005 (code 9068), the EUREF Technical Working Group recommended that ETRF2000 be the realization of ETRS89. ETRF2014 (code 9069) is technically superior to all earlier realizations of ETRS89.

ETRF2000-PL
-----------

| Used: Poland - onshore and offshore.

.. code-block:: php

Geographic2D::fromSRID(Geographic2D::EPSG_ETRF2000_PL)
Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::9702')
Geographic::fromSRID(Geographic2D::EPSG_ETRF2000_PL)
Geographic::fromSRID('urn:ogc:def:crs:EPSG::9702')
CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_ETRF2000_PL)
CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::9702')


ETRF2005
--------

Expand Down Expand Up @@ -5253,25 +5268,25 @@ OS(SN)80
CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4279')


OSGB 1936
---------
OSGB36
------

| Used: United Kingdom (UK) - offshore to boundary of UKCS within 49°45'N to 61°N and 9°W to 2°E; onshore Great Britain (England, Wales and Scotland). Isle of Man onshore.

.. code-block:: php

Geographic2D::fromSRID(Geographic2D::EPSG_OSGB_1936)
Geographic2D::fromSRID(Geographic2D::EPSG_OSGB36)
Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::4277')
Geographic::fromSRID(Geographic2D::EPSG_OSGB_1936)
Geographic::fromSRID(Geographic2D::EPSG_OSGB36)
Geographic::fromSRID('urn:ogc:def:crs:EPSG::4277')
CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_OSGB_1936)
CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_OSGB36)
CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4277')


OSGB70
------

| Used: United Kingdom (UK) - Great Britain - England and Wales onshore, Scotland onshore and Western Isles nearshore; Isle of Man onshore.
| Used: United Kingdom (UK) - Great Britain - England and Wales onshore, Scotland onshore and Western Isles nearshore including Sea of the Hebrides and The Minch; Isle of Man onshore.

.. code-block:: php

Expand Down
16 changes: 16 additions & 0 deletions docs/reflection/coordinatereferencesystem/geographic3d.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,22 @@ ETRF2000

Replaces ETRF97 (code 7929). On the publication of ETRF2005 (code 8399), the EUREF Technical Working Group recommended that ETRF2000 be the realization of ETRS89. ETRF2014 (code 8403) is technically superior to all earlier realizations of ETRS89.

ETRF2000-PL
-----------

| Used: Poland - onshore and offshore.

.. code-block:: php

Geographic3D::fromSRID(Geographic3D::EPSG_ETRF2000_PL)
Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::9701')
Geographic::fromSRID(Geographic3D::EPSG_ETRF2000_PL)
Geographic::fromSRID('urn:ogc:def:crs:EPSG::9701')
CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_ETRF2000_PL)
CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::9701')

Adopted from 2012-12-01.

ETRF2005
--------

Expand Down
Loading

0 comments on commit 5e4fe79

Please sign in to comment.