diff --git a/src/CoordinateOperation/CRSTransformations.php b/src/CoordinateOperation/CRSTransformations.php index e00846fad..1105165fb 100644 --- a/src/CoordinateOperation/CRSTransformations.php +++ b/src/CoordinateOperation/CRSTransformations.php @@ -19303,30 +19303,6 @@ class CRSTransformations 'accuracy' => 8.0, 'reversible' => true, ], - [ - 'operation' => 'urn:ogc:def:coordinateOperation:EPSG::1564', - 'name' => 'NZGD49 to WGS 84 (2)', - 'source_crs' => 'urn:ogc:def:crs:EPSG::4272', - 'target_crs' => 'urn:ogc:def:crs:EPSG::4326', - 'accuracy' => 4.0, - 'reversible' => true, - ], - [ - 'operation' => 'urn:ogc:def:coordinateOperation:EPSG::15975', - 'name' => 'NZGD49 to WGS 84 (4)', - 'source_crs' => 'urn:ogc:def:crs:EPSG::4272', - 'target_crs' => 'urn:ogc:def:crs:EPSG::4326', - 'accuracy' => 5.0, - 'reversible' => true, - ], - [ - 'operation' => 'urn:ogc:def:coordinateOperation:EPSG::1670', - 'name' => 'NZGD49 to WGS 84 (3)', - 'source_crs' => 'urn:ogc:def:crs:EPSG::4272', - 'target_crs' => 'urn:ogc:def:crs:EPSG::4326', - 'accuracy' => 1.0, - 'reversible' => true, - ], [ 'operation' => 'urn:ogc:def:coordinateOperation:EPSG::1653', 'name' => 'NGO 1948 to ETRS89 (1)', diff --git a/src/CoordinateOperation/CoordinateOperationParams.php b/src/CoordinateOperation/CoordinateOperationParams.php index bc82fc76c..ce9da6a1b 100644 --- a/src/CoordinateOperation/CoordinateOperationParams.php +++ b/src/CoordinateOperation/CoordinateOperationParams.php @@ -5625,43 +5625,6 @@ class CoordinateOperationParams 'reverses' => true, ], ], - 'urn:ogc:def:coordinateOperation:EPSG::1564' => [ - 'xAxisTranslation' => [ - 'value' => 59.47, - 'uom' => 'urn:ogc:def:uom:EPSG::9001', - 'reverses' => true, - ], - 'yAxisTranslation' => [ - 'value' => -5.04, - 'uom' => 'urn:ogc:def:uom:EPSG::9001', - 'reverses' => true, - ], - 'zAxisTranslation' => [ - 'value' => 187.44, - 'uom' => 'urn:ogc:def:uom:EPSG::9001', - 'reverses' => true, - ], - 'xAxisRotation' => [ - 'value' => -0.47, - 'uom' => 'urn:ogc:def:uom:EPSG::9104', - 'reverses' => true, - ], - 'yAxisRotation' => [ - 'value' => 0.1, - 'uom' => 'urn:ogc:def:uom:EPSG::9104', - 'reverses' => true, - ], - 'zAxisRotation' => [ - 'value' => -1.024, - 'uom' => 'urn:ogc:def:uom:EPSG::9104', - 'reverses' => true, - ], - 'scaleDifference' => [ - 'value' => -4.5993, - 'uom' => 'urn:ogc:def:uom:EPSG::9202', - 'reverses' => true, - ], - ], 'urn:ogc:def:coordinateOperation:EPSG::1565' => [ 'xAxisTranslation' => [ 'value' => 0.0, @@ -74829,23 +74792,6 @@ class CoordinateOperationParams 'reverses' => true, ], ], - 'urn:ogc:def:coordinateOperation:EPSG::15975' => [ - 'xAxisTranslation' => [ - 'value' => 54.4, - 'uom' => 'urn:ogc:def:uom:EPSG::9001', - 'reverses' => true, - ], - 'yAxisTranslation' => [ - 'value' => -20.1, - 'uom' => 'urn:ogc:def:uom:EPSG::9001', - 'reverses' => true, - ], - 'zAxisTranslation' => [ - 'value' => 183.1, - 'uom' => 'urn:ogc:def:uom:EPSG::9001', - 'reverses' => true, - ], - ], 'urn:ogc:def:coordinateOperation:EPSG::15977' => [ 'xAxisTranslation' => [ 'value' => 0.0, diff --git a/src/CoordinateOperation/CoordinateOperations.php b/src/CoordinateOperation/CoordinateOperations.php index d457959b1..a32672573 100644 --- a/src/CoordinateOperation/CoordinateOperations.php +++ b/src/CoordinateOperation/CoordinateOperations.php @@ -1320,11 +1320,6 @@ class CoordinateOperations 'method' => 'urn:ogc:def:method:EPSG::9603', 'extent_code' => ['1346'], ], - 'urn:ogc:def:coordinateOperation:EPSG::1564' => [ - 'name' => 'NZGD49 to WGS 84 (2)', - 'method' => 'urn:ogc:def:method:EPSG::9607', - 'extent_code' => ['3285'], - ], 'urn:ogc:def:coordinateOperation:EPSG::1565' => [ 'name' => 'NZGD2000 to WGS 84 (1)', 'method' => 'urn:ogc:def:method:EPSG::9603', @@ -1550,11 +1545,6 @@ class CoordinateOperations 'method' => 'urn:ogc:def:method:EPSG::9606', 'extent_code' => ['2340'], ], - 'urn:ogc:def:coordinateOperation:EPSG::1670' => [ - 'name' => 'NZGD49 to WGS 84 (3)', - 'method' => 'urn:ogc:def:method:EPSG::9615', - 'extent_code' => ['3285'], - ], 'urn:ogc:def:coordinateOperation:EPSG::1682' => [ 'name' => 'South Yemen to WGS 84 (1)', 'method' => 'urn:ogc:def:method:EPSG::9603', @@ -13660,11 +13650,6 @@ class CoordinateOperations 'method' => 'urn:ogc:def:method:EPSG::9603', 'extent_code' => ['3558'], ], - 'urn:ogc:def:coordinateOperation:EPSG::15975' => [ - 'name' => 'NZGD49 to WGS 84 (4)', - 'method' => 'urn:ogc:def:method:EPSG::9603', - 'extent_code' => ['3285'], - ], 'urn:ogc:def:coordinateOperation:EPSG::15977' => [ 'name' => 'Slovenia 1996 to ETRS89 (1)', 'method' => 'urn:ogc:def:method:EPSG::9603', diff --git a/src/EPSG/Import/EPSGCodegenFromDataImport.php b/src/EPSG/Import/EPSGCodegenFromDataImport.php index a92e99384..d9f58f4c4 100644 --- a/src/EPSG/Import/EPSGCodegenFromDataImport.php +++ b/src/EPSG/Import/EPSGCodegenFromDataImport.php @@ -1183,6 +1183,7 @@ public function generateDataCoordinateOperations(): void $etrs89CopiesFromWGS84 = $this->determineOperationsToETRS89CopiedFromWGS84(); $wgs84CopiesFromGDA94 = $this->determineOperationsToWGS84CopiedFromGDA94(); $wgs84CopiesFromSIRGAS = $this->determineOperationsToWGS84CopiedFromSIRGAS(); + $wgs84CopiesFromNZGD = $this->determineOperationsToWGS84CopiedFromNZGD2000(); $blackListedOperations = array_merge( self::BLACKLISTED_OPERATIONS, @@ -1190,6 +1191,7 @@ public function generateDataCoordinateOperations(): void $etrs89CopiesFromWGS84, $wgs84CopiesFromGDA94, $wgs84CopiesFromSIRGAS, + $wgs84CopiesFromNZGD, ); $sql = " @@ -1595,4 +1597,23 @@ private function determineOperationsToWGS84CopiedFromSIRGAS(): array return $data; } + + private function determineOperationsToWGS84CopiedFromNZGD2000(): array + { + $sql = " + SELECT DISTINCT wgs84.coord_op_code + FROM epsg_coordoperation wgs84 + JOIN epsg_coordoperation nzgd ON nzgd.source_crs_code = wgs84.source_crs_code AND nzgd.target_crs_code IN (4167, 4958, 4959) + JOIN epsg_usage u ON wgs84.coord_op_code = u.object_code AND u.object_table_name = 'epsg_coordoperation' AND u.scope_code = 1252 + WHERE wgs84.target_crs_code IN (4978,4326,4979) + "; + + $result = $this->sqlite->query($sql); + $data = []; + while ($row = $result->fetchArray(SQLITE3_ASSOC)) { + $data[] = $row['coord_op_code']; + } + + return $data; + } }