Skip to content

Commit 5e4fe79

Browse files
committed
Merge branch 'master' into 4.0.x
2 parents cc1a779 + e2f92ad commit 5e4fe79

File tree

3,336 files changed

+129656
-28533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,336 files changed

+129656
-28533
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
5959

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

70+
- name: Remove manual import-only deps
71+
run: composer remove --dev --no-update "gasparesganga/php-shapefile";
72+
7073
- name: Remove PHP-CS-Fixer if not called
7174
if: matrix.php-version != '7.4' || matrix.dependencies != 'highest'
7275
run: composer remove --dev --no-update "friendsofphp/php-cs-fixer";

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
/.php_cs.cache
88
/.phpunit.result.cache
99

10-
/resources/epsg/*.sql*
10+
/resources/epsg/

.php_cs.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ return $config = (new PhpCsFixer\Config())
3030
'header' => "PHPCoord.\n\n@author Doug Wright",
3131
],
3232
'phpdoc_line_span' => true,
33+
'phpdoc_to_comment' => false,
3334
]
3435
)
3536
->setRiskyAllowed(true)

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,20 @@
22

33
## [Unreleased]
44

5+
## [4.2.0] - 2021-04-19
6+
### Added
7+
- More accurate extent data
8+
### Fixed
9+
- Ensure projections still work even when origin points are on the other side of the antimeridian
10+
### Changed
11+
- Updates to data for Australia, Poland, UK and US Gulf of Mexico.
12+
513
## [4.1.0] - 2021-03-03
614
### Added
715
- Added `UTMPoint` as a better way of handling UTM zones than the EPSG model does it
816
- Improved conversion chaining for `CompoundPoint`s
917
### Changed
10-
- 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.
18+
- 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.
1119

1220
## [4.0.1] - 2021-03-01
1321
### Fixed

composer.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
"require-dev": {
1919
"ext-sqlite3": "*",
2020
"friendsofphp/php-cs-fixer": "^2.18.0",
21-
"phpunit/phpunit": "^9.5.0",
22-
"nikic/php-parser": "^4.10"
21+
"gasparesganga/php-shapefile": "^3.4",
22+
"nikic/php-parser": "^4.10",
23+
"phpunit/phpunit": "^9.5.0"
2324
},
2425
"config": {
2526
"preferred-install": {
@@ -29,6 +30,11 @@
2930
"bin-compat" : "full",
3031
"optimize-autoloader": true
3132
},
33+
"extra": {
34+
"branch-alias": {
35+
"dev-master": "4.x-dev"
36+
}
37+
},
3238
"autoload": {
3339
"psr-4": {
3440
"PHPCoord\\": "src/"

docs/coordinate_conversions_easy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ between almost any two CRSs is possible as long as they have a common link.
2727
$from = ProjectedPoint::createFromEastingNorthing(
2828
new Metre(577275),
2929
new Metre(69741),
30-
Projected::fromSRID(Projected::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID)
30+
Projected::fromSRID(Projected::EPSG_OSGB36_BRITISH_NATIONAL_GRID)
3131
);
3232
$toCRS = Projected::fromSRID(Projected::EPSG_WGS_84_UTM_ZONE_31N);
3333
$to = $from->convert($toCRS);

docs/creating_points_compound.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Example:
2828
use PHPCoord\UnitOfMeasure\Length\Metre;
2929
3030
// Horizontal location of Ben Nevis peak using British National Grid
31-
$horizontalCRS = Projected::fromSRID(Projected::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID);
31+
$horizontalCRS = Projected::fromSRID(Projected::EPSG_OSGB36_BRITISH_NATIONAL_GRID);
3232
$horizontalPoint = ProjectedPoint::createFromEastingNorthing(
3333
new Metre(216692),
3434
new Metre(771274),
@@ -43,7 +43,7 @@ Example:
4343
);
4444
4545
// Full coordinate of Ben Nevis Peak
46-
$compoundCRS = Compound::fromSRID(Compound::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID_PLUS_ODN_HEIGHT);
46+
$compoundCRS = Compound::fromSRID(Compound::EPSG_OSGB36_BRITISH_NATIONAL_GRID_PLUS_ODN_HEIGHT);
4747
$point = CompoundPoint::create(
4848
$horizontalPoint,
4949
$verticalPoint,

docs/creating_points_projected.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ Examples:
4949
use PHPCoord\UnitOfMeasure\Length\Metre;
5050
5151
// Nelson's Column in British National Grid (unknown date), traditional arguments
52-
$crs = Projected::fromSRID(Projected::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID);
52+
$crs = Projected::fromSRID(Projected::EPSG_OSGB36_BRITISH_NATIONAL_GRID);
5353
$point = ProjectedPoint::createFromEastingNorthing(
5454
new Metre(530017),
5555
new Metre(180419),
5656
$crs
5757
);
5858
5959
// Nelson's Column in British National Grid (2020-02-01), traditional arguments
60-
$crs = Projected::fromSRID(Projected::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID);
60+
$crs = Projected::fromSRID(Projected::EPSG_OSGB36_BRITISH_NATIONAL_GRID);
6161
$point = ProjectedPoint::createFromEastingNorthing(
6262
new Metre(530017),
6363
new Metre(180419),
@@ -66,15 +66,15 @@ Examples:
6666
);
6767
6868
// Nelson's Column in British National Grid (unknown date), named arguments
69-
$crs = Projected::fromSRID(Projected::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID);
69+
$crs = Projected::fromSRID(Projected::EPSG_OSGB36_BRITISH_NATIONAL_GRID);
7070
$point = ProjectedPoint::createFromEastingNorthing(
7171
easting: new Metre(530017),
7272
northing: new Metre(180419),
7373
crs: $crs
7474
);
7575
7676
// Nelson's Column in British National Grid (2020-02-01), named arguments
77-
$crs = Projected::fromSRID(Projected::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID);
77+
$crs = Projected::fromSRID(Projected::EPSG_OSGB36_BRITISH_NATIONAL_GRID);
7878
$point = ProjectedPoint::createFromEastingNorthing(
7979
easting: new Metre(530017),
8080
northing: new Metre(180419),
@@ -139,7 +139,7 @@ Examples:
139139
use PHPCoord\UnitOfMeasure\Length\Metre;
140140
141141
// Nelson's Column
142-
$crs = Projected::fromSRID(Projected::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID);
142+
$crs = Projected::fromSRID(Projected::EPSG_OSGB36_BRITISH_NATIONAL_GRID);
143143
$point = ProjectedPoint::createFromEastingNorthing(
144144
new Metre(530017),
145145
new Metre(180419),

docs/reflection/coordinatereferencesystem/compound.txt

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,32 @@ DB_REF / 3-degree Gauss-Kruger zone 5 (E-N) + DHHN92 height
155155
CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::5835')
156156

157157

158+
ETRF2000-PL + Baltic 1986 height
159+
--------------------------------
160+
161+
| Used: Poland - onshore.
162+
163+
.. code-block:: php
164+
165+
Compound::fromSRID(Compound::EPSG_ETRF2000_PL_PLUS_BALTIC_1986_HEIGHT)
166+
Compound::fromSRID('urn:ogc:def:crs:EPSG::9656')
167+
CoordinateReferenceSystem::fromSRID(Compound::EPSG_ETRF2000_PL_PLUS_BALTIC_1986_HEIGHT)
168+
CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::9656')
169+
170+
171+
ETRF2000-PL + EVRF2007-PL height
172+
--------------------------------
173+
174+
| Used: Poland - onshore.
175+
176+
.. code-block:: php
177+
178+
Compound::fromSRID(Compound::EPSG_ETRF2000_PL_PLUS_EVRF2007_PL_HEIGHT)
179+
Compound::fromSRID('urn:ogc:def:crs:EPSG::9657')
180+
CoordinateReferenceSystem::fromSRID(Compound::EPSG_ETRF2000_PL_PLUS_EVRF2007_PL_HEIGHT)
181+
CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::9657')
182+
183+
158184
ETRS89 + Alicante height
159185
------------------------
160186

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

37793805

3780-
OSGB 1936 / British National Grid + ODN height
3781-
----------------------------------------------
3806+
OSGB36 / British National Grid + ODN height
3807+
-------------------------------------------
37823808

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

37853811
.. code-block:: php
37863812

3787-
Compound::fromSRID(Compound::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID_PLUS_ODN_HEIGHT)
3813+
Compound::fromSRID(Compound::EPSG_OSGB36_BRITISH_NATIONAL_GRID_PLUS_ODN_HEIGHT)
37883814
Compound::fromSRID('urn:ogc:def:crs:EPSG::7405')
3789-
CoordinateReferenceSystem::fromSRID(Compound::EPSG_OSGB_1936_BRITISH_NATIONAL_GRID_PLUS_ODN_HEIGHT)
3815+
CoordinateReferenceSystem::fromSRID(Compound::EPSG_OSGB36_BRITISH_NATIONAL_GRID_PLUS_ODN_HEIGHT)
37903816
CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::7405')
37913817

37923818

docs/reflection/coordinatereferencesystem/geocentric.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,20 @@ ETRF2000
212212

213213
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.
214214

215+
ETRF2000-PL
216+
-----------
217+
218+
| Used: Poland - onshore and offshore.
219+
220+
.. code-block:: php
221+
222+
Geocentric::fromSRID(Geocentric::EPSG_ETRF2000_PL)
223+
Geocentric::fromSRID('urn:ogc:def:crs:EPSG::9700')
224+
CoordinateReferenceSystem::fromSRID(Geocentric::EPSG_ETRF2000_PL)
225+
CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::9700')
226+
227+
Adopted from 2012-12-01.
228+
215229
ETRF2005
216230
--------
217231

0 commit comments

Comments
 (0)